Artifact 861eae64e76f4daa16752ae24c2909dc9a433321353002d407afd59c97c2a4ee:
- File
test/corpus/usage/grown-202d2121646d
— part of check-in
[38c2e6220a]
at
2026-11-16 21:25:35
on branch trunk
— Suit counts how often each skill, agent and command is used
The counts come from the records a harness already keeps of its own work, read afterwards. What those records look like is data in the wardrobe's harness section: where the files are, where a record's time and folder are, and rules that say what an invocation looks like. No harness is named in suit's code. docs/harnesses.md has the rules for the first harness, checked against real records.
A streaming reader walks each JSON line against the rules in 64 KiB chunks, keeps at most the first 512 bytes of any string and stops at 64 levels, so a line of any length cannot grow its memory. It has its own fuzz target.
Suit keeps its own tally per machine under usage/ in its home folder, outside any wardrobe: one line per invocation with time, harness, kind, name, project and call id. A call copied into a resumed or forked record is counted once, by its id. The tally outlives the harness's own clean-up and drops what is older than 400 days.
suit usage scan reads what is new; a first scan reads files changed in the last 45 days and later scans read only new bytes. suit usage prints the table for a window, default 30 days, and --tsv gives the same rows for other tools. suit tend with no name runs the scan after tending; a failed scan is reported and changes nothing else. suit-run is untouched and the speed budget passes as before.
Measured: a generated tree of 200 files and 200 MiB scans in about half a second and a second scan opens no record file. On a real tree of 2547 files, read-only into a scratch home: 3756 invocations in 60 seconds, 10 MiB at peak.
A new suite, test/usage.sh, with 236 cases, is part of the gate.
2855 unit checks (was 1473), 620 shell cases, 1153 store cases, 846 placement cases, 378 project cases and 236 usage cases, under clang, under gcc 16, with no user name set, and under a strict umask, in one run of make gate (41 minutes). 100% coverage in all 28 source files. One existing unit line changed: a table of fault points gained entries. (user: dmestas, size: 16) [annotate] [blame] [check-ins using]
{"a":[
:[