Repository navigation
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: needs changes before merge. What this changesBind a queued subagent continuation’s automation authority before acceptance and release it with that exact run. Example: A parent is busy when its completed child queues a continuation to remove a disabled automation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains This PR fixes a current-main requester-authority lifetime bug. The previous merge conflict is resolved, and no actionable patch defect was found; the PR remains draft. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherSubagent settlement submits a synthetic parent continuation through Gateway admission, which transfers authority into the exact queued run before dispatch and automation management. flowchart TD
A[Completed child] --> B[Requester authority owner]
B --> C[Gateway admission]
C --> D[Bound queued run]
D --> E[Parent dispatch]
E --> F[Guarded automation operation]
D --> G[Cancellation and cleanup]
Technical reviewBest possible solution: Keep the focused pre-acceptance transfer using the existing requester authority owner and exact-run cleanup. Do we have a high-confidence way to reproduce the issue? Current-main source exposes acceptance before requester scope transfer, and the supplied controller-bound regression targets that interval; this review did not execute it. Is this the best way to solve the issue? The patch repairs ownership at admission, reuses the exact scope at dispatch, and preserves existing authority checks without introducing another authority manager. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a3267d4b57e8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +61, Tests +88. Total +149 across 5 files. Added test files: 0. View PR surface stats
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 (3 earlier review cycles)Reviewed October 20, 2026, 5:47 AM ET / 09:47 UTC (Revision 4). |
8b9fead to
d74fb6f
Compare
|
@clawsweeper re-review The body now includes allowed queued automation removal and the nearest forbidden final-effect cases: queued cancellation, original-device revocation, requester reset, and role/model-policy changes. The new reset capture exercises actual queued acceptance followed by authenticated sessions.reset: the exact accepted run is cancelled before native input, and both complete automation rows remain unchanged across all 18 columns. The first failed collector is preserved and explained; the corrected run passes with native processes joined and owned runtime state removed. Please assess this as source-qualified combined-runtime evidence: the nine transfer/admission/dispatch/grant/tool/mutation owners and reset service match this PR's current d74fb6f, but surrounding lifecycle/authority code differs. The body explicitly discloses the native-version override, scripted inference, teardown signals, and lack of a standalone-binary run. It does not claim an isolated commit-stage denial, a positive effect after early outbox deletion, or security-owner approval. Existing exact-head regression/type/lint/build evidence remains identified separately. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review The sole remaining author item in the completed review is addressed at 114 focused tests across eight files, all three owning test type graphs, scoped typed lint/format, the exact-commit public runtime build and fresh independent P0–P2 review pass. Production core types fail identically on the candidate and an actual exact-source base run: the same 809 diagnostics, no added candidate diagnostics, with the upstream browser test-support import chain identified. The successful build's UI startup-budget warning is also disclosed. The body updates the proof map honestly: seven of nine inspected authority/effect owners remain byte-identical to the historical combined captures; admission has the preserved upstream lifecycle changes, the store difference affects update-state rather than the demonstrated removal, and reset differs only in an obsolete plugin-hook argument. Historical native evidence keeps its recorded revisions, runtime override and limitations; no new standalone-native run or deployment is claimed. Please assess the completed conflict integration and retain any concrete remaining requirement. |
|
🦞👀 Re-review progress:
|
|
Superseded by merged #177698 (landed commit f83b7ad). The landed consolidation prepares and binds the exact requester run scope before acceptance, reuses it at dispatch, and releases it through joined cleanup. This incorporates the accepted-result authority-lifetime repair rather than leaving this PR as a required follow-up. Closing this standalone alternative. Retained personal-tool requester selection remains a distinct proposal in #178750; that policy is not claimed merged here. |
Related: #147499, #168068
What Problem This Solves
Fixes accepted subagent results failing to resume the parent when its turn is still busy.
User Impact
An accepted queued requester continuation owns its admitted automation authority for that exact run, independently of the originating invocation and later child-outbox cleanup. Cancellation, reset, source revocation, and requester restrictions remain enforced. No configuration or schema migration is required.
Why This Change Was Made
Transfer the existing one-use grant to its exact run scope before acknowledging acceptance. Dispatch reuses that scope; abort and cleanup revoke it even if execution never starts. Direct operator scope creation keeps its existing timing.
This is separate from #177564, which orders native recovery binding writes.
Evidence
Current integration: conflict resolved
Current head
e49f86789707e08ecd335e06536ec7e0a5ae92famerges pinned upstream9f662f896dcf3a7dea8f4a01d198024acab75bff. The admission conflict preserves upstream's awaited plugin-subagent registration and rejection, post-await revalidation, and exact admitted-context cleanup. Requester scope is still prepared before acceptance and released through the joined, idempotent caller cleanup. The obsolete post-acceptance scope resolver is not restored. The resolved admission owner matches the consolidation's reviewed7ecc42f61a92implementation; this standalone PR retains only its five-file repair..test-support.tsimport chain included by the production core project. The failure is preserved rather than hidden by configuration, dependency overrides or an ignore.The proof mapping below is historical and source-qualified. At this head seven of the nine inspected authority/effect owners still match both the earlier allowed/role/model capture and reset capture exactly. Admission now contains the upstream lifecycle changes above. The store planner's other change affects an update-state flag, while the demonstrated remove branch remains unchanged. Reset's only file difference removes an obsolete plugin-hook argument; lifecycle mutation and guard ordering remain unchanged. These comparisons justify bounded reuse, not a claim that the refreshed standalone binary has completed the earlier native scenarios.
Related final-effect evidence (source-qualified)
The consolidation evidence includes a real queued continuation's native automation removal and complete stored-inventory readback. At its tested
b0d7186baf5revision, canonical queued cancellation and original-device revocation after ACK prevented continuation native input/removal and left the complete stores unchanged. At139939f8165, actual non-owner role and model-policy changes likewise denied the exact queued run before native input, with all stored columns unchanged. A root audit independently rechecked the source map. The nine transfer/admission/dispatch/grant/tool/mutation owners were byte-identical to this PR's earlier8b9fead79515andd74fb6f38f20revisions; the current seven-of-nine mapping and upstream differences are described above. Surrounding wake, retained-requester and reconnect code differs. These are matching-owner results from the combined revision, not a claim that this standalone binary was executed.The reachable positive ordering is bound scope → queued ACK → original requester cleanup → allowed effect → normal final → natural outbox retirement. ACK is not delivery: the actual outbox remained dispatching until settlement. Existing tests explicitly remove old cohort rows to check bound-scope independence; they do not demonstrate a natural early-removal producer. A generic post-acceptance dispatch exception remains a separate, unproved path. No effect after early outbox deletion, isolated commit-stage refusal or security-owner approval is inferred.
Queued requester reset: production-path negative control
Canonical requester reset after queued acceptance (
5c831c77681): After a genuine managed-child completion bound its requester scope and received a queued ACK, an authenticatedsessions.resetcompleted before the original cleanup gate was manually released. The session ID stayed stable and its lifecycle revision changed, confirmed by a separate canonical readback. The exact original queued run canceled before provider/native input; no continuation user echo or automation removal occurred. Complete canonical inventories and all 18 stored columns across both cron rows remained unchanged immediately after reset and through cleanup.The original requester had genuinely yielded, ending its initial native turn as interrupted; the managed child finished normally before queued acceptance. Normal teardown forwarded two SIGTERMs after the recorded native turn terminals, and both recorded native app servers exited 0/signal:null without kill/timeout fallback. Gateway/provider/state/launcher cleanup completed. Inference was scripted loopback with verified native 0.163 overriding source 0.162.1. The first collector failed because it incorrectly expected reset to replace the session ID; that failure remains preserved, and this corrected run independently verifies the lifecycle-revision contract. This is the reset negative control, not isolated cron-commit refusal, a positive effect after early outbox retirement, standalone-binary proof or security-owner approval.
The nine transfer/admission/dispatch/grant/tool/mutation owners and reset service were byte-identical between this capture and the earlier
d74fb6f38f20; the current seven-of-nine mapping, reset-hook argument change and surrounding lifecycle differences are described above. This is qualified reuse of the combined runtime, not execution of the standalone PR binary.Redacted synthetic reset receipt
{ "sourceRevision": "5c831c7768161d4fb5258ce0f4430b8cfe078b39", "nativeVersion": "0.163.0", "sourceManifestNativeVersion": "0.162.1", "syntheticOnly": true, "scriptedLoopbackProvider": true, "explicitNativeOverride": true, "authenticatedPairedDeviceClients": true, "realManagedChildNormalFinal": true, "scopeBoundBeforeActualQueuedACK": true, "outboxDispatchingAtACK": true, "canonicalRequesterResetAfterQueuedACK": true, "resetACKBeforeManualCleanupRelease": true, "noOrdinaryPredecessorGateReleaseObserved": true, "existingSessionIdPreserved": true, "requesterLifecycleRevisionChanged": true, "canonicalDescribeMatchesResetLifecycle": true, "exactOriginalQueuedRunCancelled": true, "queuePhaseProviderNotStarted": true, "nativeInputRequestsAfterQueuedACK": 0, "continuationNativeUserEchoes": 0, "nativeDynamicCallsAfterQueuedACK": 0, "nativeAutomationRemovalCalls": 0, "initialRequesterYieldInterruptedNativeTurnBeforeQueuedACK": true, "managedChildNormalTerminalBeforeQueuedACK": true, "nativeTurnInterruptRequestsAfterQueuedACK": 0, "completeCanonicalCronInventoryUnchanged": true, "everyStoredCronColumnUnchanged": true, "storedRowsChecked": 2, "columnsPerStoredRow": 18, "recordedNativeAppServersJoinedExitZeroSignalNull": 2, "forwardedNativeSignals": 2, "forwardedSIGTERMsAfterRecordedNativeTerminals": true, "nativeKillOrTimeoutFallbacks": 0, "gatewayConfirmedStopped": true, "observedCleanupErrors": 0, "providerJoined": true, "ownedRuntimeStateRemoved": true, "preImportEnvironmentRemovedAfterCollectorJoin": true, "collectorExitCode": 0, "originalFailedCollectorPreserved": true, "originalCollectorQualified": false, "earlyOutboxRetirementPositiveProven": false, "isolatedCronCommitGuardProven": false, "standalonePRBinaryExecuted": false, "securityOwnerApprovalInferred": false }