I3919 — The coverage gate finds the end of a test module across multi-line and raw string literals
scripts/rust-coverage's test_lines, which finds where an inline #[cfg(test)] module ends by matching braces, follows a string literal across lines and reads raw strings (r#...#) with their hashes, so braces inside a multi-line or raw string never close the module early. Case 132 gains a fixture whose test module holds a multi-line raw JSON string and whose uncovered panic branch after it is test code and owes nothing.
READY wave 0 · p1 · implementation profile · runs alone
Ready. Every dependency is done, so majordomus plan start I3919 will be accepted.
Objective
scripts/rust-coverage's test_lines, which finds where an inline #[cfg(test)] module ends by matching braces, follows a string literal across lines and reads raw strings (r#...#) with their hashes, so braces inside a multi-line or raw string never close the module early. Case 132 gains a fixture whose test module holds a multi-line raw JSON string and whose uncovered panic branch after it is test code and owes nothing.
Why
On 2026-10-22 train 4's coverage gate called three panic branches of a generate.rs test production code: a multi-line raw JSON fixture at generate.rs:3795-3798 made the scanner close the test module 63 lines early. The fixture was rewritten with json! to land the train; every later test with such a fixture would meet the same gate.
Current state
test_lines (scripts/rust-coverage:268-318) skips a string only within one line and does not know raw strings.
Desired state
A test module holding multi-line and raw string literals is test code to its real closing brace; case 132 proves it with a fixture.
Scope
- scripts/rust-coverage
- test/cases/132_coverage_differential.sh
- .ai/repo/project/issues/I3919.yaml
Dependencies
None. This issue is a root of the graph.
What waits on this
Acceptance criteria
- A multi-line raw string inside a test module leaves the whole module test code
- A raw string with hashes and braces is skipped whole
- Case 132 fails if the scanner closes the module early
Validation
- bin/majordomus plan validate
- env -u MAJORDOMUS_SHARE -u MAJORDOMUS_HTTP_HOST -u MJ_ROOT bash test/run.sh 132_coverage_differential
Evidence required
- raw_strings_stay_in_test_module
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Timeline
- started
- —
- verified
- —
- completed
- —
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I3919.yaml. Read it back with majordomus plan show I3919.