Repository navigation
fix(agents): preserve bounded operator authority across restart continuations - #193098
Conversation
…nuations Co-authored-by: vincentkoc <[email protected]>
|
🦞👀 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: needs real behavior proof before merge. What this changesThis PR preserves bounded operator grants through principal ingress, restart recovery, scheduled continuations, and owner-tool admission. Example: Alice starts an authorized task with operator.read and operator.write, then the Gateway restarts before it schedules a follow-up.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 5 items remain Keep this PR open: it addresses a real continuation failure, but principal recovery bypasses a current ingress restriction and the expanded tests exhaust shared rate-limit state. Priority: P1 Before merge
Findings
Tests
Agent review detailsHow this fits togetherPlugin ingress supplies authenticated principals; Gateway admission records and restores their bounded authority, and scheduled runs consume it when invoking protected tools. flowchart LR
A[Ingress consent owner] --> B[Principal binding]
B --> C[Operator source snapshot]
C --> D[Restart admission]
D --> E[Scheduled continuation]
E --> F[Live authority checks]
F --> G[Protected operation]
Technical reviewBest possible solution: Retain the original bounded custody while sharing live principal-admission checks between ingress and recovery, including trusted-proxy allowlist enforcement. Do we have a high-confidence way to reproduce the issue? Current-main source shows that principal ingress cannot capture this durable recovery source and role-based restart admission does not transfer it; no target code was executed during this review. Is this the best way to solve the issue? Reusing the existing recovery and tool-admission owners is appropriate, but the new principal variant must preserve the live ingress authorization boundary. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against aa401d8fbdd5. Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Recovered principal authority can survive removal from the Gateway's person-ingress allowlist. EvidenceSecurity concerns:
What I checked:
Likely related people:
PR surfaceSource +461, Tests +794, Docs +32. Total +1287 across 35 files. Added test files: 3. View PR surface stats
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 Reviewed November 4, 2026, 8:20 PM ET / November 5, 2026, 01:20 UTC. |
Baseline-Refresh: 44a483f72d3d2d74415e1341e7bc77333d4d9f60 Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Candidate UI warning proofReal mounted Control UI with maintained mock Gateway transport and synthetic job/profile data. Both Save flows create the job successfully. Before: the returned warning is discarded. After: the same warning is visible in the existing notice. The captures use synthetic fixture warning copy; no production data or credentials are present. |
Co-authored-by: vincentkoc <[email protected]>
Share current trusted-proxy membership checks across live and restored person authority. Cover removal before cold restoration and before protected effects with genuine principal fixtures; preserve least-privilege fixture roles and counted regression growth. Co-authored-by: vincentkoc <[email protected]>
Share the existing live person eligibility gate with recovery and protected effects, using the current transport-owned resolved authentication policy. Cover mode disablement before and after restoration with awaited live-refusal controls; preserve nonperson and original writer-scope behavior. Co-authored-by: vincentkoc <[email protected]>
|
Merged via squash auto-merge.
|
…193683) Keep the scheduled-child tool ceiling exact after 56753f7 (#193098) retained live administrator eligibility for control-plane tools. Hidden children still deny automations through their own effective tool policy. Allocate exactly five test lines for the longer expected-array formatting; no production behavior, tests, helpers, or waits are added. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…nuations (openclaw#193098) * fix(agents): preserve bounded operator authority across restart continuations Co-authored-by: vincentkoc <[email protected]> * fix(cron): complete principal replay and regression isolation Co-authored-by: vincentkoc <[email protected]> * fix(auth): bind retained authority to exact consent issuance Co-authored-by: vincentkoc <[email protected]> * fix(auth): revalidate person ingress policy on recovery Share current trusted-proxy membership checks across live and restored person authority. Cover removal before cold restoration and before protected effects with genuine principal fixtures; preserve least-privilege fixture roles and counted regression growth. Co-authored-by: vincentkoc <[email protected]> * fix(auth): preserve complete person ingress policy on restart Share the existing live person eligibility gate with recovery and protected effects, using the current transport-owned resolved authentication policy. Cover mode disablement before and after restoration with awaited live-refusal controls; preserve nonperson and original writer-scope behavior. Co-authored-by: vincentkoc <[email protected]> --------- Co-authored-by: vincentkoc <[email protected]>
…penclaw#193683) Keep the scheduled-child tool ceiling exact after 5005442 (openclaw#193098) retained live administrator eligibility for control-plane tools. Hidden children still deny automations through their own effective tool policy. Allocate exactly five test lines for the longer expected-array formatting; no production behavior, tests, helpers, or waits are added. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…nuations (openclaw#193098) * fix(agents): preserve bounded operator authority across restart continuations Co-authored-by: vincentkoc <[email protected]> * fix(cron): complete principal replay and regression isolation Co-authored-by: vincentkoc <[email protected]> * fix(auth): bind retained authority to exact consent issuance Co-authored-by: vincentkoc <[email protected]> * fix(auth): revalidate person ingress policy on recovery Share current trusted-proxy membership checks across live and restored person authority. Cover removal before cold restoration and before protected effects with genuine principal fixtures; preserve least-privilege fixture roles and counted regression growth. Co-authored-by: vincentkoc <[email protected]> * fix(auth): preserve complete person ingress policy on restart Share the existing live person eligibility gate with recovery and protected effects, using the current transport-owned resolved authentication policy. Cover mode disablement before and after restoration with awaited live-refusal controls; preserve nonperson and original writer-scope behavior. Co-authored-by: vincentkoc <[email protected]> --------- Co-authored-by: vincentkoc <[email protected]>
…penclaw#193683) Keep the scheduled-child tool ceiling exact after 56753f7 (openclaw#193098) retained live administrator eligibility for control-plane tools. Hidden children still deny automations through their own effective tool policy. Allocate exactly five test lines for the longer expected-array formatting; no production behavior, tests, helpers, or waits are added. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…PROVED j14 prep] Gate 2.7 MIXED-CLOBBER disposition (row scripts/plugin-sdk-surface-report.mts, upstream d999f7b): the merge resolution reworded upstream's line "// +1: GatewayIngressPrincipalRecovery on gateway-ingress (openclaw#193098)." Restore it byte-for-byte; the continuation +11 note and the 3876 budget (upstream 3865 + 11) stay. Comment-only; no behavior change. Unapproved prep checkpoint: no Mode-B, cut, deploy or presentation motion. Co-Authored-By: Claude Opus 5.5 <[email protected]>


Summary
Preserve bounded operator authority through principal ingress, Gateway restart recovery, and scheduled continuations without treating a system turn as a new human owner input.
Problem and solution
A live principal can lack handshake auth policy. Original recovery custody was then lost across restart, and protected calls or the first scheduled continuation could be denied despite the original authorization.
Validation
Regression cost
Normal allocation 1208 = 1008 + 108 + 92 exactly matches counted net regression growth; the scalar baseline is unchanged. The older unmodified integrated baseline already has 49 lines of over-ceiling debt, which this PR does not credit or hide. MCP full-suite wall time: 45.088s; affected-file examples: matrix 3.961s, issuance 9.511s, service 2.042s. Final person-policy continuation Vitest time: 225.81s, mostly transformation; isolated auth file: 55 tests, 0.75s Vitest. Current-head CI supplies broad proof; inherited-failure disposition requires actual evidence through the supported native route.
Before / after UI proof
Real mounted Control UI, maintained mock Gateway transport, synthetic data. Both Save flows create the job; the updated flow also displays the returned notice. No production data, credentials or new layout/CSS. Uploaded assets were verified rendered on GitHub in anonymous Chromium.
Scope and remaining gates
The SDK hook delegates to the existing grant owner; it is not a new authorization owner. R3 exercised the production recovery adapter/factory and canonical relay state. External RelayService startup has separate registered-service boundary tests, not an external R3 connection claim. Packaged updater/service-manager admission, external login/UI consent and deployed Team ingress are not claimed. This PR does not deploy the Gateway or change live permissions.
Protected publication of 92b567b is confirmed; its fresh CI is pending. Prior 0bfc2c7 CI completed with 93 passed, 44 skipped and a UI failure plus aggregate failures. The UI assertion conflicts with a main-side selected-group auto-reveal change, with identical owner/test blobs in the tested merge and its main parent; older scheduled-main runs predate that change, so this is source-causal attribution, not a matching failed-main receipt. Those prior-head results and exception evidence are not current-head passes or a waiver. No merge is claimed.