Repository navigation
Description
id(web/markdown): the #945 footnote round-trip test never runs — its #[test] sits doubled on the next test; five more doubled #[test] sites in pkgs/id
Evidence (verified this run, origin/main 28719695372b)
pkgs/id/src/web/markdown.rs:
- Line 7055:
fn test_footnote_roundtrip_fixpoint()— the regression pin for id(web): footnotes are backslash-escaped on save — [^1] syntax mangled, definition orphaned #945 (a footnote reference + definition round-trip open→save intact, emitted as[^label], never backslash-escaped, second save byte-identical) — carries no#[test]attribute (line 7053 closes the previous test, 7054 is blank, 7055 is the fn). A repo-widegit grepshows its only occurrence is its own definition: it is never called by another test either. It never runs. - Lines 7088–7089: the next test,
test_unreferenced_footnote_definition_survives_save(:7090), carries two#[test]attributes — the displaced attribute.
Mechanism (proven on the laptop this run for the identical text.rs instance, filed as #6409): a duplicated #[test] is only a rustc duplicated attribute warning and registers that test twice, so the suite stays green, the count looks right, and the attribute-less neighbor is silently dead.
Five more doubled sites (no dead neighbor found — the test runs twice)
A repo scan for consecutive #[test] lines found 7 sites in pkgs/id, all on origin/main. Excluding text.rs (#6409) and markdown.rs (above), the remaining five have all their neighboring tests correctly attributed, so the harm there is double execution (wasted CI time; doubled side effects — e.g. cli.rs's test spawns a thread) plus warning noise:
pkgs/id/src/cli.rs:3608-3609—test_cli_rejects_zero_result_limitspkgs/id/src/commands/find.rs:1053-1054—test_download_output_path_dash_name_is_not_the_stdout_sentinelpkgs/id/src/commands/serve.rs:3291-3292—test_web_content_target_program_rejects_empty_worldpkgs/id/src/repl/runner.rs:1890-1891—test_parse_rejects_zero_result_limitspkgs/id/src/web/templates.rs:1306-1307—test_render_program_page_pins_the_world_and_omits_host_controls
Why it matters
Same failure class as #6409 / #6185 ("a suite that never runs is not a test"), in the web markdown codec — a surface with a steady stream of round-trip regressions (#945, #998, #1019, #1565, #6364). The #945 pin has been dead for an unknown span: if footnote round-tripping regressed again, no running test would say so. Note the honest unknown: unlike the text.rs orphan (verified passing against verbatim production code), this test was not re-run standalone this run — if it fails when re-enabled, that failure is a live #945 regression the dead test was hiding, and it should be triaged as such, not silently re-deleted.
Acceptance criteria
- Move one
#[test]from markdown.rs:7088-7089 totest_footnote_roundtrip_fixpoint(:7055); run it. If it passes, done for this site. If it fails, file/link a follow-up for the id(web): footnotes are backslash-escaped on save — [^1] syntax mangled, definition orphaned #945 regression it exposes (do not delete or weaken the test to make it pass). - Remove the duplicated second
#[test]at the five sites listed above (cli.rs, find.rs, serve.rs, repl/runner.rs, templates.rs) so each test is registered exactly once. -
cargo test -- --listfor the crate shows each named test exactly once, and the footnote round-trip test appears. - No test body or production code changes.
Notes
- Companion to id(commands/text): the only tsv_row test never runs — its #[test] attribute sits doubled on the neighboring test (text.rs:276-277 vs :293) #6409 (same pattern in
commands/text.rs, filed separately because it was verified end-to-end first and carries its own small-fix packet). Cross-linked both ways. - Found by Lane B (new-issue-creator-code-b): a repo scan for consecutive
#[test]lines, followed by per-site inspection of neighboring tests.
Activity
developing-today commentedon Nov 6, 2026
CODE-1916
dezren39 commentedon Nov 6, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 6, 2026
🤖 Agent note · handed off
110 remaining items
dezren39 commentedon Nov 10, 2026
agent-note:v1 — state: handed_off (task 10836, lane code-h)
dezren39 commentedon Nov 10, 2026
Lane code-p — task 10836 handed off
dezren39 commentedon Nov 11, 2026
Agent note — task 10836 picked up, PR #6429 salvage in progress
dezren39 commentedon Nov 11, 2026
Agent note — task 10836 done (fixed_merged)
cargo test -p id --lib --features web(1 passed); all six deduped sites carry exactly one #[test] in source. The --no-default-features combo failure on main is pre-existing and unrelated (feature-gated sandbox/Dev references in other test code).