Repository navigation
feat(agent): gap-bound TypeScript repair start through agent repair --gap-id (#9103 C2a) - #9873
Conversation
|
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 22 minutes. View limit details
Comment |
… C2a) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WsmpqwQoXW5V5Yhs4waRvg
|
Head 98334f2 addresses the independent review (gap attempts no longer print a refusing Generated by Claude Code |
There was a problem hiding this comment.
Confirmed findings
- The seam-inventory bypass trusts only a canonical-looking prefix and is broader than the typed gap-record lookup used when attempts are created.
- The authoritative packet is accepted from a validated record but not checked against the retained check-findings snapshot before publication.
- crates/ripr/src/cli/commands/agent.rs:2904 — Add an accepted-gap integration case with a tracked non-test file dirty before
agent repair --gap-id. Assert exit failure, the gap-specific restart command, and absence of both workflow snapshots and attempt manifests. This new gate is security-relevant and currently has no changed-behavior test distinguishing fail-closed from proceeding. - Status routes any manifest gap_binding as a gap restart solely by string prefix in repair_start_command, so a forged or malformed binding can make status emit --gap-id for a non-TS subject.
- Persisting a gap-bound attempt reads workflow files that may belong to an earlier attempt before publication replaces them.
- crates/ripr/src/app/task_first.rs:587 — Avoid opening the Rust seam gate on prefix syntax alone. The gate cannot validate a TypeScript record, and this bypass has become a second admission policy outside lookup_gap_start. Pass a typed subject/enum into gate checks, or make gap-bound status/recovery bypass explicit without teaching a generic seam gate that arbitrary canonical-looking strings are admitted.
Verification questions
- Confirm crates/ripr/src/app/gap_bound_repair.rs:148 — Make the command constructor validate the stored binding as a TypeScript canonical gap, not just its presence. Deserialization accepts any nonempty gap_binding.base, so status/recovery can emit an invalid --gap-id command for a forged manifest. Parse or assert the canonical prefix in the single shared helper and return a fail-closed neutral/verification route when absent.
- Confirm a failed gap-bound attempt publication is explicitly allowed to leave stale workflow artifacts.
- Confirm the packet-derived cage is tested only when constructing its policy; no changed test demonstrates enforcement against a post-before edit to production or non-test files.
- Confirm accepted gap starts lack direct proof that pre-existing tracked changes outside the packet test surface are refused without publishing an attempt.
- Confirm the end-to-end oracle checks refusal artifact state only for unknown and not-ready gaps, not for a ready gap whose attempt publication fails after workflow artifacts are written.
Refuted
- A zero-action approval would satisfy this lane despite missing execution evidence.; refuted because: Rejected: the lane reports bounded coverage, one concrete remaining oracle gap, and the absence of a completed cargo-test receipt without treating missing execution as proof of safety.
… dirty-premise test (#9103 C2a) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WsmpqwQoXW5V5Yhs4waRvg
|
Pushed 763d096 (merged main, which now carries the #9881 golden re-bless). It answers review 5622510469:
Local on this head: workspace clippy 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! |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WsmpqwQoXW5V5Yhs4waRvg
|
Run 39881813613 on 763d096 failed two ways. (1) Rust-only lane: my test Generated by Claude Code |
|
Required "Rust gates" is red on head c78e6b7 only in Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REPAIR_REQUIRED on exact head 49bab7c3a349a26de1f16d4eeef2978c72dc3a18 (C2a only). Source review found a remaining cleanup regression in cli::drive_before_phase_inner (crates/ripr/src/cli/mod.rs:252-265): every gap-start error removes shared before.check-findings.json, gap-repair-packet.json, and attempt-baseline.json. This includes lookup_gap_start NoSuchGap/NotReady and dirty-premise failures that occur before this invocation writes those files. A refused stale gap can therefore delete an earlier gap projection or a seam workflow baseline despite reporting that no workflow was prepared. The new fresh-directory no-leftovers test cannot discriminate that loss.
Keep the repair with the existing C2a owner/branch. Bound cleanup to artifacts this invocation owns and preserve/restore previous bytes across both admission refusal and partial publication failure. Add a pre-existing-artifact sentinel control plus the accepted-gap publication-failure control; re-review the resulting exact head before qualification. Native reproduction is in progress and is not yet claimed here.
Public-contract parity also needs a narrow wording repair: docs/OUTPUT_SCHEMA.md:3626 says edits are caged, while this C2a intentionally only records the cage and refuses gap-bound after. Align it with the spec/help/PR caveat; retain C2b enforcement, C2c bound receipt and D journey completion as unresolved. The prior owner receipts at 98334f2/763d096 remain historical evidence and are not overwritten by this review.
Observed: complete changed-file source inspection for these paths, current head, and existing qualification 39898085736 running. No duplicate writer or CI request started. Branch-protection and active-rule CLI reads were denied; those reads were not retried. Disposition is blocking source/contract repair, independent of the eventual CI outcome.
|
Current reconciliation, 2026-10-23 08:25 UTC: the historical Draft/failed-run state below is superseded. #9873 is landed, not awaiting another qualification. GitHub records final head The old shared-artifact cleanup and SPEC-0311 ledger blockers are repaired in landed source. The before-phase lock now covers capture/restoration of prior bytes on returned failures; sentinels cover early refusal, dirty premise, partial publication and a stale start after success. This remains best-effort returned-error handling, not crash/panic or hostile-writer transactional proof. All four verdict-corpus ledgers contain the justified SPEC-0311 scope entry. Existing successful qualification 39911638546 is reused: actual checkout The canonical unresolved consumer is now #9943, head Historical receipt below, retained with its original object/run identities: Current continuation for C2a, preserving the canonical Owner / governing claim: existing #9103 C2a owner; no replacement writer or campaign started. The owner’s C2b continuation reported in comment 6355696823 remains separate. Supplemental native controls on that binary:
An initial supplemental TypeScript-only feature build failed compilation on missing Dependency / blocker: Policy reads: CLI classic-review protection and active branch-rule reads each returned Terminal receipt reconciliation (2026-10-23 04:30 UTC):
Final state: open Draft, unchanged head |
#9103) A refused or failed gap-bound before start now restores the shared workflow artifacts to the bytes found before the invocation instead of removing them unconditionally. Align the cage wording with C2a (recorded, enforced in C2b). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WsmpqwQoXW5V5Yhs4waRvg
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Repair for REPAIR_REQUIRED (review 5623838811) pushed at 609524e.
Independent re-review of the exact head found no blocking issues. It ran the journey tests (6 passed). Its low-severity notes are accepted for now: restore covers returned errors only, not panic or kill; it is best-effort and assumes exclusive use of the workflow directory; and the The delta also shows rewording of the "no changed files" notes (#9222). That comes from the main merge, not from this repair. Re-requesting qualification on 609524e. Generated by Claude Code |
There was a problem hiding this comment.
Confirmed findings
- JSON before-phase output ignores the manual gap follow-up and persists the ordinary phase-after continuation.
Verification questions
- Confirm the source route does not guarantee restoration if cleanup encounters a filesystem error, despite documentation saying a refused start restores prior bytes.
- Confirm the strongest executable evidence is the focused installed TypeScript journey, which exercises accepted starts, refusals, sentinels, manifest persistence, and the unavailable after phase.
Refuted
- A resizable backing store or typed-array alias could be resized/detached while a stale length snapshot is reused.; refuted because: No such memory types, FFI boundaries, resize/detach/transfer calls, or unsafe pointer operations occur in the changed active-view surfaces.
- A prefix-only gap gate would permit forged foreign subjects to bypass seam admission.; refuted because: The gate uses a canonical TypeScript prefix plus nonempty ASCII hash characters, and command emission independently revalidates the subject and binding.
- The worker-handoff slice may transfer or detach JS-backed memory.; refuted because: No JavaScript runtime, worker, async object, GC handle, FFI pointer, or transferable resource appears in the changed paths; this is ordinary Rust filesystem/manifest processing.
- The changed code contains no ArrayBuffer, TypedArray, VecDeque, resize/detach/transfer, or backing-store length snapshot operations; active-view UB is therefore not implicated.
- The added artifact backup could expose references to mutable filesystem state or otherwise create use-after-free/lifetime UB.; refuted because: It stores owned paths and byte buffers, restores only on the synchronous returned-error path, and introduces no raw pointer, unsafe aliasing, or borrowed mutation handle.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Full Rust test execution on the exact head is not yet evidenced.
Parked follow-ups
- Artifact backup is best-effort and may leave or overwrite prior workflow state if restore I/O fails.
- Cleanup is not transactional against panic, process termination, or concurrent writers, but the seeded thread explicitly accepts this as a low-severity residual limitation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WsmpqwQoXW5V5Yhs4waRvg
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WsmpqwQoXW5V5Yhs4waRvg
EffortlessSteven
left a comment
There was a problem hiding this comment.
Current-head independent C2a inspection: REVIEW_INCOMPLETE (source review completed; final merge qualification/approval not established).
reviewed_head_sha: 5d4fbcf
claim_boundary: #9103 C2a only; gap-bound before start. C2b enforcement/after, C2c bound receipt and D journey/pins remain open.
integration_basis: the actual observed CI merge subject is bf4674b (parents 12e63da and reviewed head; tree f04f9592021d54c90dc33a6a416cb9844c66cd99), rather than PR metadata base 6b2f5b6. Main readback was 158ee2f. The single post-basis main commit changes missing-input/error guidance, not the C2a gap-start decision or card-binding join; no behind-only restack or duplicate CI is requested.
Inspected:
- The full 32-file changed-file inventory and the gap-start, parser, navigation/triage, snapshot producer, shared packet validator, manifest/publication, cleanup, status/recovery, schema/spec and installed-journey changes. Root AGENTS.md matches current-head blob c1f4a44a83a03ca70c92738aa17ffb29dc4ddeb0.
- Candidate freshness remains owned by typescript_gap_record_for: is_candidate_actionable, capability/scope, named limitations, assertion selection and shared validator gates. run_gap_bound_before_phase re-derives live findings; lookup_gap_start refuses absent, duplicate, static-limited and unready records. The prefix helper is syntax/routing, not record admission.
- Packet seam alias equals the canonical gap and edit-cage selection requires the exact packet identity/test surface. Repair-card production matching is unchanged: repair_card_handoff::finding_for_seam uses the shared gap+owner or file+owner+family+line/unique-most-specific join. The repair_card files in this PR add only absent gap markers in test/measurement manifests; they do not create a TypeScript seam/card inventory.
- Cleanup now captures previous shared bytes under the existing before-phase lock and restores them on returned errors; the journey includes early-refusal sentinels, partial-publication failure and accepted-start-then-stale-refusal controls. Read/restore I/O, panic/termination and noncooperating-writer limits remain the disclosed residuals, not a transactional guarantee.
- The earlier JSON-continuation finding (review 5624348905) is superseded on this head: complete_repair_attempt now persists the manual by-gap route; persist_before_repair_attempt copies that same next_command into the JSON continuation. The renderer ignoring the separate human gap_follow_up parameter no longer implies an after command is persisted. The journey asserts the persisted next step has --gap-id and lacks --phase after.
Remaining non-blocking source residual (P2), already recorded in comment 6357318680: gap_bound_repair::repair_start_command at line 153 retains store_flag in its neutral fallback. With an invalid subject or blank bound base and an explicit store it constructs ripr check --root . --store /tmp/store; the complete current-head check parser (commands/check.rs:696-824) has no --store arm and rejects it. Valid-gap and seam starts should retain the store, but the neutral check fallback should omit it. Route that narrow fix and an explicit-store malformed-binding control to the existing C2a owner; no replacement writer was started. This corrupt/forged-binding recovery issue does not weaken admission or the ordinary accepted-gap start.
Observed proof:
- Existing qualification run 39911638546 attempt 1 is bound to the reviewed head; admission job 120275892214 passed. Latest inspection: required Rust tests, doctests, goldens, fixtures and verdict corpora passed; PR evidence is still running, with schema/aggregate Result still pending. This is not a final green receipt.
- Rust-only job 120275761087 passed on the actual bf4674b merge checkout, including gap-artifact backup and forged-binding/cage/status controls. Windows subset job 120275761074 printed nine PASS subset verdicts; it is advisory subset coverage.
- ub-review job 120275689703 is a successful wrapper whose evidence report explicitly says INCOMPLETE: one focused-head proof passed, red/green proof was deferred and several intents were unsupported. It is not complete independent qualification.
- No additional local build/test was launched: rustc is absent from PATH in this review environment; hosted proof already owns the active validation. The prior 763d096/49bab7c/609524e receipts retain their original identities.
Final-merge gates remain open: the required Result is not terminal; the review inventory has three COMMENTED submissions and no APPROVED GitHub review; classic protection and active-rule reads were previously Forbidden and remain stopped. Complete the existing run and required approval/protection clearance, then refresh current head, all conversations/findings and applicable integration evidence before a separate REVIEW_READY judgment and expected-head normal squash. Zero inline threads and advisory statuses are not approval.
Custody/holds: canonical claude/ts-9103-c2a owner preserved; no source edits, qualification re-request, auto-merge, release/deployment/settings action or mutation of held #9657/#9896 artifacts.
|
Post-merge reconciliation (observed 2026-10-23 07:35 UTC), superseding only the pending-run status in review 5625048102. PR #9873 was already merged when this continuation resumed; no second merge or qualification request was made. GitHub records reviewed head 5d4fbcf squashed by EffortlessSteven at 2026-10-23T07:26:35Z as 64a98db5bb970b0de3043fc280adc73b42a86321. The squash has one parent, 7be43fd. Main readback is exactly the squash; compare squash...main is identical (ahead 0, behind 0). The parent-to-squash diff has the same 32 paths and identical added/removed patch lines as the reviewed PR diff. Terminal qualification:
Residual disposition: the malformed-binding explicit-store recovery issue remains verified_current/P2 in the landed helper (source): the neutral check route still appends store_flag. The corresponding test still uses an empty store flag. It is not fixed or resolved by this merge. Keep its narrow fix/control with the existing #9103 owner; valid starts continue to retain the store. C2b after/cage enforcement, C2c bound receipt and D final journey/pins remain separate acceptance. Approval/protection evidence limit: readback still has four COMMENTED reviews and no APPROVED review; main reports protected=true, but the previously Forbidden classic/active-rule reads remain stopped. This records the observed landing and successful checks, not a retroactive REVIEW_READY, approval waiver, or claim that every merge-policy condition was independently audited. No review thread was resolved (inventory is empty). No source writer, post-merge test replay, release/deployment, access change or held-artifact action was started. |
Summary
Slice C2a of #9103. A TypeScript finding whose gap record passes the shared
validate_agent_gap_record_packetnow gets a gap-bound repair start:ripr checkprintsripr agent repair --gap-id <gap> --base <base> --phase beforefor such a finding.ripr agent repair --gap-id G --base B --phase beforere-runs the diff-scoped check, re-validates the gap record, writesbefore.check-findings.jsonandgap-repair-packet.json, and begins an attempt bound to the gap (optional manifestgap_binding {base}; seam attempt manifests are byte-identical).--gap-idexcludes--seam-id, requires--base, and is valid only with--phase before. Python keeps its Python flat-layout boundary gap gets no repair start from check/pilot/repair #9102 terminal reason; unknown or not-ready gaps are refused and leave no attempt.--seam-id.--phase afteron a gap-bound attempt is refused and names the manualagent verify --gap-idroute.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Proposal:
Spec: RIPR-SPEC-0311 (new), RIPR-SPEC-0310
ADR: ADR 0020
Plan item: #9103
Governing issue or accepted claim: #9103 (slice c2a; c2b after-phase, c2c receipt and d journey flip remain)
Acceptance delta (one sentence): A TypeScript finding with a complete, validator-accepted packet exposes a gap-bound repair start that
ripr agent repair --gap-id ... --phase beforeaccepts, while the let/imported/reach-barrier variants stay unrouted and Python keeps its terminal reason.Scope
Out of scope: gap-bound
--phase after(C2b), bound-gap receipt and TypeScript journey row flips (C2c/D).Proof
Local on 763d096:
cargo xtask precommitexit 0 (only the offlineowner_return_pin_fallible_literalfetch is unproven locally), workspacecargo clippy --workspace --all-targets -- -D warnings, installed journeys, task_first_facade, lib subset. Independent review and bot review findings addressed (see PR comments).🤖 Generated with Claude Code
https://claude.ai/code/session_01WsmpqwQoXW5V5Yhs4waRvg