1# forge metrics reads the lake's copy of every build too: the same output2# while metrics.jsonl has it all, and the older builds once the file has3# lost them (backups leave it out). Without a lake it reads the file alone.4. "$(dirname "$0")/../lib.sh"5user dami6repo dami/greet7clone dami dami/greet "$T/w/d"8at "$T/w/d" commit "first"9push_as dami "$T/w/d" origin main10build dami/greet11build dami/greet12ok forge metrics13cp "$T_LOG" "$T/before"14has "$T/before" '^20[0-9-]+ [0-9:]+ +dami/greet +manual'15eq "$(grep -c ' dami/greet *manual' "$T/before")" 216ok forge lake17ok forge metrics18cp "$T_LOG" "$T/after"19ok cmp "$T/before" "$T/after"20# The file is gone (a restored forge starts without it); a new build21# writes a new one, which the lake hasn't read yet.22rm "$FORGE_ROOT/.forge/metrics.jsonl"23build dami/greet24ok forge metrics25has "$T_LOG" '^2 older builds from the lake, 3 in all$'26eq "$(grep -c ' dami/greet *manual' "$T_LOG")" 327ok forge metrics 15 dami/greet28eq "$(grep -c ' dami/greet *manual' "$T_LOG")" 3