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: blocked before merge. What this changesThis PR normalizes compatible client discovery and preserves verified completion context when the same authenticated owner steers an active turn. Example: Alice reconnects with client capabilities ["ui-commands", "ui-tool-images"] while her active turn was admitted with ["ui-commands"].
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open: it addresses concrete steering failures without an identified code defect, but retaining completion provenance for same-owner human input still needs an explicit owner decision. Priority: P2 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherInbound messages enter reply admission, where the session controller compares prepared caller authority with the active execution before forwarding accepted input to its guarded runtime sink. flowchart LR
A[Authenticated incoming message] --> B[Reply admission]
B --> C[Frozen authority projection]
C --> D[Current owner and policy checks]
D --> E[Guarded runtime injection]
D --> F[Followup or rejection]
E --> G[Original model turn]
Technical reviewBest possible solution: Use the existing authority owner for bounded normalization and settle the completion-provenance policy while preserving permission, revocation, and reply-expectation guards. Do we have a high-confidence way to reproduce the issue? Current source compares discovery capabilities and completion-policy provenance in authority fingerprints, and the supplied unchanged-input counterfactual shows seven relevant failures before the repair; no target code was executed during this review. Is this the best way to solve the issue? The smallest complete repair normalizes discovery through the existing prepared authority owner at both admission paths; the patch does this without adding persistent state or a competing authority owner, while its separate completion-policy exception remains an owner choice. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b28c930d1596. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +87, Tests +445. Total +532 across 11 files. Added test files: 2. 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 (4 earlier review cycles)
Reviewed October 19, 2026, 7:55 AM ET / 11:55 UTC (Revision 5). |
|
@clawsweeper re-review Updated head 457d525f5079847c18d1f26ca1dfe7929a47d26e applies normalization at early adoption and preserves verified completion context only during compatible authenticated-owner projection. The body now records actual native-provider same-direct-run marker consumption from a real model-created child completion, synthetic capability/revocation evidence, nine canonical handoff controls, and current owning types/lint/tests/review. The combined isolated runtime also includes the separate reply-expectation publication fix; that change is excluded from this PR. Reduced authority and optional-reply incompatibility remain rejected. Maintainer normalization/security approval is still requested. |
|
🦞👀 Re-review progress:
|
|
@steipete: could you review the same-owner steering policy at |
|
🦞👀 Re-review progress:
|
|
Response to the behavior decision in the current review. The body now answers the completion-provenance question by composing the retained execution-owner contract from #159850 with the captured completion restrictions and revocation contract from #160786. It identifies the exact guarded projection, keeps explicitly non-human provenance outside it, and preserves the existing proof qualifications and pre-fix coverage gap. |
|
@clawsweeper re-review Conflicts are resolved at |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review All five conflicts are resolved at |
|
🦞👀 Re-review progress:
|
|
Updated the existing relationship note for #177698 at The frozen execution capability/current-caller projection repair remains included through the actual fallback producer. Compatible human input retains the captured execution permissions; current sender authority is projected independently and checked at admission. The guard remains intact. The recommendation is supported Codex human steering now, with existing peer scheduling preserved until a supported native mailbox API is available. The conservative policy is implemented in the current candidate, its tests and documentation. #175810 is now inherited from upstream. The consolidation body distinguishes exact-revision runtime evidence, reused unchanged source owners, remaining proof gaps and the security-owner decisions. This PR remains open for maintainer choice until the relevant alternative is accepted; no owner approval or complete replacement of the broader scheduling proposal is inferred. |
bdef02e to
b508fce
Compare
|
Superseded by merged #177698 (landed commit f83b7ad). The consolidation carries the frozen execution-capability and current-caller projection repair through the actual fallback producer. Its bounded same-requester completion-context policy was explicitly accepted by the maintainer: #177698 (comment). Closing this standalone alternative so the remaining steering work is tracked against the landed owner. Optional-work reply promotion remains separate in #176245; the settled-predecessor command claim repair remains separate in #180228. |
What Problem This Solves
Compatible owner messages can be queued behind a busy or recovered turn because incoming browser discovery facts or an active completion’s policy provenance are compared as replacement execution authority.
User Impact
The same authenticated owner can steer compatible busy turns while retaining their existing tools and personal destinations. No configuration or migration is required. Optional-reply completion turns retain their existing reply-expectation guard.
Why This Change Was Made
Use the prepared owner’s normalization before the early adoption comparison as well as overlay projection. A capability superset cannot expand the active turn’s frozen capabilities or add a personal destination. For human owner input joining an existing trusted completion, projection retains that completion’s verified handoff and provenance; the incoming message and its provenance remain unchanged.
All other incoming permission, scope, model, tool-binding and live authority checks remain authoritative. Reduced capabilities, reduced privileges, different-profile changes, peer-origin messages and revoked handoffs remain rejected. The separate terminal-reply expectation publication fix is not included here.
Related: #170216. This complements #165122’s execution-route compatibility work.
Current candidate and validation
Current source
6cc3428d05e87cd0b83d0d9b31da3ab05f650c6dmerges the precedingb508fcee0aab483abbce5ca57734b53663cb01e6head with pinned upstream42a73b62bb18abd0dc6b68fca0daf50f62331f79. The sole manual conflict resolution retains the five same-profile fallback scenarios while adopting upstream's run-aware operator-authority fixture. Its current model policy is prepared from that run; no production guard or regression assertion was removed.All 58 affected tests across four files pass: fallback steering, prepared/direct authority and prompt-prefix stability. Core production, messaging and agents-tools test typechecks, scoped typed lint, formatting, whitespace and an independent applied-conflict source review pass. The canonical runtime build records this exact commit; its UI gzip-size advisory remains disclosed and no budget was changed. Existing native captures below retain their recorded source and combined-runtime qualifications; no new native execution or deployment is claimed. The completion-provenance behavior remains an explicit maintainer decision.
Behavior decision
The review's question is whether compatible authenticated owner input may retain a completion's verified handoff policy and provenance during projection. I recommend it because two existing contracts should compose: #159850 lets permission-compatible input steer while retaining the execution owner and personal destinations; #160786 retains a completion's captured restrictions with live revocation checks.
The projection preserves that existing completion context only for authenticated same-profile owner input with external-human or absent provenance. It does not rewrite the incoming message or replace the running turn's tools. Existing preparation still checks the incoming permission facts and current authority, including revocation. Explicit non-human provenance does not qualify for this exception.
Codex's active-turn admission likewise adds input through the existing active task and TurnContext. That is an architectural reference, not a substitute for OpenClaw's multi-user permission checks. The requested decision is the narrow composition above; changing the provenance comparison still warrants owner scrutiny. The existing combined-runtime proof qualification and per-case pre-fix evidence gap remain as documented.
Recorded earlier upstream conflict repair
Refreshed head
1a7622eb851b52d2657f2e42b877c6da67526d74merges the previous public head with pinned upstream00575becc9fce53efc73b319a16fa71e6f4123b9. It retains both histories and ports the existing normalization contracts and operation forwarding into upstream's session-controller owners. Deleted registry files remain deleted. The normalizer uses the current controller's local current-owner guard; fixtures retain upstream's guarded V2 sink and queued-follow-up coverage.Fresh checks pass: all six selected steering/authority suites (100 tests across two canonical shards, 77.67 seconds), production core types, owning agents-tools and messaging test types, scoped typed lint, formatting, whitespace, and independent P0–P2 review. Review found no actionable issue in the complete staged PR diff; unavailable unchanged implementation context and actual test execution were outside its independent coverage. Same-profile discovery changes, narrowing, execution-policy changes, legacy snapshots, source/cohort revocation, explicit peer provenance, and optional-completion rejection remain covered.
New-head CI passed on this refreshed head. Existing runtime captures keep their original source qualifications, rather than being relabeled as executions of this merge. The behavior recommendation above remains a maintainer decision; this integration does not add reply promotion or broaden task authority.
Evidence
The earlier client-envelope regression and actual-native positive/revocation proofs remain applicable to the unchanged normalization semantics. The added canonical handoff regression exercises real admission, prepared authority, registered direct target, inbound overlay and injection, including reduced scopes, revoked source/cohort, different profile, peer provenance, post-projection revocation and optional-reply controls.
On the preceding implementation revision, 33 focused tests pass (nine canonical direct-handoff cases and 24 early-adoption cases). Core types, both owning test type graphs, scoped type-aware lint, formatting, and diff checks pass. Fresh P0–P2 review found no actionable issues. An isolated actual-Gateway/native-provider test using only synthetic conversation content also passed: a model-created child produced a new busy direct completion, authenticated owner steering reached that captured target, the verified handoff remained retained, and the original direct provider run finished with the injected marker. The marker was absent from the initial prompt/transcript; the final was a provider result, not a Gateway fallback or provenance mirror. The task Gateway stopped and its temporary authentication copy was removed. This combined runtime proof also included the separate reply-expectation publication fix; that fix is not part of this PR. Earlier actual-native capability and canonical-device-revocation proof covers the discovery normalization path. No live incident content or production configuration is used in the fixtures. Exact live fingerprint preimages were unavailable, so the tests establish these concrete failure classes rather than claiming every observed queue had the same cause.
The combined runtime was subsequently activated in the operator’s local Gateway; RPC health and plugin loading pass. Separate retained-turn recovery errors remain under investigation. The isolated same-direct-run native-provider proof above establishes the steering behavior; deployment alone does not establish that every historical hang is resolved.
Architecture CI repair
The new full-input type import introduced a static dependency cycle through queued execution state. The normalization contract now depends only on the existing lightweight client-discovery fields, while a generic preserves the caller’s full input type and all other fields. No runtime normalization or authority check changes. The actual architecture check now reports zero cycles; all 33 focused cases, scoped type-aware lint, formatting and fresh P0–P2 review pass on the corrected source. The cold local core type check exceeded its 600-second budget without diagnostics; the owning test graph was stopped under host memory pressure. Exact-head CI for
76eed159575c95001bf5a9582116fe986d6bcdeenow passes, including production types, test types, lint, runtime checks, andopenclaw/ci-gate(CI run). This supplies the previously pending type-check evidence; earlier local type results above apply to the preceding revision.Inspectable synthetic native results
This is an allowlisted projection of actual isolated RPC/provider and final-effect readbacks. The run labels preserve the observed equality of the steering target and provider-final owner. The capability-positive and direct-handoff runtimes also include the separate reply-expectation publication fix. For revocation, a task-only observation hook pauses after real awaited preparation, canonical device-token revocation occurs, then the existing authority guard denies the effect. The earlier RPC started acknowledgment is not delivery proof. Reduced-authority follow-up inputs were cancelled after active-steering rejection; valid new turns with lower authority are not globally forbidden. No raw operator data are included.
{ "syntheticInputsOnly": true, "capabilitySuperset": { "busyCheckpointReached": true, "correctionAccepted": true, "correctionTarget": "original-run", "providerFinalRun": "original-run", "originalRunTerminal": "ok", "providerFinalText": "Command finished successfully. CAPS_NATIVE_CONSUMED", "markerAbsentFromInitialPrompt": true }, "directCompletion": { "modelSpawnAccepted": true, "nativeBusyCheckpoint": true, "actualDirectTargetCaptured": true, "actualDirectProjectionCalled": true, "completionHandoffRetained": true, "actualProviderFinalBelongsToOriginalDirectRun": true, "providerMarkerObserved": true, "initialTranscriptMarkerAbsent": true, "finalHasProviderMetadata": true, "finalHasUsageMetadata": true, "finalIsNotGatewayFallback": true, "gatewayStopped": true, "nativeAuthRemoved": true }, "reducedCapabilities": { "actualAuthorityMismatchObserved": true, "nativeMarkerFrames": 0 }, "reducedScopes": { "actualAuthorityMismatchObserved": true, "nativeMarkerFrames": 0 }, "revocation": { "realAwaitedFingerprintPreparationCompleted": true, "canonicalDeviceTokenRevocationCommitted": true, "existingPostAwaitAuthorityGuardRejected": true, "nativeMarkerFrames": 0, "canonicalTranscriptMarkerRowsBeforeRevocation": 0, "canonicalTranscriptMarkerRowsAfterRevocation": 0, "newCanonicalTranscriptMarkerRows": 0, "acceptedInputCustodyState": "cancelled", "nativeEffectDeniedDespiteEarlierStartedAck": true }, "cleanup": { "syntheticSessionCancelled": true, "taskGatewayStopped": true, "temporaryCredentialCopyRemoved": true } }Exact-base before/after regression matrix
Replayed all three owning suites with unchanged current test inputs. Only the five production files introduced by this PR were replaced with their complete pre-fix
eedd4cb25232bb3ceaa21764dd854e7a12bc1f7dversions, then restored byte-for-byte to76eed159575c95001bf5a9582116fe986d6bcdeebefore the passing run. All four test/support input hashes remained unchanged. This is synthetic source-entry proof; no Gateway, native process, external provider, or operator state was used.Seven failures discriminate the repaired behavior:
headless-recovery,caps-only,protocol-only, andtarget-onlyreject compatible steering before the fix; shared asynchronous/prepared synchronous projection changes its fingerprint;trusted-completionrejects the compatible owner correction; and fallbacksame-profile-capschooses follow-up instead of steering. All seven pass afterward.The other two failures qualify controls: late-cohort revocation cannot reach its new queue checkpoint on old code, and optional completion is rejected at tool authority rather than the retained reply-expectation guard. They are not two additional user bugs or evidence of an old authorization bypass. The remaining 37 cases pass before the fix, and all controls pass afterward. No timeout, import, type, API, or fixture-setup failure is counted as a behavior regression.
Optional-completion reply promotion is a separate repair in #176245; this PR retains its existing reply-expectation guard.
Recorded preceding upstream integration
Resolved all reported conflicts against upstream
9509fc22; current headbdef02e7d91b884c295c92bf74fa95cbf230586e. Current requester-principal checks, same-conversation collaboration, source revocation, fallback selection fencing and guarded input delivery remain intact. Client discovery is normalized without replacing incoming execution permissions. The shared fixture now preserves the current requester identity.Inbound projection now lives in the existing inbound module; the reply operation authority contract lives beside the backend authority contracts. Both line limits remain unchanged, and both runtime and architectural import-cycle checks pass. No replacement authority owner, forwarding alias or permission bypass was added.
134 checks pass in seven owning suites (46.4 seconds canonical wrapper wall time). Core and owning test types, scoped typed lint, formatting, line-cap/mock/assertion ratchets and fresh independent P0–P2 source review pass. Reviewers did not execute project code. Native captures above retain their original head qualification; this integration does not claim a new live/native run. Broad CI remains the exact-head gate. All fixtures are synthetic.
The maintainer decision on bounded same-profile human input preserving a verified completion handoff remains open. This repair preserves the proposed behavior and does not assert owner approval.