Repository navigation
Description
id(cli): test_cli_rejects_first_and_last_together never runs — PR #3738's inserted test took its #[test] attribute
Finding
The CLI regression test for the --first/--last conflict (conflicts_with, the #3029 contract) is dead code on current main: it carries no #[test] attribute, is never called from anywhere, and therefore never runs — while the suite stays green.
Evidence
- PR id(cli/repl): reject zero result limits at both boundaries (#3059) #3738 (merged, merge commit
5fa06504a63c, verified ancestor of main63f83bef5ab2via compare API, behind_by 0) inserted its new test between the existing#[test]attribute and the function it belonged to. Its diff hunk (cli.rs, old lines ~2923-2946) shows the context line#[test], then the added+ #[test]/+ fn test_cli_rejects_zero_result_limits(), and after the inserted body the context linefn test_cli_rejects_first_and_last_together()with no attribute. - Current main
pkgs/id/src/cli.rs:3608-3609:test_cli_rejects_zero_result_limitscarries two#[test]attributes (a duplicated-attribute warning; the test registers twice, per the mechanism documented in issue 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). - Current main
pkgs/id/src/cli.rs:3638:fn test_cli_rejects_first_and_last_together()carries none. A repo-wide code search for its name returns exactly one hit — its own definition in cli.rs — so nothing else calls it either. - PR fix(id): restore lib-test build broken by #3738 derive placement (+ #3695 test leftovers) #3754 fixed the identical displacement PR id(cli/repl): reject zero result limits at both boundaries (#3059) #3738 caused for
Command's#[derive(Subcommand)](issue id(cli): pkgs/id does not compile on main — PR #3738 inserted parse_result_limit between Command's derive and the enum #3751), but did not catch this second displacement in the same PR. - The behaviour the dead test guards is still configured on main: the
--firstfields still carryconflicts_with = "last"(e.g. cli.rs ~:883), so the test is expected to pass when re-enabled — its assertions are the oracle.
Relation to issue #6410
Issue #6410 (OPEN) lists cli.rs:3608-3609 among "five more doubled sites" and states no dead neighbour was found there. That is true for the preceding neighbour, but the following neighbour is the dead one here. Simply deleting one duplicated attribute at cli.rs (the literal #6410 acceptance step) would leave this test dead. Moving one attribute to test_cli_rejects_first_and_last_together satisfies both issues for the cli.rs site.
Why it matters
PR #3738's body claims "#3029's first/last conflict behaviour is preserved" — the one test that pins that behaviour at the CLI boundary has not run since PR #3738 merged. If a future clap refactor drops the conflict, nothing would say so.
Acceptance criteria
- Move one
#[test]fromtest_cli_rejects_zero_result_limitstotest_cli_rejects_first_and_last_togetherinpkgs/id/src/cli.rs(no test-body or production-code changes). -
cargo test -- --listfor the id crate shows both tests exactly once each. - The re-enabled
test_cli_rejects_first_and_last_togetherpasses; if it fails, that is a live first/last-conflict regression — triage it as such, do not weaken the test. - Note the cli.rs site as resolved on issue id(web/markdown): the #945 footnote round-trip test never runs — its #[test] sits doubled on the next test (markdown.rs:7055 vs :7088); five more doubled #[test] sites in pkgs/id #6410 when this lands.
Activity
developing-today commentedon Nov 7, 2026
CODE-2191
dezren39 commentedon Nov 7, 2026
🤖 Agent note · filed
test_cli_rejects_first_and_last_togetherfinding from PR id(cli/repl): reject zero result limits at both boundaries (#3059) #3738's diff (attribute displacement, cli.rs:3608-3638) against current main; related to issue id(web/markdown): the #945 footnote round-trip test never runs — its #[test] sits doubled on the next test (markdown.rs:7055 vs :7088); five more doubled #[test] sites in pkgs/id #6410's cli.rs doubled site.#[test]attribute, verify both tests list and run exactly once; done when the re-enabled conflict test passes.developing-today commentedon Nov 8, 2026
🤖 Agent note · handed off
12 remaining items
dezren39 commentedon Nov 9, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 10, 2026
agent-note:v1
task 11335 — picked up by lane code-b, verified fresh: issue #6943 OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit absent).
execution_lane: opencode (lane row 3648) — handed off to the opencode claimant; claimant launches the bound opencode session.
stage: handed_off
dezren39 commentedon Nov 10, 2026
agent-note:v1 — task 11335 pickup + handoff (lane code-g)
status/needs-triagequeue/10836-6410-restore-footnote-testtouching the same cli.rs attribute site — treat as the conflicting artifact, do not build a parallel fixdezren39 commentedon Nov 10, 2026
🤖 Agent note · handed off to opencode claimant — Agent: queue worker (repo-worker-code), lane code-b — Session/ID: task 11335, repo-queue-worker-shift-b 2026-11-10 run. Task 11335 (triage) for issue #6943; attempts 3/4 on this claim. Fresh check: issue #6943 OPEN, no held/user/owned/do-not-merge/do-not-auto-edit labels, no status/needs-triage. Execution lane row 3648 = opencode. Checkpointed handed_off with Rule-4 reason (scheduled shift is time-bounded; claimant is the persistent execution session); parking task 11335 for 20 minutes for the claimant window.
dezren39 commentedon Nov 10, 2026
🤖 Agent note · handed off
opencode(row 3648)dezren39 commentedon Nov 10, 2026
agent-note:v1
state: handed-off
queue: repo-health-code-pilot
task: 11335 (triage, worker repo-worker-code, lane code-n)
issue: #6943
Verified fresh 2026-11-10T09:43Z: issue #6943 OPEN, no hard-stop labels, no status/needs-triage. Triage-separation check (#8097 rule 3): packet kind is triage, but no triage-step agent note exists on #6943 and the packet acceptance is a concrete code fix (move one #[test] attribute in pkgs/id/src/cli.rs), so this is not a bookkeeping-complete; the packet stays live.
Lane assignment: opencode (assignment row 3648). Handoff reason: scheduled shift is time-bounded; claimant is the persistent execution session.
Next: claimant launches the bound opencode session. Task 11335 parked 1200s for the claimant window.
dezren39 commentedon Nov 11, 2026
Agent note (lane code-b, task 11335): already fixed on current main — closing as already-done with verification.
State found (worktree at origin/main
57bbf2ad73): the cli tests now live inpkgs/id/src/cli/tests.rs(cli.rs became a module directory since this issue was filed), and the attribute displacement is gone —test_cli_rejects_zero_result_limits(tests.rs:901) carries exactly one#[test], andtest_cli_rejects_first_and_last_together(tests.rs:930) carries its own#[test]. The fix evidently landed with the #6410 doubled-attribute cleanup (issue #6410 is CLOSED, which also covers this issue's "note the cli.rs site on #6410" acceptance bullet).Verification against the acceptance oracle, this run:
cargo test --lib test_cli_rejects -- --listlistscli::tests::test_cli_rejects_first_and_last_togetherandcli::tests::test_cli_rejects_zero_result_limitsexactly once each.cargo test --lib test_cli_rejects: 2 passed, 0 failed — the re-enabled first/last-conflict test passes, so there is no live--first/--lastconflict regression to triage.No code change was needed; no PR opened.
dezren39 commentedon Nov 11, 2026
🤖 Agent note · follow-on claim verified already-fixed (task 14972, lane code-c)
pkgs/id/src/cli/tests.rs;test_cli_rejects_zero_result_limits(line 900-901) andtest_cli_rejects_first_and_last_together(line 929-930) each carry exactly one#[test].cargo test --lib test_cli_rejectsruns both exactly once and both pass — the re-enabled first/last-conflict test is green, so there is no live conflict regression to triage.