Skip to content

test(first-pr): pin --run-chain end to end for Python and TypeScript; disclose the check run (#11720) - #11970

Merged
EffortlessSteven merged 5 commits into
mainfrom
claude/run-chain-py-ts-e2e
Nov 1, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
claude/run-chain-py-ts-e2e

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Governing issue or accepted claim: #11720

Acceptance delta (one sentence): ripr first-pr --run-chain in a Python or TypeScript repository is now pinned end to end (check run, gap ledger, cards skipped, preview-limited verdict, fail-closed first step with a next step), and its cost disclosure names the check run and check.json it actually writes instead of a repo-exposure scan.

Established behavior (before this PR)

--run-chain is refused with --check-output, but in a Cargo-less Python or TypeScript repo it selects the check-output route on its own (uses_check_output_gap_ledger). Observed on fresh repos: step 1 ripr check --json > check.json, step 2 ripr reports gap-ledger --check-output, step 3 review cards "not run"; exit 0; packet is State: top gap with python_preview / typescript_preview evidence boundary. No repo-exposure report is produced. That behavior is correct; the failure path reuses the existing "stopped at step N ... run the printed command yourself" message, which already names the next step.

Wrong behavior fixed

The disclosure printed under --run-chain always said "repo-exposure scan" and listed repo-exposure.json as a write, which is false on this route. It now says "check run" and lists the check output path (--check-output or the default check.json).

Tests

  • run_chain_in_a_python_repo_runs_the_check_output_route, run_chain_in_a_typescript_repo_runs_the_check_output_route: fixture repos built in a temp git dir; assert disclosure, step labels, artifacts present/absent (no repo-exposure.json, no comments.json), preview static limit, non-missing packet state, rerun runs neither check nor ledger, and a failing first step exits 2 naming step 1/3 (check output) with the printed command to run, writing no packet.
  • Existing 8 first_pr_run_chain tests still pass (10 total).

Verification (local, head 7910b66)

  • cargo fmt --check, cargo clippy -p ripr --all-targets -- -D warnings: clean.
  • cargo test -p ripr --test first_pr_run_chain: 10 pass.
  • cargo xtask precommit: all check-* gates through check-user-text passed (incl. static-language, no-panic-family, allow-attributes, output-contracts, doc-artifacts, command-catalog, changelog-fragments, process-policy); the run hit its 30-minute background cap while the final lint stage waited on the shared cargo lock, so that stage was covered by the separate clippy run above.

Not verified

  • Windows; hosted CI; full workspace tests.

Generated by Claude Code

… end; disclose the check run it actually writes (#11720)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzVWk9FoK366FfhytUg
@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!

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 23:29
@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 31, 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 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: d3ffe7be-466e-47e6-83a5-13037958730f
Commits

Reviewing files that changed from the base of the PR and between 152a4e0 and 3d989d0.

Files selected for processing: 5
  • .ripr/traceability.toml
  • changelog.d/11720-run-chain-check-output-disclosure.md
  • crates/ripr/src/output/first_pr.rs
  • crates/ripr/src/output/first_pr/options.rs
  • crates/ripr/tests/first_pr_run_chain.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 7910b661), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (fresh-context reviewer, head 7910b66): REPAIR_REQUIRED

Inspected:

  • The candidate's whole change: three files over base 56444f1605fa1431054375f9b232c37f72ede436 - crates/ripr/src/output/first_pr.rs (+22/-7), a new integration test file crates/ripr/tests/first_pr_run_chain.rs (+162/-0), and changelog.d/11720-run-chain-check-output-disclosure.md (+2/-0).
  • What the change fixes. print_side_effect_disclosure used to print a fixed cost class and a fixed first artifact for the --run-chain route: "runs analysis for each missing artifact (repo-exposure scan, gap ledger, review cards)" and "writes to: each missing artifact (target/ripr/reports/repo-exposure.json, ...)". But a Cargo-less Python or TypeScript root takes the check-output route instead - uses_check_output_gap_ledger selects it - and that route writes check.json from a ripr check --json run, never a repo-exposure scan. So the disclosure named an artifact the run does not write. This is a false-confidence surface of exactly the kind the product contract warns about: a stated contract that exceeded its real enforcement. Fixing it is right, and the fix is small and well-targeted.
  • The fix is correct in the feature-enabled case. The disclosure now computes uses_check_output_gap_ledger(resolve_path(repo, &options.root)) and, when it holds, prints "check run, gap ledger, review cards" and names options.check_output.as_deref().unwrap_or(DEFAULT_CHECK_OUTPUT); otherwise it keeps the old repo-exposure wording. The root is the same one the run uses - first_pr resolves resolve_path(&repo, &options.root) at :191 and passes the same expression into the disclosure at :184 - and resolve_path (:3354-3369) handles an absolute --root by using it as-is and a relative one by joining onto the repo root, then normalising components, so the two cannot disagree. The named artifact also matches the run: the run distinguishes "not given" with options.check_output.is_none() (check_output_gap_ledger_command(options, options.check_output.is_none(), false), :3104), and the disclosure's unwrap_or(DEFAULT_CHECK_OUTPUT) names the default exactly in that case. The Python run in the hosted log confirms the production path end to end: the disclosure printed "cost class: runs analysis for each missing artifact (check run, gap ledger, review cards); scales with repository size" and "writes to: each missing artifact (target/ripr/reports/check.json, target/ripr/reports/gap-decision-ledger.json, target/ripr/review/comments.json)", and step 1 was "run-chain step 1/3: check output: ripr check --root ... --base main --json > .../target/ripr/reports/check.json". The production fix does what it claims.
  • The hosted state at this head, and the reason for the disposition. The Rust-only feature lane job 124689607430 failed, so Ripr Rust Small Result - the required status check on main - is FAILURE, and the pull request is CONFLICTING / DIRTY against its base. The lane's log names the failures: run_chain_in_a_python_repo_runs_the_check_output_route (panicked at crates/ripr/tests/first_pr_run_chain.rs:426) and run_chain_in_a_typescript_repo_runs_the_check_output_route (panicked at crates/ripr/tests/first_pr_run_chain.rs:431). Both are the two tests this pull request adds.
  • Why they fail, from the log. The Python case: the disclosure is right, then the run fails with "ripr: Python project markers were detected, but this ripr binary was built without Cargo feature lang-python; use a Python-enabled ripr binary or add ripr.toml with [languages] enabled = [\"rust\"] to keep Python preview disabled", and the chain stops at step 1 with exit 2. The assertion at :426-430 is assert!(output.status.success(), ...), so the test fails on the exit code, not on the disclosure. The TypeScript case is the more instructive one: the disclosure printed "repo-exposure scan, gap ledger, review cards" and "target/ripr/reports/repo-exposure.json" - the old wording - so the change did not engage at all, and the assertions at :431 and :435 fail. The reason is in the shared predicate: uses_check_output_gap_ledger (:3082-3085) is !root.join("Cargo.toml").is_file() && (detect_python_project(root) || detect_typescript_project(root)), and detect_typescript_project is mirrored as an inert false when the lang-typescript feature is off (crates/ripr/src/config.rs:74-83: "Without lang-typescript no-config detection never selects the adapter, ... so these inert forms keep the shared call sites unconditional"). In a lane whose binary is built without that feature, the predicate is false, the disclosure takes the repo-exposure branch, and the test's expectation that the check-output route is used cannot hold.

Blocking:

  • The pull request's own two new integration tests fail in the lane that runs them, and they fail because the new test file is not gated on the Cargo features whose presence its assertions require. crates/ripr/tests/first_pr_run_chain.rs is an integration test of the ripr crate and is compiled and run by the Rust-only feature lane, whose binary does not carry lang-python or lang-typescript. The two new tests assert behaviour that only exists when those features are on: the Python one needs the Python adapter to be available for the check run to succeed, and the TypeScript one needs detect_typescript_project to be live rather than mirrored as false. The fix has three honest shapes and the pull request should pick one deliberately: gate the feature-dependent assertions behind the feature (a #[cfg(feature = "lang-python")] / #[cfg(feature = "lang-typescript")] gate on the two tests, or a feature gate on the file), run these tests in a feature-enabled lane instead of the Rust-only one, or make the assertions tolerant of the feature-disabled behaviour so the lane stays green. What cannot stand is the present state, where the new tests are red in the lane that executes them and the required status check is FAILURE because of them.
  • This is candidate-attributable, not inherited. The failing tests are new in this pull request - the whole crates/ripr/tests/first_pr_run_chain.rs file is a +162-line addition - and they fail on the pull request's own assertions. That is the difference from the rest of the lane's red, which I address below.
  • One landing-readiness item, not a candidate defect: the branch is CONFLICTING / DIRTY against its base, so it cannot land as it stands regardless of the test repair.

Non-blocking:

  • The third failure in the same lane is not in this pull request's diff: lsp::backend::list_actionable_items_tests::list_actionable_items_names_gaps_the_actionable_profile_hides panicked at crates/ripr/src/lsp/backend.rs:12891 on a snapshot comparison whose hidden_gap_count is 2. The pull request touches only first_pr.rs and its new test file, so this is outside its change; I did not establish whether the base is also red for it, and I am therefore not attributing it either way. It is worth confirming separately, because a lane that is red for two different reasons at once is hard to read as evidence.
  • The disclosure is printed before any filesystem write, and the predicate it consults only depends on project markers, so the disclosure cannot disagree with what the run later does about markers. That is a property worth keeping: it is what makes a pre-write disclosure trustworthy. I checked it rather than assuming it.
  • On efficiency - the one dimension of this change worth stating precisely. uses_check_output_gap_ledger is not a cheap predicate. It starts with a Cargo.toml stat, and then calls detect_python_project (crates/ripr/src/config/python.rs:126-133), which stats the Python project markers and then scans the source directories for Python source, and detect_typescript_project (crates/ripr/src/config/typescript.rs:140-142), which calls detect_typescript_package_root(root, false) || detect_nested_typescript_package(root) - the second of which searches for nested package roots. So one evaluation can traverse directories, not merely stat a few files. That predicate is evaluated at eleven places in first_pr.rs - :296, :720, :1832, :1980, :2098, :2268, :3031, :3069, :3133 and the definition at :3082, plus the test assertions at :8662 and :8667 - and this pull request adds a twelfth, in the disclosure path, before any artifact is written. The marginal cost of this change is therefore one extra directory-traversing evaluation per ripr first-pr --run-chain invocation, which is small next to the eleven that already happen. The structural observation is the repetition: the same traversal is recomputed from scratch at a dozen sites for one command, and nothing the command writes between them is a project marker, so the answer cannot change during the invocation. Evaluating it once and threading the boolean would remove the repeated traversal entirely. I am not asking for that inside this pull request - it would widen the diff well past a disclosure fix - but this is the moment to notice it, because the change adds to the count rather than reducing it, and the next caller of the predicate will do the same.
  • The scope discipline in the pull request body is good and worth keeping: it separates what is delivered from what is left, names the issue for each item it defers, and gives a reason for each deferral rather than a plan. The "Established behavior (before this PR)" section records what was observed before the change, which is what makes a disclosure fix falsifiable rather than assertive.
  • The changelog fragment changelog.d/11720-run-chain-check-output-disclosure.md uses <!-- section: Fixed -->, a single - bullet at column 0 and the (#11720) reference, which satisfies xtask/src/policy/changelog_fragments.rs:237-275. Fixed is right: the disclosure previously named the wrong artifact, and this corrects it.

Not run:

  • The Rust toolchain on this host is not on PATH: I ran no test, clippy, fmt, or cargo xtask gate. Every gate result above is a hosted job log or check-run conclusion read at this exact head, with the newest-run-wins rule applied.
  • The hosted Rust qualification did not succeed at this head: the Rust-only feature lane failed on the pull request's own new tests, and the routed Ripr Rust Small on GitHub Hosted / Rust gates job and the Windows Advisory subset were still in_progress when I read them. A feature-enabled lane's result for the new tests is unobserved.
  • I did not run the new tests in any feature configuration, so I am reporting the failure as the hosted lane reports it and not asserting that the tests would pass with lang-python and lang-typescript enabled - the TypeScript disclosure's repo-exposure wording in the log is evidence that the feature gate changes that branch, but I did not observe the feature-enabled run.
  • I did not run a combined-tree compile of the merged base and head.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 7910b661adcf8a942b93c59a7989385c6075935d. Not an approval.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzVWk9FoK366FfhytUg

@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

  • A custom absolute --check-output path is printed verbatim beside repository-relative artifact paths, potentially misstating its location.
  • crates/ripr/src/output/first_pr.rs:311 — The check-output route now prints the raw --check-output value beside repository-relative artifact paths. If that option is absolute, the disclosure presents it as though it were repository-relative; relative custom paths are also not resolved against the configured root/out directory. Resolve and format the path consistently with the other writes, and add a custom-path assertion.

Verification questions

  • Confirm the source now discloses options.check_output or check.json, but the added tests cover only the default output path.
  • Confirm the disclosure selects the check-output artifact using the same route predicate used to select the gap-ledger route, while the repo-exposure branch remains the fallback.
  • Confirm the added integration coverage exercises Python and TypeScript route selection, disclosure, rerun behavior, artifacts, and fail-closed failure handling.
  • Confirm the added integration tests do not exercise --run-chain with an explicit --check-output value, including an absolute path.

Evidence gaps

  • The review packet has no completed cargo-test receipt, and the ripr sensor failed with exit code 2.
  • Model proof intent was rejected by deterministic validation.
  • The Python and TypeScript tests are independently feature-gated, but the shared late cargo-test receipt is absent and the PR body reports only the aggregate 10-test result.
  • The seeded prior review reports REPAIR_REQUIRED, but its explanation is truncated and no corresponding review comment or current-diff rebuttal is available.
  • The PR-body verification claims are not fully backed by the shared automated receipts.

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (fresh-context reviewer, head 3093f34): REVIEW_INCOMPLETE

This is a re-bind. An independent review already exists on this PR bound to 7910b661adcf8a942b93c59a7989385c6075935d, which reported REPAIR_REQUIRED with one blocking finding. The head has since moved. This review covers the delta and states, per earlier finding, whether it still holds, has been repaired, or is stale. It does not supersede the earlier review; it binds to the head below.

Inspected:

  • Head 3093f3452365b31ae5e034208d1c6b37f3cbe3f4; not draft; mergeable: MERGEABLE, mergeStateStatus: BLOCKED; label merge-ready present; title "test(first-pr): pin --run-chain end to end for Python and TypeScript; disclose the check run (#11720)".
  • The delta 7910b661a..3093f3452 is one path, +147/-0: crates/ripr/tests/first_pr_run_chain.rs. crates/ripr/src/output/first_pr.rs and changelog.d/11720-run-chain-check-output-disclosure.md are byte-identical to the previously reviewed head, so the production change is unchanged and the delta is test-only.
  • The candidate's contribution against merge base ad8b265b821f2380f15cb6ea859214b46b2c9788 remains 3 paths: changelog.d/11720-run-chain-check-output-disclosure.md (+2/-0), crates/ripr/src/output/first_pr.rs (+29/-7), crates/ripr/tests/first_pr_run_chain.rs (+168/-0).
  • The feature gating now in the test file at this head, read from source: #[cfg(feature = "lang-python")] on fresh_python_repo (:350), #[cfg(feature = "lang-typescript")] on fresh_typescript_repo (:389), #[cfg(any(feature = "lang-python", feature = "lang-typescript"))] on preview_repo (:491), #[cfg(feature = "lang-python")] on python_repo (:533), #[cfg(feature = "lang-typescript")] on typescript_repo (:548) and on assert_preview_chain (:563), #[cfg(feature = "lang-python")] on run_chain_in_a_python_repo_runs_the_check_output_route (:648) and #[cfg(feature = "lang-typescript")] on run_chain_in_a_typescript_repo_runs_the_check_output_route (:654). At the previously reviewed head none of those seven items carried a #[cfg] attribute — I read the previous file rather than inferring it.
  • The disclosure oracle survives the repair. assert_preview_chain (:568) still asserts stdout.contains("(check run, gap ledger, review cards)") (:577), stdout.contains("(target/ripr/reports/check.json, ") (:581) and !stdout.contains("repo-exposure") (:584), and I confirmed by whole-tree search that these three substrings occur nowhere else at this head. The two new tests (run_chain_on_a_fresh_python_repo_reaches_a_non_missing_state :433-435 and run_chain_on_a_fresh_typescript_repo_reaches_a_non_missing_state :462-464) are additional coverage; they do not replace the disclosure assertions.
  • crates/ripr/src/output/first_pr.rs at this head: uses_check_output_gap_ledger is defined at :3082 and called at nine sites — :296, :720, :1832, :1980, :2098, :2268, :3031, :3069, :3133.
  • Hosted evidence at this head (56 contexts): Rust-only feature lane (job 124694468029) FAILURE — 12,885 passed, 1 failed; Ripr Rust Small on GitHub Hosted / Rust gates (job 124694628534) FAILURE — PRECOMMIT_RESULT: failure with xtask: check-policy-all: 1 gate(s) failed: check-process-policy; Ripr Rust Small Result (the required status check on main) FAILURE and present; Test Analytics SKIPPED; Admit PR Candidate, Route Ripr Rust Small, Detect Docs-Only Surface, cargo-deny, Security, Printed Command Paste, Windows Advisory, ub-review, Graphite / AI Reviews, Graphite / mergeability_check, GitGuardian Security Checks, CodeRabbit (NEUTRAL) SUCCESS.

Earlier findings, re-disposed:

  • Blocking — "the pull request's own two new integration tests fail in the lane that runs them, because the new test file is not gated on the Cargo features whose presence its assertions require" → REPAIRED, and verified from the hosted lane rather than from the diff. The earlier review offered three honest shapes and said the PR must pick one; this candidate picked the first — "gate the feature-dependent assertions behind the feature" — and did it at every site that needed it, not just on the two test functions. The hosted Rust-only feature lane at this head reports test result: FAILED. 12885 passed; 1 failed with the single failure being lsp::backend::list_actionable_items_tests::list_actionable_items_names_gaps_the_actionable_profile_hides; the two preview-language tests no longer appear at all, because in a binary built without lang-python/lang-typescript they are now compiled out rather than executed and failed. The earlier finding's two "one landing-readiness item, not a candidate defect" notes are also resolved: the branch is now MERGEABLE against its base, not CONFLICTING/DIRTY.
  • Non-blocking — "the third failure in the same lane is not in this pull request's diff" → STILL HOLDS, and is now the only failure in that lane. list_actionable_items_names_gaps_the_actionable_profile_hides panics on a snapshot comparison in crates/ripr/src/lsp/backend.rs; this candidate's contribution is three paths and contains no crates/ripr/src/lsp/backend.rs and no analyzer source at all, so a snapshot of the actionable-items ordering cannot be affected by it. I did not re-establish whether the base is also red for it at this exact commit, so I attribute it as outside the candidate's diff rather than as a confirmed base red.
  • Non-blocking — "the disclosure is printed before any filesystem write, and the predicate it consults only depends on project markers, so the disclosure cannot disagree with what the run later does about markers" → STILL HOLDS and is unchanged by the delta. The production side of the PR is byte-identical to the previously reviewed head, so nothing about the disclosure's ordering moved.
  • Non-blocking — "CORROBORATES the author's rebuttal of the github-actions 'focused proof failed (exit 101)' item" → still holds. xtask/tests/ still contains no public-proof.rs, so cargo test --package xtask --test public-proof still cannot resolve a target; exit 101 is a bad invocation, not a source failure.
  • Non-blocking — "the scope discipline in the pull request body is good" and "the changelog fragment satisfies the fragment policy and Fixed is the right section" → unchanged. The fragment is byte-identical to the previously reviewed head.

Blocking:

  • None attributable to this candidate. The earlier blocking defect is repaired and the repair is verified against the hosted lane at this exact head.

Non-blocking:

  • The required Rust lane is red at this head, and neither red is the candidate's. Ripr Rust Small Result is present and FAILURE. Ripr Rust Small on GitHub Hosted / Rust gates failed at check-process-policy — the known base-side orphan for use std::process::Command in crates/ripr/src/output/first_pr/run_chain.rs at main tip a69bf0214 (job 124707375551; repair carrier #11975). That file is outside this candidate's three-path contribution, so the gate cannot be affected by it. The Rust-only feature lane's single failure is the LSP snapshot test above, also outside the contribution. The consequence for the candidate is not a red it caused but a thin lane: the fail-fast chain stopped at check-process-policy, so ALL_FEATURES_CHECK_RESULT: skipped — the cargo check -p ripr --all-targets --all-features step at .github/workflows/rust-gates.yml:242 — never ran either.
  • The PR's own oracle is compiled only under features that no lane exercised at this head. The disclosure assertions live in assert_preview_chain, which is now #[cfg(any(feature = "lang-python", feature = "lang-typescript"))]. The only workflow that runs the suite with those features is Test Analytics (.github/workflows/test-analytics.yml:68, cargo nextest run --workspace --all-features --profile ci), and its job gate (:24) fires only for a merge-ready label event, a full-ci label, or a push to main; at this head it is SKIPPED. So at this head the feature-gated code was neither compiled (the all-features check was skipped) nor executed (the all-features lane was skipped). The repair is correct and the lane is now green where it failed, but the behaviour this PR exists to pin is currently unexercised — the green Rust-only feature lane proves the gating works, not the disclosure. Removing and re-adding merge-ready would schedule both the all-features compile and the all-features suite; that is the remedy, and until it runs the correct statement about this PR's production change is "verified by source reading, not by an executed test".
  • Duplicate-cluster note, resolved by content rather than by the shared issue number. Issue #11720 groups #11970 with #11975 and #11960. At their current heads #11975 (6fca309b1) and #11960 (e0e853d23) both carry crates/ripr/src/output/first_pr.rs blob fd7ba55d2, byte-identical to main's — neither changes that file. #11970 carries blob 54f3c049d. So #11970 is the only member of the cluster that touches the run-chain disclosure, and the cluster is not a duplicate set: #11975 is the check-process-policy repair and #11960 is a separate claim that happens to cite the same issue. No survivor decision is needed against this PR.
  • Efficiency — the change adds a directory-traversing predicate evaluation rather than removing one. uses_check_output_gap_ledger is not cheap: it stats Cargo.toml, then calls detect_python_project (which stats the Python project markers and scans the source directories for Python source) and detect_typescript_project (which calls detect_typescript_package_root or detect_nested_typescript_package, the latter searching for nested package roots). One evaluation can therefore traverse directories, not merely stat a few files. This PR's disclosure path is one of the nine call sites at this head (:296, :720, :1832, :1980, :2098, :2268, :3031, :3069, :3133), so the marginal cost of the change is one extra directory traversal per ripr first-pr --run-chain invocation. The structural observation is the repetition rather than the increment: the same answer is recomputed from scratch at nine sites for one command, and nothing the command writes between them is a project marker, so the value cannot change during the invocation. Evaluating it once and threading the boolean would remove the traversal entirely. I am not asking for that inside this PR — it would widen a disclosure fix well past its scope — but this is the moment to notice it, because the count went up rather than down and the next caller will do the same.
  • Efficiency — the two new helpers leak a temporary git repository per test. fresh_python_repo (:351) and fresh_typescript_repo (:390) each build a complete throwaway repository: git init -b main, git add -A, a base commit, git checkout -b feature, a second commit, and a src/ and tests/ tree. Neither helper nor either new test removes the directory. The file's only remove_dir_all calls (:176, :627) remove root.join("target"), and the new tests do not even do that, so each feature-enabled test run leaves two full temporary git worktrees — including their .git directories — in the system temp dir, uniquely named per process id and counter so they never collide and never get reused. On a CI runner whose temp directory is not reset between jobs that is a small but strictly accumulating cost, and it is new with this delta. Removing the root at the end of each test (or pointing the helpers at a per-test subdirectory that is removed) would make the new coverage cost-neutral.

Not run:

  • The Rust toolchain on this host is not on PATH, so there was no local build, no cargo xtask precommit, no local test run, and no way to execute the feature-gated tests here. Every Rust-level statement above comes from the hosted job logs at this exact head or from reading source at this exact SHA.
  • The feature-enabled behaviour is unobserved at this head. I did not observe the two preview-language tests pass or fail under lang-python/lang-typescript, and the hosted evidence at this head does not contain such a run either. I am reporting the gating as correct by source reading, and the Rust-only lane as green where it previously failed because the lane says so.
  • The hosted Rust phase beyond the Rust-only lane is unobserved at this head: the shards, goldens, fixtures, clippy and all-features steps were skipped after the fail-fast, so this review does not rest on them and does not claim they passed.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 3093f3452365b31ae5e034208d1c6b37f3cbe3f4. Not an approval.

Keep main's run-chain timeout tests and Python/TypeScript e2e (#11924, #11960); keep this PR's disclosure-parity tests alongside.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG

Copy link
Copy Markdown
Member Author

Review of record, head 673e4cbf534eef3bdc4c59e309a9164b1eefe260.

Angles inspected (full diff read): semantic owner, test stimulus and oracle, changelog fragment, docs/output parity.

  • Owner: print_run_chain_disclosure in output/first_pr.rs now branches on the existing uses_check_output_gap_ledger(root) (the same predicate the chain itself uses), so the disclosure names check run and check.json exactly when the chain runs the check route. Root is resolved against the repo before the predicate runs. Rust path text unchanged.
  • Tests: two feature-gated end-to-end tests (Python, TypeScript) build a real git repo with a base and a feature commit and run first-pr --run-chain. They assert the disclosure text, absence of repo-exposure, the artifacts written and not written, the preview-limit state, the rerun behavior (step 1/1) and the failing-first-step stop with exit 2. The negative assertions (!contains("repo-exposure"), repo-exposure.json absent) would fail on the old disclosure.
  • Changelog fragment 11720-...md carries (first-pr: add opt-in --run-chain that executes the missing-artifact chain in one invocation (default stays analysis-free) #11720). No docs/golden surface changes.
  • Checks: Ripr Rust Small Result success on this exact head; default features include lang-python and lang-typescript, so the shards compile and run the gated tests. The cancelled Rust-only feature lane / CI run is not a required check and was superseded by the Rust Small run on the same head; no unresolved review threads.

Findings: none material. Merging on this head.


Generated by Claude Code

@devin-ai-integration devin-ai-integration 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.

Devin Review found 2 potential issues.

Devin Review

Comment thread crates/ripr/src/output/first_pr.rs Resolved
Comment thread crates/ripr/src/output/first_pr.rs Resolved
…cile help (#11720)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG

Copy link
Copy Markdown
Member Author

Review of record, head 3d989d0 (COMMENT disposition; self-authored lane).

Inspected: the full diff (first_pr.rs disclosure branch, first_pr/options.rs help, first_pr_run_chain.rs, traceability, changelog fragment).

  • Semantic owner: print_run_chain_disclosure now takes the resolved root and uses the same predicate (uses_check_output_gap_ledger) that selects the check-output route, so the disclosure cannot disagree with the route actually run. Non-preview roots keep the repo-exposure wording.
  • Stimulus/oracle: the two new tests build real git repos (Python, TypeScript), run first-pr --run-chain, and assert the disclosure text, step labels, artifacts present (check.json, gap ledger, start-here) and absent (repo-exposure.json, comments.json), the preview static limit, a non-missing packet state, a no-op rerun, and a fail-closed first step with exit 2 and the printed command. Discriminating negative: !stdout.contains("repo-exposure").
  • Docs/parity: help text reconciled in 3d989d0 (review thread); changelog fragment 11720-run-chain-check-output-disclosure.md ends in (first-pr: add opt-in --run-chain that executes the missing-artifact chain in one invocation (default stays analysis-free) #11720); the new tests are registered in .ripr/traceability.toml.
  • Findings: two review threads (traceability, help text), both valid, repaired in 3d989d0, replied and resolved; zero unresolved threads confirmed.
  • Evidence on this exact head: Ripr Rust Small Result completed/success, all 4 test shards and verify green, mergeable_state clean. Not run locally: Rust build (no toolchain on the authoring box); hosted CI is the compiler.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 7f2aada into main Nov 1, 2026
67 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/run-chain-py-ts-e2e branch November 1, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants