Repository navigation
Conversation
Bind recovery to its captured session without broadening persisted operator scopes. Record definitive authorization loss with the existing guarded interruption notice, preserving pending delivery and other recovery custody.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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. |
|
Continued in #179579 from the same branch. This PR's recorded head remained at |
What Problem This Solves
Fixes interrupted turns repeatedly failing restart recovery with
missing scope: operator.writewhen their original caller was admitted withoperator.sessions.write.User Impact
Session-only operators, including trusted-proxy users and delegated parent continuations, can resume their own interrupted work without receiving broader permissions. Confirmed revocation records a visible interruption instead of repeatedly deferring the same input. Saved final replies and other unfinished recovery obligations remain preserved.
Why This Change Was Made
Recovery already persists the original operator authority and revalidates its current profile, role, device, and access grant. Its internal
agentdispatch omitted the existing exact-session binding used by other session continuations. Bind the captured session/run/lifecycle before dispatch, retaining the original scopes and normal own-session checks.Classify definitive authorization loss separately from storage, lifecycle, and temporarily unavailable policy failures. Route denied pre-admission recovery through the existing guarded notice/settlement owner. No schema, permission, or configuration changes.
Evidence
operator-run-recovery.test.ts,server-instance-runtime.operator-recovery.test.ts, andserver-instance-runtime.native-restart-recovery.test.ts. Coverage includes cold authority restoration, retained scopes, revocation, cron-owned interruption, exact claims, repeated recovery without duplicate turns/notices, and saved-final preservation. The recovery/router and persistence boundaries are real; the model/turn executor is stubbed.subagent-registry.completion-authority.test.tsat “revalidates revoked grant for a cold-loaded interrupted child batch without widening the parent”; local replay reproduced 91 passing / 1 failing. The restoration owner now recognizes the typed definitive denial as well as a live access denial. The unchanged 92-test file passes after the fix (88.74 s including compilation). Changed-file lint/format and an additional independent P0/P1 review passed.A full isolated Gateway/model restart is not yet verified. Production acceptance remains the next operator-coordinated restart. Production grants and configuration were not changed; incident logs alone do not identify each original caller's authentication method.