Repository navigation
fix(python): fail repo-mode Python findings closed for repair routing - #9923
Conversation
…#5531) Repo-mode Python findings are shaped like diff-mode ones, but the capability table registers Python repair_routing for diff mode only. Stamp repo findings with the analysis_scope: repo evidence line and gate python_repair_card on the capability table (framework-agnostic lookup), so a repo-scoped finding never yields a repair card, ledger gap record or human 'apply the suggested test' route. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsjwSbvSPQdZfNsK689oNn
|
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 28 minutes. View limit details
Comment |
There was a problem hiding this comment.
Verification questions
- Confirm the behavioral test named for absence of a ready signal actually allows an explicit false value, weakening the stated public-contract proof.
- Confirm tests cover the diff control and repo JSON/human behavior, including readiness suppression.
- Confirm the promised absence of a gap-ledger repair record is not directly asserted by the new integration tests.
- Confirm repo-mode production evidence stamps every emitted finding with the shared analysis_scope: repo marker.
- Confirm repo evidence is stamped before insertion, but duplicate stamps are possible if an upstream finding already contains the same scope line; this is currently non-fatal because detection is existential.
- Confirm the repo producer stamps every finding in build_production_file_evidence, including the suffix path, before insertion; the tested fixture covers a Python production finding.
- Confirm the shared repair-card owner now resolves diff versus repo capability before constructing a Python card.
Refuted
- A broad ready-signal assertion could hide a useful distinction between absent and false readiness.; refuted because: The claim concerns accidental promotion rather than output precision: the test rejects only ready=true, while separately rejecting any non-null repair card. That is sufficient for this fail-closed repair-routing contract.
- This change risks stale active-view lengths, resize/detach behavior, or transfer-related aliasing.; refuted because: The changed Rust files contain no ArrayBuffer, TypedArray, resizable buffer, detach, transfer, mutable backing-store, or cached-length logic. Unsafe-review reported no new gaps or worsened unsafe/native risks.
- The tests prohibit ready=true but not ready=false, so they do not establish whether the intended public shape omits the signal or explicitly reports fail-closed readiness.
- A separate Python card owner needs a second scope-specific guard.; refuted because: The supplied patch identifies python_repair_card as the shared owner used by JSON/human/SARIF and gap-ledger output; no actionable sibling bypass appears in the bounded packet.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
) Drop vacuous ready assertion and debug print, reword the no-ledger-record overclaim, add a python_repair_card unit test with positive control, and note repo-mode Python scope in LANGUAGE_ADAPTER_PREVIEW. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsjwSbvSPQdZfNsK689oNn
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Source review complete for 9cb52f8d7dfaff579853e718637f4bc375633223; final merge disposition remains REVIEW_INCOMPLETE while the admitted qualification runs finish.
The Python ledger-omission hypothesis was independently checked and not reproduced. A real check_workspace_repo_with_config run using this PR's Stock.reserve / pytest fixture produced 3 findings and 3 advisory ledger records. The weak predicate finding remained discoverable at src/pricing.py:3 as StaticLimitation / python_repair_card_unavailable, linked by its original finding ID. It carried no repair route, verification command, receipt command or safe-gate predicate. Agent, PR-comment, gate, LSP and badge authority projections were all ineligible. Production first-PR JSON and Markdown retained the named limitation, returned no_action / no_actionable_gap, and emitted no agent-packet command. Suppressing repair cards does not suppress this advisory record.
Evidence:
- On requested head
082e4fe8f3957d80d4839a252c9615a8bc0270ac: 3 new integration tests and 25 capability/Python-ledger/first-PR controls passed. - A separate review-owned, test-only experiment fed the real repo JSON through
build_gap_decision_ledger_reportand the production first-PR renderer: 1 passed. Its patch SHA-256 isabf8bb27bdfa5716ec7e1e988ac073312bf20dfda2a8c0b0f291db0d50918398. The relevant producer, card, ledger, first-PR, human-guidance, JSON-renderer and check-entrypoint production blobs are unchanged between the requested head and this reviewed head, so this consumer result remains applicable. - On reviewed head
9cb52f8d:cargo test --locked -p ripr --lib -- python_repo_mode_repair_failclosed language_capability python_no_repair_card python_finding_without_repair_card repo_scoped_python_finding_gets_no_repair_card --nocapture: 29 passed, 0 failed.cargo fmt --all -- --check: exit 0. - The new carded-versus-repo-stamped control and existing diff control distinguish unsupported repo routing from supported diff routing. Python never enters the TS/JS/Perl-only
preview_actionability_forpath; removing the former Python ready-signal assertion correctly narrows that claim. - Source-only composition with main
ef92041be68dc921f4c3b114aa9ed121a48c24f6was conflict-free, tree87088accb7228597ef6517b5f81cdbab967e3582. This is not execution or hosted qualification of that composition.
Non-blocking [P2]: the retained human/ledger/first-PR explanation currently says “test placement or related-test evidence is incomplete.” This fixture has a concrete discriminator, selected pytest node and high-confidence verify command; the actual refusal is the absent Python repo repair-routing cell. A follow-up at human/triage.rs::python_preview_safe_action and gap_decision_ledger.rs::gap_record_from_python_no_repair_card_finding should name the scope/capability refusal while preserving the advisory row and absent authorities. Confidence: high from the rendered consumer experiment. No Python omission or actionable-routing bypass was established.
Ownership / dependencies: retain the existing Python candidate owner and branch. Source composition with #9896 head 81a9fcb74f08100640a993f63e896bfcb0468dd1 conflicts in domain/language_capability.rs. Whichever owner lands second must reconcile the shared scope/state helpers and obtain fresh composed proof; preserve TS/JS cell_state restricted to framework any and Python's separate any-framework query. No sibling implementation or review was changed by this pass.
Validation limits: the author's 3,437 passes and precommit/Clippy claims remain reported evidence for their recorded subjects, not full-workspace or hosted qualification. Earlier ub-review run 39895856575 was wrapper-green but had a failed ripr sensor, cargo-test timeout and rejected proof intents; it is not a full proof pass. Current qualification request 39899545699 and other current-head runs are still in flight. Protection-read verification is unavailable in this execution environment: the read-only classic-review-protection request returned Forbidden; no retry or alternate route was used.
Next: owning delivery lane inspects terminal current-head qualification and current review concerns, confirms applicable protections/ownership and serial landing order, then makes the final merge judgment. No merge clearance is issued here.
There was a problem hiding this comment.
Verification questions
- Confirm repo-mode JSON/human card suppression is tested, but the claimed gap-ledger repair-record absence is not directly asserted.
- Confirm repo JSON test checks non-null card absence; it would accept an explicit null and does not assert readiness is absent or false.
- Confirm python_repair_card treats every unstamped finding as Diff; safety therefore depends on every repo producer stamping the exact evidence line before shared consumers run.
- Confirm the stated absence of a gap-ledger Python repair record is inferred from card absence, not directly exercised.
- Confirm repo JSON test accepts a missing ready field or null and does not assert readiness is explicitly false.
- Confirm repo-mode scope stamping is exercised through the production finding route, while capability lookup is separately unit tested.
Refuted
- The capability-gate change could create unsafe pointer or aliasing behavior while resolving framework-agnostic cells.; refuted because: CAPABILITY_CELLS is static immutable data and the helper uses ordinary iter/cmp operations; all lifetimes remain tied to existing references and no unsafe code is added.
- No planned evidence is missing, so exact-head behavior is fully proved.; refuted because: The shared context reports cargo-test as scheduled-late, and ripr itself failed with exit 2, so test results should remain an explicit broker-owned proof obligation.
- The change crosses an unsafe JS/worker/async lifetime boundary.; refuted because: The patch adds an owned scope-evidence String and synchronous capability lookups over static capability cells. It creates no JS value, future, channel, worker payload, raw handle, transferable object, or detached reference.
Evidence gaps
- Late cargo-test and failing ripr receipts leave exact-head behavioral confirmation dependent on the gate.
- Model proof intent was rejected by deterministic validation.
- The gap-ledger claim is documented but not directly asserted by the new integration tests.
…nded) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsjwSbvSPQdZfNsK689oNn
|
Owner / governing claim: existing #9923 Python candidate lane / #5531. No candidate-branch writes or duplicate campaign were made by this independent review. Candidate: Review: bounded exact-head inspection. The Python ledger omission was not reproduced: real repo findings remained advisory and discoverable in ledger and first-PR with repair authorities off. The later automated verification questions are reconciled as follows: the review-owned consumer experiment directly exercised ledger/first-PR projection; Python does not enter Validation: all observed current-head workflows are terminal. Required Result and Rust gates succeeded. The logs establish actual checkout Dependency: #9896 has now landed as main Next / owner / resume condition: existing Python owner reconciles current main into this same candidate, retains one copy of the shared scope/state helpers, preserves TS/JS Access blocker: read-only |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Disposition: REPAIR_REQUIRED for integration; no merge clearance. Independent closer pass on 9cb52f8d7dfaff579853e718637f4bc375633223 (tree 83cc13e62339a26e787cbe2e1bbf60949c27758b), against live main afc6054df495aa59cabf17560f06698e8e57077e. The existing candidate and Python repair owner retain custody.
Observed source: read the complete seven-file candidate delta and followed the sole native Python repo finding insertion through analyze_repo_with_limit, shared python_repair_card, JSON, human, GitHub, SARIF, pilot, and advisory ledger/first-PR consumers. Scope stamping occurs after ID suffixing and before insertion. Unsupported repo routing is rejected at the shared card owner; supported diff routing retains its existing placement/discriminator checks. Typed SourceCurrentness and the existing base-side refusal are unchanged. Analysis scope itself remains the documented free-text analysis_scope: repo marker; this review does not claim a typed analysis-scope field.
Observed qualification: run 39899545699, Rust job 120237875269 and Result job 120249430280 succeeded. Actual checkout in the logs is 90605ea28b7efe5c4a5d911729cf3239a2120864, merging this head into ba70e9a43e68d8bf8840c85bec51e011b8380b68. Nextest ran 19,690 tests, all passed, five skipped; ripr doctests two passed, one ignored. The three real API/render integration controls, capability control, and repo-stamped/carded unit control are individually present as PASS. These are existing receipts, not new execution or proof of a repaired combined tree. The ub-review wrapper pass still includes ripr sensor exit 2, cargo-test timeout, and rejected/unexecuted proof intents.
Integration blocker reproduced without touching any worktree: git merge-tree --write-tree afc6054df495aa59cabf17560f06698e8e57077e 9cb52f8d7dfaff579853e718637f4bc375633223 exits 1, conflict in crates/ripr/src/domain/language_capability.rs; conflicted tree 146b83dfb6f92b5513def1e65023071d0144f95b. Main's intervening #9925 changes only init help and does not deliver this Python claim. Fresh connector inventory has zero inline threads and only COMMENTED reviews; no approval is inferred.
Continuation: existing Python owner reconciles the shared helpers in this same candidate, preserving TS/JS framework-any cell_state and Python's separate any-framework query, then supplies the repaired frozen head for affected composed proof, independent review and required qualification. Retain the earlier advisory-ledger/first-PR evidence and scope-specific explanation follow-up from the prior review.
Access limits: the prior classic review-protection denial remains stopped. This pass's distinct active-rules read and CLI GraphQL PR-state read also returned Forbidden; neither was retried. Available connector reads supplied PR/review state. No approval requirement or absent protection is inferred from unavailable policy reads. No candidate writes, test/build/CI starts, thread resolutions, merge attempt, or changes to sibling work occurred.
There was a problem hiding this comment.
Confirmed findings
- Repo findings are stamped before insertion, and shared card construction rejects Python repair routing when the registry has no repo-mode cell.
Verification questions
- Confirm the integration test proves no non-null card, but does not require the public field to be absent rather than null.
- Confirm the new integration tests exercise the production repo route and shared human output, but do not directly assert gap-ledger behavior or every emitted repo finding is stamped.
- Confirm the helper is framework-agnostic and fail-closed, but it intentionally treats any established framework cell as sufficient for the mode.
- Confirm the integration suite distinguishes diff-mode card presence from repo-mode suppression, but accepts either a missing card or an explicit null JSON value.
- Confirm repo JSON test rejects only non-null repair cards and does not assert the field is absent or readiness is explicitly false.
- Confirm the new JSON test accepts an explicit null card and does not directly assert that readiness or repair-authority fields disappear.
- Confirm repository-wide absence of other Python repo finding producers or consumer paths was not established by the supplied lane packet; the default-else behavior makes missing scope evidence a safety boundary.
- Confirm repo-mode production findings are stamped before insertion, after optional ID suffixing, so the shared consumer can identify them as repo-scoped.
- Confirm every unstamped Python finding defaults to diff mode, so a missed producer stamp can incorrectly enable repair routing rather than failing closed.
- Confirm the shared Python repair-card owner resolves analysis scope and fails closed when no established repair-routing cell exists, while preserving the diff control.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Landing verification: PR_MERGED; the earlier integration blocker is resolved.
Reviewed successor a77d2d1c5111704a25acf296f278d98cd9a10849 merged as f0e0ea0177a0815dd6e5d6f70ed67e272963ed7e. The squash is an ancestor of observed main 8435e26f84cc5b613a0db7b9e9ae6dcb5d0f6e64. Source-only git merge-tree --write-tree f0e0ea01^ a77d2d1c exits 0 and produces b0e1da4a23160192078c367c187719d82ccbfdaa, exactly the landed tree.
The conflict resolution retains one shared scope stamp/detector/state predicate, unchanged TS/JS framework-any cell_state, and Python's separate family_established_for_any_framework. Repo-mode Python is stamped before the sole native finding insertion; the shared card owner refuses its absent repo repair-routing capability, while supported diff routing remains available. Typed SourceCurrentness is unchanged. The production guard, producer, registry, TS projection, Python/TS integration controls and source-currentness model match the exact qualification checkout and the landing by Git blob identity. The intervening ledger change is a test-only corpus inventory adjustment; its tested blob equals the landed blob.
Observed required proof: run 39904961285, Rust gates job 120254888507 and Result job 120270493040 succeeded. Logs identify actual checkout 37c582282431e5a5c5e94ee5982129adc6a0040d, merging successor a77d2d1c into 9502fba2a3eb36f727d71c1970cb34786458e20f. Nextest: 19,740 passed, five skipped; ripr doctests: two passed, one ignored. Individually observed PASS controls include Python repo JSON/human suppression and diff card presence, Python capability lookup, repo-stamped card refusal, base-side card refusal, TS repo refusal/diff readiness, and framework-specific non-widening. Formatting, policy, all-target/all-feature checks, strict Clippy, golden/fixture/verdict contracts and schema sweep steps succeeded. No fresh local execution is claimed.
Residuals remain as already reconciled in #5531: analysis scope is a free-text marker and an unstamped finding defaults to diff; the no-card reason still blames placement instead of scope; advisory ledger rows remain visible with authorities off. Broader capability-registry acceptance remains open. The ub-review wrapper pass retains failed ripr sensor, timed-out cargo-test and rejected/deferred proof intents; it is not counted as a full independent pass. Earlier unavailable policy reads were not retried. A shell fetch of the retained CI object was unavailable, but pinned connector commit/file reads verified its identity and matching blobs.
This supersedes the integration disposition on the old 9cb52f8d head without relabeling that head's receipts. No source edit, merge, build, CI start or thread resolution was performed during this verification.
Governing issue or accepted claim: #5531
Acceptance delta (one sentence): A repo-mode Python finding no longer emits a
python_repair_card(and so no "apply the next step to the suggested test" human route or repair-card ledger record), because the capability table has no repo-mode Pythonrepair_routingcell (absent =not_proven) and the shared card owner now looks it up.Verified defect (before the fix)
A real repo-mode run (
check_workspace_repo_with_config,src/pricing.py+ one pytest test, no diff) returned aweakly_exposedfinding with a fullpython_repair_card; the human output told the reader to "apply the next step below to the suggested test and run its verify command". Repo mode reuses the diff classifier over a bounded, possibly capped/partial working set, contradicting the table (Pythonrepair_routingcells exist only aspython/pytest/diff/...andpython/unittest/diff/...). The new repo JSON and human tests failed before the fix.What changed
domain/language_capability.rs: adds only the framework-agnosticfamily_established_for_any_framework(language, mode, family)(Python's cells are framework-named; no cell = fail closed), reusingREPO_SCOPE_EVIDENCE_LINE,finding_is_repo_scoped,state_establishes_capabilityandcell_stateas landed by fix(ts): fail repo-mode TypeScript/JavaScript findings closed for repair routing #9896.analysis/language/python/repo/evidence.rs: stamps repo-mode findings with theanalysis_scope: repoline.output/python_repair_card.rs:python_repair_cardreturnsNoneunless the capability is established for the finding's scope. Single owner behind the JSON/human/SARIF card. Diff mode unchanged.docs/LANGUAGE_ADAPTER_PREVIEW.md: repo-mode Python section notes theanalysis_scope: repoline and that these findings get no repair card/routing.app/tests/python_repo_mode_repair_failclosed.rs(diff control keeps card; repo JSON has no card; repo human output routes no card), apython_repair_cardunit test with positive control (repo_scoped_python_finding_gets_no_repair_card), and a capability-table test.Ledger note
The gap ledger still carries an advisory no-repair-card record (
gap_record_from_python_no_repair_card_finding) for such findings; that is not repair routing. This PR does not change that path or its reason text.Relationship to #9896 (TypeScript sibling)
#9896 has landed. This branch merged main and deleted its duplicate copies of the three shared helpers; main's
cell_state(frameworkanyonly) is unchanged.family_established_for_any_frameworkis a separate Python-capable lookup kept alongside it; unifying the two is optional follow-up.Disclosure
Repo-mode Python findings gain one public evidence string:
analysis_scope: repo(same line #9896 added for TS/JS; disclosed here and in LANGUAGE_ADAPTER_PREVIEW.md; OUTPUT_SCHEMA.md has no per-finding repo evidence section).Not in this PR
No Rust/Perl/TypeScript change, no tier change or new cell, no runtime-outcome claim, no diff-mode output change. Repo-mode human output still lists suggested test/verify lines as advisory detail.
Proof
cargo xtask precommitexit 0 (goldens check INCOMPLETE for theowner_return_pin_fallible_literalenvironment gap; hosted CI owns it).cargo fmt --checkok;cargo clippy -p ripr --all-targets -D warningsok;check-doc-artifactsandcheck-doc-indexpass. Full precommit, full-workspace tests and hosted exact-head proof not rerun.🤖 Generated with Claude Code
https://claude.ai/code/session_01EsjwSbvSPQdZfNsK689oNn