Repository navigation
fix(xtask): reject the fixture SPEC.md spec-id placeholder (#7399) - #8315
Conversation
…scaffold at specs next (#7399) The fixture contract accepted any line starting with `Spec: RIPR-SPEC-`, so the `fixtures new` placeholder passed the printed verify step and then failed check-traceability. Require four digits and name `cargo xtask specs next` in both the violation and scaffold step 3. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnXwHyDqvVS8aT5334zBhg
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 20 minutes. View limit details
Comment |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- SPEC_LINE_PREFIX is declared at the top of the
mod testsblock rather than near its single use; readability is slightly harmed.
Verification questions
- Confirm test scaffolded_fixture_with_placeholder_spec_fails_the_contract uses std::process::id() in temp_dir; concurrent CI shards could race on the same path.
Refuted
- Trailing markdown emphasis (e.g.
Spec: RIPR-SPEC-0001in inline code) would be rejected by spec_line_cites_real_id even though check-traceability might tolerate it; refuted because: Backticks are part of the line; the outer prefix any() never matches because the line no longer starts withSpec: RIPR-SPEC-. So the validator falls into the missing-line branch and reports a missing-spec violation, which is a stricter but still correct failure (the contributor fixes the emphasis too). No silent regression.
Parked follow-ups
- xtask/src/reports/fixtures.rs:2300 — Integration test uses std::env::temp_dir() with PID-suffixed name and remove_dir_all without a fresh per-test UUID; concurrent CI runs (or test retries) collide. Prefer tempdir crate or std::env::temp_dir()/random per-run suffix and tolerate missing-dir remove.
Evidence gaps
- cargo-test sensor is receipt-absent and ripr failed; PR claims cargo xtask precommit + check-fixture-contracts pass but no witness in this packet.
- Model proof intent was rejected by deterministic validation.
|
Claiming this PR for review and merge convergence (newest-first backlog lane). Backlog-oldest-first thread: please skip #8315. Generated by Claude Code |
|
Local proof for a5482a7 merged with current main: independent Sonnet review REVIEW_READY (checked all 503 fixture SPEC.md files: only 7 corpus/manifest dirs lack a Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Parked follow-ups
- Integration test uses
std::env::temp_dir().join(format!("ripr-7399-{}", std::process::id()))with no per-test UUID and a cleanup that runs even on failure: concurrent CI shards (and re-runs) on the same host collide and one removes another'sexpected/check.json. - Integration test uses std::env::temp_dir() with PID-suffixed path and remove_dir_all without per-test UUID; this is the same race risk already parked in the prior review summary and not a new boundary defect.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
…c test (#7399) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnXwHyDqvVS8aT5334zBhg
…ns check is green (#8165) Main's goldens check drifts on 8 human.txt files missed by the plain-language verdict change; #8351 carries the wording-only re-bless. Ported verbatim; it no-ops once #8351 lands. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnXwHyDqvVS8aT5334zBhg
|
CI note: Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- SPEC_LINE_PREFIX constant is declared at line 530, after its use in fixture_contract_violations at line 509, harming readability; grouped-near-use style is preferable but not a defect.
- xtask/src/reports/fixtures.rs:530 —
SPEC_LINE_PREFIXis declared below its sole caller (line ~509). Move the const abovefixture_contract_violations(or co-locate next to the helper) so the call site's symbol is visible top-down.
Verification questions
- Confirm spec_line_cites_real_id takes 4 chars and verifies they are ascii digits then peeks chars().nth(4) for trailing alnum or '-'. Allows 'RIPR-SPEC-0062, RIPR-SPEC-0063' style comma list per PR claim and unit test.
- Confirm integration test scaffolded_fixture_with_placeholder_spec_fails_the_contract now uses the module's unique_temp_path helper (per the PR author's note), which already disambiguates per test. The 'PID-suffixed, no UUID, concurrent CI shards race' concern parked in the prior review summary is therefore partially mitigated but not eliminated if unique_temp_path itself is PID-only.
- Confirm
spec_line_cites_real_idacceptsSpec: RIPR-SPEC-0001,(comma immediately after 4 digits) andSpec: RIPR-SPEC-0001.sincenth(4)only forbids alnum/-. The unit test only checks0001x(alpha) not punctuation; same over-tolerance as prior trailing-markdown emphasis case but in the opposite direction (passes when contributor may not have intended it). - Confirm pR body claims
cargo xtask fixtures(full run) could not execute; only unit tests +check-fixture-contractswere witnessed locally. End-to-endfixturesrun on the real corpus is absent from this packet's evidence (ripr sensor failed, sandbox offline).
Refuted
- Comma-list like
Spec: RIPR-SPEC-0062, RIPR-SPEC-0063only validates the first id; second id with bad digits could pass silently.; refuted because: Validator only requires at least one spec_line_cites_real_id-match via the outer any() in fixture_contract_violations; comma-list edge case test confirms acceptance. Per-id grammar is out of scope (#7399 is about rejecting the scaffold placeholder, not validating all listed ids). - Trailing punctuation like 'Spec: RIPR-SPEC-0001.' or 'RIPR-SPEC-0001)' would be silently accepted by spec_line_cites_real_id while check-traceability may reject them.; refuted because: Helper only forbids alphanumeric and '-' at position 5; '.' and ')' pass. PR scope is #7399 placeholder rejection, and check-traceability is out of scope per PR body non-goals. Out of lane scope; demoted to test-gap observation, not a candidate.
- The new helper duplicates an existing is_spec_id predicate and will let two validators drift on the four-digit id shape.; refuted because: PR scope is explicitly bounded: other per-fixture validators with fixed ids are untouched, and the helper accepts the prefixed line directly so the call site stays a single
lines().any(spec_line_cites_real_id)chain. Any future unification belongs in a follow-up, not this PR's smallest-complete-fix.
Parked follow-ups
- SPEC_LINE_PREFIX const is declared after fixture_contract_violations but only used by it (and the helper below); a reader scanning top-down hits the call site before the symbol definition. Minor readability, not a correctness boundary defect.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Claim and scope
Closes #7399.
cargo xtask fixtures <name>accepted thefixtures newscaffold's literalSpec: RIPR-SPEC-NNNN(prefix-only check), so the printed verify step went green andcheck-traceabilityfailed later with no pointer tospecs next.fixture_contract_violationsnow requires aSpec: RIPR-SPEC-line with exactly four digits (theis_spec_idshape); otherwise it reports a violation namingcargo xtask specs next.fixtures newstep 3 tells the contributor to replace the placeholder (allocate viaspecs nextor cite an existing spec) and thatfixturesrejects it.changelog.d/7399-fixture-spec-placeholder.md.Non-goals: no change to traceability, bless-reason validation (#8099), or product behavior. Other per-fixture validators with fixed ids are untouched.
Proof
spec_line_placeholder_is_not_a_real_spec_id: placeholder, short, over-long and trailing-alnum ids rejected; real and comma-list lines accepted.scaffolded_fixture_with_placeholder_spec_fails_the_contract: realfixture_contract_violationson a minimal fixture dir reports the new violation forNNNNand none forRIPR-SPEC-0001.cargo xtask precommitexit 0;cargo xtask check-fixture-contractspass; all authored fixtureSPEC.mdfiles already cite four-digit ids.Limitations
cargo xtask fixtures(full run) could not execute here: it needs a lockedanyhowfetch and the sandbox is offline. No hosted qualification claimed.Rollback
Revert this PR; no migration.
Generated by Claude Code