GeezerVison is showing github.com — 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) · Issue #6409 · developing-today/code
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) #6409Descriptionid(commands/text): the only tsv_row test never runs — its #[test] attribute sits doubled on the neighboring test
Evidence (verified this run, origin/main 28719695372b)
pkgs/id/src/commands/text.rs, tests module:
- Lines 276–277:
list_tsv_row_shows_origin_and_upload_time (line 278) carries two #[test] attributes.
- Line 293:
fn tsv_row_keeps_control_characters_inside_the_name_field() carries none.
Consequences, both verified on the laptop:
- A duplicated
#[test] is only a rustc warning (duplicated attribute) and registers the test twice — a minimal rustc --test probe shows the doubled test listed and run 2×. So the neighbor runs twice and nothing in CI is red.
- A
fn inside #[cfg(test)] mod tests without #[test] is never executed by the harness. tsv_row_keeps_control_characters_inside_the_name_field is the only test of tsv_row itself — the row-level pin for the id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL #1613 contract that a peer name containing \n/\t cannot forge a row or shift columns in TSV output. plain_field (its callee) is well tested; the row composition ({hash}\t{field}, exactly one real delimiter) is not covered by any running test.
- The orphaned test is valid: extracted verbatim (with the production
plain_field / tsv_row / is_format_char copied byte-for-byte from origin/main into probe crate ~/git/fleet/probe-tsv-row on the laptop) and given its #[test], it passes (cargo test --lib: 1 passed). The behavior is correct today — the pin is simply dead.
- A scan of every
mod tests in pkgs/id/src + pkgs/id/crates this run found no other attribute-less test-named function (remaining hits are helpers and #[cfg_attr(madsim, …)] tests).
Why it matters
This is the "a suite that never runs is not a test" failure class (#6185) in its smallest form: one displaced attribute silently disables the regression pin for a security-adjacent rendering contract (untrusted peer names from unsigned gossip, #1613), while the doubled attribute on the neighbor makes the test count look right. Any future refactor of tsv_row/list_tsv_row column composition can break the forged-row guarantee with a fully green suite.
Acceptance criteria
- Move the stray second
#[test] from list_tsv_row_shows_origin_and_upload_time to tsv_row_keeps_control_characters_inside_the_name_field in pkgs/id/src/commands/text.rs (one-attribute move; no test body changes).
-
cargo test --lib commands::text (or the crate's CI venue) lists tsv_row_keeps_control_characters_inside_the_name_field exactly once and it passes; list_tsv_row_shows_origin_and_upload_time is listed exactly once.
- No other production or test behavior changes.
Notes
Activitydeveloping-today commented on Nov 6, 2026 dezren39 commented on Nov 6, 2026 🤖 Agent note · filed
- Agent: new-issue-creator (Lane B, slug new-issue-creator-code-b)
- Session / ID: cron job new-issue-creator-code-b, run 2026-11-05 18:50 CST
- Found via: filed this run
- Task: Filed after verifying on the laptop against origin/main 2871969: duplicate #[test] at text.rs:276-277 registers the neighbor twice (rustc probe), the attribute-less tsv_row test at :293 never runs, and the orphaned test passes against verbatim production code (probe ~/git/fleet/probe-tsv-row).
- Expectation: effort/xs — one-attribute move; done = the tsv_row test is listed and passes, the neighbor listed once.
- Links: queue packet enqueued to repo-health-code-pilot (small-fix)
dezren39 commented on Nov 6, 2026 dezren39 commented on Nov 6, 2026 Cross-link: companion finding filed as #6410 — the same doubled/missing #[test] pattern in pkgs/id/src/web/markdown.rs (dead #945 footnote round-trip test) plus five pure-duplication sites (cli.rs, find.rs, serve.rs, repl/runner.rs, templates.rs), found by extending this run's scan repo-wide. dezren39 commented on Nov 6, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|