Today —
$ ls tests/
art_cli.rs
canvas_pty.rs
chart_cli.rs
pixels.rs
smoke.rs
$ for f in art_cli chart_cli canvas_pty smoke pixels; do printf '%-11s README:%s CONTRIBUTING:%s AGENTS:%s DESIGN:%s\n' $f $(grep -c $f README.md) $(grep -c $f CONTRIBUTING.md) $(grep -c $f AGENTS.md) $(grep -c $f docs/DESIGN.md); done
art_cli README:0 CONTRIBUTING:0 AGENTS:1 DESIGN:0
chart_cli README:0 CONTRIBUTING:0 AGENTS:0 DESIGN:0
canvas_pty README:0 CONTRIBUTING:0 AGENTS:0 DESIGN:0
smoke README:1 CONTRIBUTING:2 AGENTS:2 DESIGN:0
pixels README:10 CONTRIBUTING:5 AGENTS:2 DESIGN:12
$ sed -n '44,47p' CONTRIBUTING.md # the whole of the tests/ part of the layout table
| `src/render_tests.rs` | in-process tests: layout, colour, encoders, art, PNG |
| `tests/smoke.rs` | out-of-process tests: the real binary in a real PTY |
| `tests/pixels.rs` | the same, in a PTY that answers the graphics probe |
$ grep -n '150-odd' CONTRIBUTING.md
19:cargo test # 150-odd tests, hermetic and offline
The real count, from the built binaries rather than from grep:
art_cli 40
canvas_pty 12
chart_cli 3
mossaic 114 (src/render_tests.rs + src/cli.rs)
pixels 15
smoke 24
TOTAL 208
So CONTRIBUTING — the document AGENTS.md:6 says "wins wherever the two disagree" — names 39 of 208 tests in its §2 table and its §3 three-layer policy, and its §1 figure is 39% under. chart_cli.rs and canvas_pty.rs (15 tests) appear in no contributor document at all; AGENTS.md:13 is the only place any document names art_cli.rs.
Why it is worth fixing — art_cli.rs is the largest test file in the repository and where mossaic-art's entire command-line contract is asserted; chart_cli.rs is the only place the chart is tested without a terminal, the case 0.6.3's "a missing --file in a script names the file" fix was written for; canvas_pty.rs is the only coverage the --draw editor and --list-templates have. A contributor who adds a flag, changes an error message or touches the editor reads §3, finds three layers and two files, and either writes a PTY test for something that prints and exits, or writes no test at all — while §3's own rule is "Every behavioural change needs a test".
The files know better than the docs do: tests/art_cli.rs:23 cites "CONTRIBUTING.md §3 asks for hermetic tests" and tests/canvas_pty.rs:3 explains why it is not art_cli.rs. The layering is real and deliberate; only the contributor-facing description of it is stale, and the "150-odd" figure is the cheap signal that nobody has read the section since the files were added.
Fix — add the three files to §2's table with the one-line description each already carries in its own module doc: tests/art_cli.rs "the planner driven as a shell drives it, no PTY", tests/chart_cli.rs "the chart with no terminal at all: a script, a pipe, CI", tests/canvas_pty.rs "the editor and the template list, in a real PTY". Then either make §3 four layers (in-process; out-of-process without a PTY; out-of-process in a PTY; out-of-process in a PTY that answers the graphics probe) or keep three and say which file each layer's tests live in — "out of process" currently covers two files it does not name. Fix the count in §1 and mirror the list into README's Development block and AGENTS.md:13. The table is the cheap first step; the layer question can follow.
This is fixable in mossaic alone: tools/gen_contributing.py in the ecosystem repo generates only §§4-8 and passes everything before §4 through untouched, so §§1-3 are per-repo and the sync will not overwrite the edit.
Done when — for f in art_cli chart_cli canvas_pty smoke pixels; do grep -q $f CONTRIBUTING.md || echo missing $f; done prints nothing; §3 tells a contributor which file a new mossaic-art CLI assertion belongs in without them opening tests/; §1's count matches what cargo test reports; and README's Development block and AGENTS.md list the same five files as CONTRIBUTING.md.
Today —
The real count, from the built binaries rather than from grep:
So CONTRIBUTING — the document AGENTS.md:6 says "wins wherever the two disagree" — names 39 of 208 tests in its §2 table and its §3 three-layer policy, and its §1 figure is 39% under.
chart_cli.rsandcanvas_pty.rs(15 tests) appear in no contributor document at all; AGENTS.md:13 is the only place any document namesart_cli.rs.Why it is worth fixing — art_cli.rs is the largest test file in the repository and where
mossaic-art's entire command-line contract is asserted; chart_cli.rs is the only place the chart is tested without a terminal, the case 0.6.3's "a missing--filein a script names the file" fix was written for; canvas_pty.rs is the only coverage the--draweditor and--list-templateshave. A contributor who adds a flag, changes an error message or touches the editor reads §3, finds three layers and two files, and either writes a PTY test for something that prints and exits, or writes no test at all — while §3's own rule is "Every behavioural change needs a test".The files know better than the docs do: tests/art_cli.rs:23 cites "CONTRIBUTING.md §3 asks for hermetic tests" and tests/canvas_pty.rs:3 explains why it is not art_cli.rs. The layering is real and deliberate; only the contributor-facing description of it is stale, and the "150-odd" figure is the cheap signal that nobody has read the section since the files were added.
Fix — add the three files to §2's table with the one-line description each already carries in its own module doc:
tests/art_cli.rs"the planner driven as a shell drives it, no PTY",tests/chart_cli.rs"the chart with no terminal at all: a script, a pipe, CI",tests/canvas_pty.rs"the editor and the template list, in a real PTY". Then either make §3 four layers (in-process; out-of-process without a PTY; out-of-process in a PTY; out-of-process in a PTY that answers the graphics probe) or keep three and say which file each layer's tests live in — "out of process" currently covers two files it does not name. Fix the count in §1 and mirror the list into README's Development block and AGENTS.md:13. The table is the cheap first step; the layer question can follow.This is fixable in mossaic alone:
tools/gen_contributing.pyin the ecosystem repo generates only §§4-8 and passes everything before §4 through untouched, so §§1-3 are per-repo and the sync will not overwrite the edit.Done when —
for f in art_cli chart_cli canvas_pty smoke pixels; do grep -q $f CONTRIBUTING.md || echo missing $f; doneprints nothing; §3 tells a contributor which file a newmossaic-artCLI assertion belongs in without them opening tests/; §1's count matches whatcargo testreports; and README's Development block and AGENTS.md list the same five files as CONTRIBUTING.md.