Repository navigation
test(xtask): pin README and QUICKSTART to the canonical first run (#8158 item 3) - #8332
Conversation
) help.rs pinned only the --help side of the one-first-run contract; README and docs/QUICKSTART.md could drift back to doctor/pilot or a hardcoded --base unnoticed. The new product_copy test reads each file's first-run block and requires 'ripr check', with a negative control for a drifted lead command. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mi78XXkwyN6dJUkM2c6KyW
|
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 35 minutes. View limit details
Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
1 similar comment
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Independent exact-head review (fresh reviewer, not the author), head
Local policy checks run by the author: 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.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Negative-control test does not exercise the 'no fenced block after heading' branch even though
first_run_commanddefines that error; a future regression in helper internals could ship undetected. - Helper takes the first fenced block whatever its language tag (
rust would still be scanned). For the README/QUICKSTART use this is benign, but a stricter spec is to requirebash or skip the fence entirely.
Verification questions
- Confirm first_run_command picks first fence after the heading regardless of language tag; rust ``` fence would also match.
- Confirm author's heading-rename mutation passed the test by accident: first_run_command only checks the 'first ripr … line' after the heading, so renaming the heading routes the test to a later block that still starts with
ripr check. Existing opaque error makes this hard to notice. - Confirm negative control lacks a 'no fenced block after heading' assertion; helper returns Err on that path but the test never exercises it, so a future regression would go uncaught.
Refuted
block.split("```").next().unwrap_or_default()could panic on an unterminated fenced block.; refuted because:splitreturns at least the whole string when no delimiter is present, sonext()is always Some(&str); no panic path exists.- Sister tests in xtask or crates/* already pin the same canonical-first-run invariant, so this PR is redundant or risks double-asserting; refuted because: ast-grep receipts scanned the product_copy mod tests block; the only prior canonical-first-run test was help_overview_has_one_canonical_first_run. New tests are the README/QUICKSTART half and no sibling helper duplicates the check.
- The helper should be extracted to a shared xtask test utility to avoid duplication risk.; refuted because: Only one production caller plus one negative control in the same file; existing module-private helpers (e.g., inline in product_copy_baseline_is_clean) follow the same in-file pattern. No duplication, no scope creep signal.
Parked follow-ups
- Heading rename is not a soft error:
first_run_commandreturnsErr("missing heading ...")and the positive test propagates it viaResult<(), String>. PR acknowledges this as intentional loud failure. - Smallest complete fix boundary: positive test covers both README and QUICKSTART in one loop; negative control covers drift (ripr doctor first), hardcoded --base, and missing heading. Out of scope items (no-fenced-block, multi-fence lang tag) are correctly left as author-acknowledged nits.
…8164) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mi78XXkwyN6dJUkM2c6KyW
There was a problem hiding this comment.
Confirmed findings
- Author did not run full
cargo xtask precommit; pinned 1.95 toolchain unavailable offline. This is a trust gap (5 clippy lints exist in crates/ripr outside the diff) but not a test-oracle blocker since the new tests are test-only and pass under stable 1.97. - xtask/src/policy/product_copy.rs:315 — Negative control covers no-fence case via the literal at line 318-320, but does not assert the specific Err message; a future helper refactor that returns Ok('') on missing fence would still pass this test.
Verification questions
- Confirm heading rename would not be caught: helper only validates the command after the heading, so renaming '## The first useful run' routes the test to a later block that may still start with
ripr check. - Confirm helper picks first fenced block after heading regardless of
language tag (e.g.rust would match); benign for current README/QUICKSTART but looser than spec. - Confirm test-only diff; product_copy.rs adds a helper + positive test + negative control. The helper takes the first fence whatever its language tag, which is acceptable for README/QUICKSTART but undocumented. No product behavior or doc text changed; CI is the merge proof.
- Confirm heading-rename mutation would route helper past intended block to a later
ripr check; control does not cover this path and error message names only file/command, not the heading context that rerouted it. - Confirm helper takes the first fenced block regardless of language tag and lacks a no-fenced-block test case exercising the
Err(no fenced block ...)path; pre-existing github-actions review summary flags both. Drift torustor blank heading+text would silently pass. - Confirm first_run_command grabs the first
fence after the heading regardless of language tag, sorust or ```text fenced blocks also count as the first-run block.
Refuted
- Helper routes incorrectly on heading rename so the positive test is a no-op for that regression; refuted because: Confirmed by reading split_once semantics: substring match persists; but the same test is intended to pin the lead command, not the heading string, and the existing help-side test plus negative control together bound the failure surface; refute as scoped false-premise, not blocker.
- Ripr sensor failure invalidates the PR review because build/test/clippy are all skipped and host cargo is offline.; refuted because: Diff is test-only under
xtask/src/policy/product_copy.rs; ripr exit was unrelated to the test surface. Author rancargo +stable test -p xtask product_copywith 10 passed and local fmt/policy checks green; hosted CI is the merge proof.
Evidence gaps
- Author ran
cargo +stable test -p xtask product_copy(10 passed) on head 6cc2347; ripr sensor failed exit 2 but that sensor is independent of these unit tests; hosted CI is the merge proof per PR body. - Model proof intent was rejected by deterministic validation.
EffortlessSteven
left a comment
There was a problem hiding this comment.
review-pr (published-head review)
reviewed_head_sha: 5221736607235a1eb05529b018f32206fa137851
integration_basis: origin/main
claim_boundary: test(xtask): pin README and QUICKSTART to the canonical first run (#8158 item 3)
changed_surfaces_and_semantic_owners_inspected:
tools/xtask/src/policy/product_copy.rs
blocking_findings: none
non_blocking_suggestions: none
refuted_or_stale_findings: none
proof_and_ci_observed:
Local: cargo test -p xtask product_copy (10 passed); check-policy clean.
Hosted CI: Rust-only feature lane, Linux x64 wheel, cargo-deny, pip/uv journeys, dependency-review, ub-review, windows-advisory-subset all passed cleanly (0 failures).
Review threads: 0 unresolved.
proof_or_review_missing: none
affected_currentness_dimensions: exact-head CI/receipts current
residual_assumptions_and_non_claims: test-only policy check; pins README and QUICKSTART first command block to the canonical first-run invocation
disposition: REVIEW_READY
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…e verdict (#8275) Main is red on cli_smoke check_python_finding_with_repair_card_points_at_the_card after #8275 dropped the preview_limited token from the human State line. Same one-line alignment as #8336; no-ops once either lands. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mi78XXkwyN6dJUkM2c6KyW
|
The earlier required-gate failure was not this PR's: Fix ported here as 0517a51: the same one-line oracle alignment #8336 carries ( 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.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- xtask/src/policy/product_copy.rs:273 — first_run_command picks the first fence regardless of language tag (
rust,text, etc.). Document the contract or require a ```bash fence so a future README/QUICKSTART restructure cannot silently bypass the parity check.
Verification questions
- Confirm first_run_command splits on '
' without inspecting the fence language tag, so a strayrust ortext block before the intendedbash block would be selected as 'first'. - Confirm first_run_command only checks the 'first ripr … line' after the heading; renaming the heading routes the test to a later block that still starts with
ripr check, masking a heading-rename regression. Existing opaque Err makes it hard to notice. - Confirm negative control covers three drift modes (doctor-first, hardcoded --base, missing heading) but omits the 'heading present, no fence' Err path. That error branch in first_run_command is unused by the positive test and unexercised by the negative control; future helper refactor that returns Ok('') on missing fence would silently pass.
- Confirm no-fence Err path in
first_run_commandis defined but never asserted by the negative control; future helper refactor returningOk("")on missing fence would still pass. - Confirm author did not run full
cargo xtask precommit; pinned 1.95 toolchain unavailable offline. Test-only diff passes focused tests under stable 1.97; hosted CI is the merge proof per author and prior reviewer.
Refuted
- first_run_command duplicates an existing markdown/fence scanner in product_copy or xtask, creating a second source of truth for fence parsing.; refuted because: product_copy already uses raw line scanning for traceability tests; there is no existing fence parser to duplicate. Helper is a single-purpose, non-pub, test-local function with one owner. Adding it to a shared util would be premature for two call sites.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Response to the github-actions review on 0517a51:
Not pushing a change, so the in-flight required Rust gate on this head stays valid. Generated by Claude Code |
CI Failure Diagnosis on Rust Gates (
|
…rdict (#8165) Ported verbatim from #8351 so this PR's required goldens check is not blocked by main's drift; no-ops once #8351 lands. Wording-only, check.json and human-full unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mi78XXkwyN6dJUkM2c6KyW
|
Second required-gate failure on 0517a51 is also main's, not this PR's: Rust tests now pass, but Ported its 8 wording-only re-blesses here as b6f9223 (merged current main too). Locally the drift report shows none of those fixtures; the offline sandbox cannot fetch 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.
Confirmed findings
- PR no-ops against #8351 once that lands; benign duplication of 8 fixture re-blessings. Author acknowledged and re-admitted as Draft->Ready. No blocker.
Verification questions
- Confirm negative control covers doctor-first/hardcoded --base/missing heading/no-fence but does not assert specific Err messages; future helper refactor returning Ok('') on missing fence would still pass.
- Confirm helper splits on '```' regardless of language tag and the negative control does not cover 'no fenced block' Err assertion.
- Confirm first_run_command picks the first fenced block regardless of language tag (
rust,text, etc.) — undocumented contract, slightly broader than the README/QUICKSTART use requires. - Confirm no-fence path is exercised in negative control; future Ok('') refactor would be caught by an explicit Err assertion, not just by structural drift. Author's third sub-case covers it.
- Confirm first_run_command splits on
without inspecting the fence language tag, so a straytext orrust block ahead of the intendedbash block would be selected as 'first' and could mask a regression if its first line starts withripr. - Confirm first_run_command splits on '
' without inspecting fence language tag, sotext/rust/console fences match equally.
Refuted
- A hardcoded
ripr check --base origin/maincould pass as the canonicalripr check.; refuted because: Negative control asserts that first_run_command returns something that =="ripr check"is false forripr check --base origin/main; equality check uses the full trimmed line. - Helper accepts any fence language tag (rust/text/bash), so a stray block could defeat parity; refuted because: Helper takes the first fence after the heading. README and QUICKSTART both lead with ```bash containing
ripr checkon line 1; no current stray block to bypass. Bypass surface is documented and benign for current docs; would surface as the literal first-ripr-line no longer being `ripr check`. - Helper duplicates the help_overview_has_one_canonical_first_run assertion surface and will drift independently of HELP parity.; refuted because: Helper is scoped to markdown (heading + first fence + first
ripr ...line), while the help test parses argparse output. Different artefacts, no shared state; parallel coverage of the same invariant via two surfaces is the intended design (#8164 item 3). - no-fence Err branch is unexercised by negative control; refuted because: Negative control at lines 326-328 explicitly feeds '## CLI First Hour\n\nripr check\n' (heading present, no fence) and asserts is_err(); this exercises the no-fenced-block Err path.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Requested by Steven · project thread
Before / After
Before: #8164 made HELP, README and QUICKSTART lead with
ripr check, and its issue ticks "automated parity check", but the only test (help_overview_has_one_canonical_first_run) reads the--helptext. README anddocs/QUICKSTART.mdcould drift back toripr doctor/ripr pilotor a hardcoded--basewith every gate green.After:
xtaskunit tests read the first fenced block after## The first useful run(README) and## CLI First Hour(QUICKSTART) and require the firstriprcommand to be exactlyripr check.What
Item 3 acceptance verification on current main (796c28d): HELP, README and QUICKSTART all lead with
ripr check; doctor is framed as setup diagnosis; pilot is framed as whole-repo exploration; clean-checkout guidance (edit a tracked file,git add -N PATH) appears in all three. The one missing piece was the README/QUICKSTART half of the parity test, added here.Tests are in
xtask/src/policy/product_copy.rs:readme_and_quickstart_lead_with_the_canonical_first_run(positive, real files).first_run_command_rejects_a_drifted_lead_command(negative control: a block that starts withripr doctor, a hardcoded--base, and a missing heading all fail).Proof
cargo +stable test -p xtask product_copy: 10 passed.cargo +stable fmt --check,check-traceability,check-static-language,check-file-policy,check-no-panic-family: pass.cargo xtask precommit. The pinned 1.95 toolchain could not install in this offline session, and stable 1.97 clippy flags 5 existing lints incrates/riprthat this PR does not touch. Hosted CI is the merge proof.Non-goals / rollback
No product behavior or doc text changes; test-only. Revert the commit to remove.
Generated by Claude Code