Přeskočit na obsah

Tato stránka byla automaticky přeložena z angličtiny, jediného jazyka, ve kterém se tento web píše. Číst originál.

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.

PŘIPRAVENO vlna 0 · p1 · profil implementation · běží samostatně

Součást ci-critical-path — Kritická cesta od změny k jejímu verdiktu a od mergi k ověřenému nasazení běží za tepla pod minutu.

Připraveno. Všechny závislosti jsou hotové, takže majordomus plan start I3919 bude přijato.

Cíl

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.

Proč

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.

Aktuální stav

test_lines (scripts/rust-coverage:268-318) skips a string only within one line and does not know raw strings.

Cílový stav

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.

Rozsah

  • scripts/rust-coverage
  • test/cases/132_coverage_differential.sh
  • .ai/repo/project/issues/I3919.yaml

Závislosti

Žádné. Tento úkol je kořenem grafu.

Co na tom čeká

Kritéria přijetí

  • 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

Validace

  • bin/majordomus plan validate
  • env -u MAJORDOMUS_SHARE -u MAJORDOMUS_HTTP_HOST -u MJ_ROOT bash test/run.sh 132_coverage_differential

Požadované důkazy

  • raw_strings_stay_in_test_module

Důkazy

Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.

Časová osa

zahájeno
—
ověřeno
—
dokončeno
—

Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.

Canonical record: .ai/repo/project/issues/I3919.yaml. Read it back with majordomus plan show I3919.

Prohledává názvy a popisy všech stránek, které tento web publikuje.