Skip to content

fix(xtask): reject the fixture SPEC.md spec-id placeholder (#7399) - #8315

Merged
EffortlessSteven merged 6 commits into
mainfrom
claude/confident-ramanujan-72okhu
Oct 17, 2026
Merged

EffortlessSteven merged 6 commits into
mainfrom
claude/confident-ramanujan-72okhu

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Claim and scope

Closes #7399. cargo xtask fixtures <name> accepted the fixtures new scaffold's literal Spec: RIPR-SPEC-NNNN (prefix-only check), so the printed verify step went green and check-traceability failed later with no pointer to specs next.

  • fixture_contract_violations now requires a Spec: RIPR-SPEC- line with exactly four digits (the is_spec_id shape); otherwise it reports a violation naming cargo xtask specs next.
  • fixtures new step 3 tells the contributor to replace the placeholder (allocate via specs next or cite an existing spec) and that fixtures rejects it.
  • Changelog fragment 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: real fixture_contract_violations on a minimal fixture dir reports the new violation for NNNN and none for RIPR-SPEC-0001.
  • cargo xtask precommit exit 0; cargo xtask check-fixture-contracts pass; all authored fixture SPEC.md files already cite four-digit ids.

Limitations

cargo xtask fixtures (full run) could not execute here: it needs a locked anyhow fetch and the sandbox is offline. No hosted qualification claimed.

Rollback

Revert this PR; no migration.


Generated by Claude Code

…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
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: b5610f71-1c1b-4b5b-971f-d5c084c9b2f5
📥 Commits

Reviewing files that changed from the base of the PR and between 0a4aec9 and e5e4a70.

📒 Files selected for processing: 2
  • changelog.d/7399-fixture-spec-placeholder.md
  • xtask/src/reports/fixtures.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • SPEC_LINE_PREFIX is declared at the top of the mod tests block 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-0001 in 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 with Spec: 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.

Copy link
Copy Markdown
Member Author

Claiming this PR for review and merge convergence (newest-first backlog lane). Backlog-oldest-first thread: please skip #8315.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

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 Spec: line, and the old prefix check already excluded them; edge cases of spec_line_cites_real_id fine). cargo test -p xtask placeholder tests pass, cargo xtask check-fixture-contracts pass, cargo xtask precommit exit 0. Pushing a merge of main (so CI sees current main) and marking Ready + merge-ready.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 05:39
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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's expected/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

Copy link
Copy Markdown
Member Author

CI note: Ripr Rust Small on GitHub Hosted / Rust gates failed on the previous head (c03b508) in cargo xtask goldens check: 8 human.txt goldens (one_hop_field_projection_*, rust_map_*, seeded_push_after_early_return, typescript_mock_payload_iife_impl) still expect the pre-#8165 summary wording. This PR only touches xtask/src/reports/fixtures.rs and a changelog fragment, and the same drift reproduces on a plain merge of main, so it is not this PR's. The fix exists as #8351 (wording-only re-bless); I ported that diff verbatim into this branch so it no-ops once #8351 lands. Also switched the new test to the module's unique_temp_path helper per the automated review's temp-dir note.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_PREFIX is declared below its sole caller (line ~509). Move the const above fixture_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_id accepts Spec: RIPR-SPEC-0001, (comma immediately after 4 digits) and Spec: RIPR-SPEC-0001. since nth(4) only forbids alnum/-. The unit test only checks 0001x (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-contracts were witnessed locally. End-to-end fixtures run 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-0063 only 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.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 07:10
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 07:11
@settings settings Bot removed the merge-ready label Oct 17, 2026
@EffortlessSteven
EffortlessSteven merged commit 93a5243 into main Oct 17, 2026
36 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/confident-ramanujan-72okhu branch October 17, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ux(dev): fixtures new leaves Spec: RIPR-SPEC-NNNN that passes the fixture gate but fails check-traceability with no pointer to specs next

2 participants