Repository navigation
test: cover native restart recovery and tool attribution boundaries - #170336
fuller-stack-dev merged 7 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR lets interrupted native-app turns reach authority restoration when their saved operator source exactly matches the interrupted session and run. Example: A native-app turn in session requester-session retains its operator source when the Gateway restarts.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a concrete native-session recovery failure still present on current main. No actionable correctness or security findings remain. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway startup recovery reads persisted session claims and transcript checkpoints, classifies eligible interrupted turns, and dispatches them through the existing operator authority restorer before tools can produce effects. flowchart TD
A[Native app turn] --> B[Persisted operator source]
B --> C[Startup recovery classifier]
C --> D[Current authority restoration]
D --> E[Recovered agent turn]
E --> F[Guarded tool effect]
C --> G[Reject unmatched source]
D --> G
Technical reviewBest possible solution: Land the exact-source classifier repair while retaining the existing restoration, revocation, and final-effect authority owners. Do we have a high-confidence way to reproduce the issue? Current-main source rejects an internal-ingress turn with missing provenance even when its exact operator source survives; the supplied baseline run records both native-input and steering failures. Is this the best way to solve the issue? The repair belongs at the recovery classifier: it recognizes existing source custody and delegates permission decisions to the established authority restorer without introducing another owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 976cc974fab1. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +15, Tests +467, Docs +6. Total +488 across 9 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (9 earlier review cycles; latest 8 shown)
Reviewed October 13, 2026, 10:35 PM ET / October 14, 2026, 02:35 UTC (Revision 10). |
|
Published maintainer contribution at Final complete affected E2E file: 232/232 passed, with scoped lint/format/diff checks passing and a complete 643-line helper audit. Required independent manual/security and API-key-only delta review approved this exact head/tree with no actionable P0–P2 findings. The affected messaging type exit 0 is producer-recorded (empty log), not independently rerun proof. Prior 56-case real-boundary proof, seven type graphs, partial 161-case aggregate and original-author process-kill proof remain separately attributed in the description. Fresh remote qualification completed October 14, 2026: CI Description separates current-head qualification from retained prior-head proof and its limits. Private SQLite/shared dependency custody preserved; no live service/database/config, new PR, force push, merge or deployment action. |
What Problem This Solves
Native restart recovery and deferred tool preparation need regression coverage that exercises saved operator custody and real effect boundaries, not only callback wiring or transcript classification.
User Impact
No production behavior changes remain against the integrated main base. This PR strengthens tests for existing recovery and authorization behavior; it adds no configuration, schema, credential, or permission changes.
Why This Change Was Made
The original recovery and prepared-requester-policy fixes are now upstream. This candidate preserves that implementation and adds coverage for native original input and steering, missing/delegated/cron sources, exact saved agent/session/incarnation/lifecycle ownership, and device/role revocation. Allowed continuations reach the real Gateway/Cron automation-write owner; refused continuations persist no job. Mismatched claims retain their original source and aborted state with the expected ownership refusal.
Built-in and catalog tool tests independently verify attribution invalidation before parameter preparation or effects. Missing-search guidance uses persisted dashboard metadata and inherited denial rather than a caller-invented policy. The new native fixture and existing creator-transport tests share the existing source-restoration owner; no parallel production classifier or authority owner is introduced.
The merge commit preserves @jjjhenriksen's original contribution and ancestry. The final delta against integrated main
c03f83134081f087f20cacc52b65034bc3ea23afis five test/support files (+496/-38); obsolete production changes and duplicate recovery documentation are absent.Evidence
Candidate:
61ffd2d6f0f68c72f8ada8ad5e7cc89ca7773cae, tree3fd52451229f202c71e69a2625f0ccf583ce2d1e.built-in tool bypassed attribution; restored code passes. No raw-baseline-callback mutation is claimed.These are in-process cold-state reconstruction and real durable automation-effect tests, not an OS-process kill, signed native handshake, live provider execution, or live-service test. Provider/preflight collaborators are isolated; restoration and the durable effect owner are real. All runtime tests used private HOME/state/temp paths and a verified private managed-update handoff database. No live Gateway, real credentials, or provider configuration was changed.
The old 232-test and previous-head CI claims do not apply to this candidate. Required exact-head GitHub CI, security, and enforced review checks remain landing gates.