Repository navigation
Conversation
Keep restart recovery and known-undelivered completion/steering custody alive when operator policy evaluation is unavailable. Definite denial and authority changes still revoke. Detached completion retries reacquire plugin scope while preserving original operator authority.
|
🦞👀 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 Summary: ✅ CompletedThis 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 changesPreserve resumed runs and undelivered steering or completion custody when access-policy evaluation is temporarily unavailable. Example: After a Gateway restart, a child completes for agent:main:main:thread:yield-restart while its access policy throws once.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses a current recovery defect, resolves both prior findings, and introduces no identified code defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway recovery reconstructs the original operator authority; session and subagent owners use it to authorize queued input and completion delivery. flowchart TD
A[Interrupted operator turn] --> B[Gateway recovery]
B --> C[Original access grant]
C --> D[Policy evaluation]
D --> E[Unavailable operation refused]
E --> F[Retained delivery custody]
F --> D
D --> G[Authorized completion or definite revocation]
Technical reviewBest possible solution: Keep temporary evaluation failure separate from revocation throughout existing recovery and custody owners, while retaining original-grant authorization and existing delivery retries. Do we have a high-confidence way to reproduce the issue? Current-main recovery code converts policy-check exceptions into permanent revocation, and the submitted subprocess fixture targets that path; this review executed no target code. Is this the best way to solve the issue? Temporary evaluation failure must refuse an operation without ending its original grant; classifying the existing unavailable error at recovery and custody boundaries and reusing detached admission is a focused repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1c1814a0bf78. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +35, Tests +252, Docs +4, Other +7. Total +298 across 20 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel 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 (1 earlier review cycle)
Reviewed November 14, 2026, 3:22 AM ET / 08:22 UTC (Revision 2). |
Keep the benchmark JSON persistence boundary explicit without a lint suppression. Require terminal refusal after visitor revocation, and wait for actual Gateway fixture readiness within the existing phase budget before injecting the outage.
|
Addressing all three open items from the review of
All five focused CI-replay cases across four files pass. The repair delta also passed Codex P2 review, typecheck, format, and script lint. Production code is unchanged by this repair. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Final-head status for CI run 43574894383 finished with one failed test job plus its aggregate gate. The failure is The failing case passes on the candidate locally and on the exact CI main parent Leaving the PR open at the reviewed head. No CI rerun or admin merge requested. The unresolved catalog failure needs attribution before landing; the recovery fix and its red-on-520f1897 / green-after-fix proof remain unchanged. |
…penclaw#198729) * fix: preserve resumed runs through temporary access policy outages Keep restart recovery and known-undelivered completion/steering custody alive when operator policy evaluation is unavailable. Definite denial and authority changes still revoke. Detached completion retries reacquire plugin scope while preserving original operator authority. * test: type restart recovery fixture operator scopes * test: verify revocation and await recovery readiness Keep the benchmark JSON persistence boundary explicit without a lint suppression. Require terminal refusal after visitor revocation, and wait for actual Gateway fixture readiness within the existing phase budget before injecting the outage.
…penclaw#198729) * fix: preserve resumed runs through temporary access policy outages Keep restart recovery and known-undelivered completion/steering custody alive when operator policy evaluation is unavailable. Definite denial and authority changes still revoke. Detached completion retries reacquire plugin scope while preserving original operator authority. * test: type restart recovery fixture operator scopes * test: verify revocation and await recovery readiness Keep the benchmark JSON persistence boundary explicit without a lint suppression. Require terminal refusal after visitor revocation, and wait for actual Gateway fixture readiness within the existing phase budget before injecting the outage. Release adaptation: Separate baseline-policy repair eeb2ecfd: preserve typed operator-policy unavailable error in followup catch (+4/-1). Not source7/R3 and absent from401018. Prepared onUI8fbc; no branch commit or runtime claim. (cherry picked from commit 9a3b527) Co-authored-by: RomneyDa <[email protected]>
Related: #198245
What Problem This Solves
Fixes resumed turns and their subagents being cancelled when a subagent completion encounters a temporarily unavailable Gateway access policy.
User Impact
Accepted work survives temporary policy outages and completion delivery uses its existing retry path. Individual operations still refuse unavailable authorization, and definite denial or a real authority change still cancels work. No configuration or schema changes are required.
Why This Change Was Made
Recovery and several steering/completion boundaries treated failed evaluation as permanent revocation. Preserve custody for unavailable checks and retain known-undelivered steering fallback; keep definite revocation fail-closed. Detached completion retries also need a fresh plugin operation scope after the requester yields, while retaining the original operator authority.
Production code grows by 35 lines across the existing owners. This adds error classification and reuses the existing detached-work helper, without another retry mechanism, cache, or state owner.
Evidence
520f18975936. Five focused CI replays across four files also pass after the test/tooling repair; production code is unchanged.520f18975936. With this fix, a one-shot policy failure during child completion leaves the resumed requester active; existing retry delivers the result after it yields. This exercises one child, not a six-child load test.569bf22dba45, committed as9d7887a5610c, and in the fixture-only type correction at8dcfe3fc65fb; the subsequent CI repair delta ate8658a87b8c7also has zero findings. No changed module is imported by Control UI.pnpm check:changedcaught a fixture scope-array typing error; corrected with the canonicalOperatorScope[]type and all four test-root typecheck shards now pass. All other changed-file checks passed except the inherited dead-export scan below; the full invocation retains its failed result, with the corrected typecheck recorded separately. Three inherited dead-export regressions reproduce on the exact main parent569bf22dba45:normalizeDiscoveredAgentModel(introduced by consumer replacement730ce41827c4, perf(models): reduce catalog normalization allocations #198591),MEMBER_ROLE_PRESETSandopenclawIdMemberRoleDefinition(introduced by4fc7acf90a73, feat(openclaw-id): member roles come from gateway.roles.definitions #197739). These are main regressions requiring follow-up.Initial CI run 43572114354 exposed three authored proof defects, now repaired: the benchmark suppression inventory, publication tests expecting transient unavailability after explicit visitor revocation, and the outage fixture relying on a one-second readiness wait. The fixture now uses its existing 15-second phase bound while retaining the same outage, active-run, and eventual-completion assertions; the real Gateway replay passes in 45.2 seconds. Targeted typecheck, format, script lint, benchmark serialization smoke, and Codex review pass.
The separate plugin-reload product fixture timed out at 120 seconds on exact parent
569bf22dba45with no candidate production changes. Its preparation owner changed fromfulltoruntimein7cd145595bf9(#197783); restoring only that prior argument on the same parent passes in 92.7 seconds. The unchanged fixture also passes on the candidate in 86.3 seconds. This is a timing-sensitive main regression requiring follow-up, not a claimed fix or automatic CI waiver; the next exact-head CI remains required.