Repository navigation
fix: restore gateway recovery fixture lint and types - #134207
Conversation
Preserve the recovery coverage added in #134165 while using the actual WebSocket dependency and authored SecretRef fixture boundary. Co-authored-by: Shakker <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 11:11 AM ET / 15:11 UTC. ClawSweeper reviewWhat this changesThe PR corrects gateway recovery test fixtures so they use the WebSocket type and raw authored SecretRef configuration expected by the existing test infrastructure. Merge readinessKeep open for normal maintainer handling: this maintainer-authored, maintainer-labeled test-only repair fixes the fixture boundary without an introduced correctness or security defect; one exact-head test-type check remains in progress. Priority: P3 Review scores
Verification
How this fits togetherGateway recovery lets an operator manually start configured channel accounts while crash-loop suppression remains active. The changed tests build config and WebSocket RPC fixtures, then exercise the Gateway channel-start lifecycle and shutdown fencing. flowchart LR
ConfigFixture[Authored config fixture] --> RuntimeSnapshot[Runtime configuration]
RpcClient[WebSocket RPC client] --> Gateway[Gateway server]
RuntimeSnapshot --> Gateway
Gateway --> ChannelStart[Channel account start]
Gateway --> ShutdownFence[Shutdown fencing assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +15. Total +15 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the raw source-fixture write and runtime-state reset, then land after the exact-head required checks complete successfully. Do we have a high-confidence way to reproduce the issue? Yes: the introduced lines directly address the test-fixture type and source-config boundary, and the supplied PR evidence reports the affected focused checks; this read-only review did not execute tests. Is this the best way to solve the issue? Yes: using the existing atomic source-config writer plus the existing runtime-state reset preserves the intended unresolved SecretRef behavior without weakening the runtime config writer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 62de64b62192. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The review's remaining verification items are resolved. Exact-head CI33406172793 completed successfully, including I reread the completed review and fetched current main |
Adopt the exact fixture from #134207 to resolve the concurrent CI repair conflict without changing production code. Co-authored-by: Shakker <[email protected]>
Preserve the recovery coverage added in #134165 while using the actual WebSocket dependency and authored SecretRef fixture boundary. Co-authored-by: Shakker <[email protected]>
Apply the accepted correction from ace8a13 (#134207). Preserve the recovery coverage with the actual WebSocket dependency and authored SecretRef fixture boundary. Co-authored-by: Shakker <[email protected]>
* fix(gateway): harden cloud session recovery * fix(gateway): fence worker tools after cancellation * fix(gateway): return exact retained input receipts * fix(protocol): keep input receipts additive * docs(changelog): note cloud session recovery * chore(changelog): leave release notes to release owner * fix(gateway): normalize optional continuation scope * style(gateway): satisfy cloud authority lint * test: align cloud recovery fixtures and native receipt client * test: preserve receipt and send custody expectations after rebase * fix: preserve bootstrap permissions during concurrent staging * fix(workers): preserve child dispatch authority through startup * test(workers): use the leased service projection in startup fixture * test: keep sandbox prompt fixture on its prepared provider handle * test: correct channel recovery fixtures for CI * test: align recovery fixture with main Adopt the exact fixture from #134207 to resolve the concurrent CI repair conflict without changing production code. Co-authored-by: Shakker <[email protected]> * test: isolate source replies and await terminal settlement * test: synchronize maintenance lock publication fixtures * refactor: simplify workspace transfer authorization checks * fix: align bootstrap archive repair with main * test: isolate context tooltip geometry from lazy media * test: use canonical registry in worker startup fixture --------- Co-authored-by: Shakker <[email protected]>
Preserve the recovery coverage added in openclaw#134165 while using the actual WebSocket dependency and authored SecretRef fixture boundary. Co-authored-by: Shakker <[email protected]>
…#133728) * fix(gateway): harden cloud session recovery * fix(gateway): fence worker tools after cancellation * fix(gateway): return exact retained input receipts * fix(protocol): keep input receipts additive * docs(changelog): note cloud session recovery * chore(changelog): leave release notes to release owner * fix(gateway): normalize optional continuation scope * style(gateway): satisfy cloud authority lint * test: align cloud recovery fixtures and native receipt client * test: preserve receipt and send custody expectations after rebase * fix: preserve bootstrap permissions during concurrent staging * fix(workers): preserve child dispatch authority through startup * test(workers): use the leased service projection in startup fixture * test: keep sandbox prompt fixture on its prepared provider handle * test: correct channel recovery fixtures for CI * test: align recovery fixture with main Adopt the exact fixture from openclaw#134207 to resolve the concurrent CI repair conflict without changing production code. Co-authored-by: Shakker <[email protected]> * test: isolate source replies and await terminal settlement * test: synchronize maintenance lock publication fixtures * refactor: simplify workspace transfer authorization checks * fix: align bootstrap archive repair with main * test: isolate context tooltip geometry from lazy media * test: use canonical registry in worker startup fixture --------- Co-authored-by: Shakker <[email protected]>
Share canonical definitive-terminal policy across Gateway presentation, persistence, and replay fencing while retaining retryable-error grace and agent.wait arbitration. Keep cron attempt terminals deferred until logical execution settles, and capture execution facts before awaited bookkeeping. Publish explicit execution-settled facts after retry selection, including failures before backend start. Remove the observer-to-finality bridge while preserving original errors and isolating diagnostic callback failures. Keep legacy unmarked wait arbitration, worker finishing, delivery ownership, and current-main runtime and ContextEngine acceptance fixes intact. Carry the already-landed gateway recovery fixture repair from #134207 for validation against the pinned integration baseline. Refs #133743. Co-authored-by: Shakker <[email protected]>
Share canonical definitive-terminal policy across Gateway presentation, persistence, and replay fencing while retaining retryable-error grace and agent.wait arbitration. Keep cron attempt terminals deferred until logical execution settles, and capture execution facts before awaited bookkeeping. Publish explicit execution-settled facts after retry selection, including failures before backend start. Remove the observer-to-finality bridge while preserving original errors and isolating diagnostic callback failures. Keep legacy unmarked wait arbitration, worker finishing, delivery ownership, and current-main runtime and ContextEngine acceptance fixes intact. Carry the already-landed gateway recovery fixture repair from #134207 for validation against the pinned integration baseline. Refs #133743. Co-authored-by: Shakker <[email protected]>
Share canonical definitive-terminal policy across Gateway presentation, persistence, and replay fencing while retaining retryable-error grace and agent.wait arbitration. Keep cron attempt terminals deferred until logical execution settles, and capture execution facts before awaited bookkeeping. Publish explicit execution-settled facts after retry selection, including failures before backend start. Remove the observer-to-finality bridge while preserving original errors and isolating diagnostic callback failures. Keep legacy unmarked wait arbitration, worker finishing, delivery ownership, and current-main runtime and ContextEngine acceptance fixes intact. Carry the already-landed gateway recovery fixture repair from #134207 for validation against the pinned integration baseline. Refs #133743. Co-authored-by: Shakker <[email protected]>
Share canonical definitive-terminal policy across Gateway presentation, persistence, and replay fencing while retaining retryable-error grace and agent.wait arbitration. Keep cron attempt terminals deferred until logical execution settles, and capture execution facts before awaited bookkeeping. Publish explicit execution-settled facts after retry selection, including failures before backend start. Remove the observer-to-finality bridge while preserving original errors and isolating diagnostic callback failures. Keep legacy unmarked wait arbitration, worker finishing, delivery ownership, and current-main runtime and ContextEngine acceptance fixes intact. Carry the already-landed gateway recovery fixture repair from #134207 for validation against the pinned integration baseline. Refs #133743. Co-authored-by: Shakker <[email protected]>
* fix(agents): settle definitive run lifecycles at their owner Share canonical definitive-terminal policy across Gateway presentation, persistence, and replay fencing while retaining retryable-error grace and agent.wait arbitration. Keep cron attempt terminals deferred until logical execution settles, and capture execution facts before awaited bookkeeping. Publish explicit execution-settled facts after retry selection, including failures before backend start. Remove the observer-to-finality bridge while preserving original errors and isolating diagnostic callback failures. Keep legacy unmarked wait arbitration, worker finishing, delivery ownership, and current-main runtime and ContextEngine acceptance fixes intact. Carry the already-landed gateway recovery fixture repair from #134207 for validation against the pinned integration baseline. Refs #133743. Co-authored-by: Shakker <[email protected]> * fix(ui): avoid false Gateway-change warnings during session startup Bind draft ownership to authenticated hello before browser recovery hydration. Keep real owner and Gateway-process replay fences, and avoid redundant catalog discovery after hydration. Fixes #133785. * test(cron): use canonical terminal stream fixtures Emit message_start, message_end, and complete agent_end facts for failure, incomplete, cancellation, and success scenarios. Preserve the existing assertions while matching current main's stream-ingress accounting contract. Verified four boundary cases fail before the correction and pass afterward; the existing fifteen cron lifecycle scenarios also pass. No runtime changes. * fix: preserve Fetch receipts and isolate terminal error imports Keep Fetch configuration and request-continuation receipts alive across permitted document changes without relaxing access revocation, exclusive lease ownership, response-stage checks, or document-sensitive body reads. This prevents successful native operations from falsely retiring both clients' target sessions. Import the existing pure error-name helper directly instead of loading its logging re-export during terminal classification. Preserve the same error semantics while removing unnecessary logging, config, and filesystem imports. Validation: 359 browser owner/sibling tests, 162 terminal/failover tests, changed-file gates, full build, and fresh full-candidate review through P2. The unchanged normalizer integrity guard now passes with eight bundled modules. Exact-head CI and real browser/UI proof remain pre-merge gates. Refs: #133747 * test(ui): keep draft expectations scoped to recovery ownership Retain the draft after a same-owner Gateway restart, but require a fresh recovery owner to start without the previous owner's text. Keep pending-state retirement, one-create, disabled-start, and original-route assertions for all three cases. This matches the existing draft-persistence owner boundary; no runtime behavior is changed. The rebased late-hydration regressions fail with the original Gateway-change warning on the pre-fix owners and pass with the repair. The complete focused UI run passes 429 tests, including 38 browser cases. Refs: #133747 --------- Co-authored-by: Shakker <[email protected]>
…w#133747) * fix(agents): settle definitive run lifecycles at their owner Share canonical definitive-terminal policy across Gateway presentation, persistence, and replay fencing while retaining retryable-error grace and agent.wait arbitration. Keep cron attempt terminals deferred until logical execution settles, and capture execution facts before awaited bookkeeping. Publish explicit execution-settled facts after retry selection, including failures before backend start. Remove the observer-to-finality bridge while preserving original errors and isolating diagnostic callback failures. Keep legacy unmarked wait arbitration, worker finishing, delivery ownership, and current-main runtime and ContextEngine acceptance fixes intact. Carry the already-landed gateway recovery fixture repair from openclaw#134207 for validation against the pinned integration baseline. Refs openclaw#133743. Co-authored-by: Shakker <[email protected]> * fix(ui): avoid false Gateway-change warnings during session startup Bind draft ownership to authenticated hello before browser recovery hydration. Keep real owner and Gateway-process replay fences, and avoid redundant catalog discovery after hydration. Fixes openclaw#133785. * test(cron): use canonical terminal stream fixtures Emit message_start, message_end, and complete agent_end facts for failure, incomplete, cancellation, and success scenarios. Preserve the existing assertions while matching current main's stream-ingress accounting contract. Verified four boundary cases fail before the correction and pass afterward; the existing fifteen cron lifecycle scenarios also pass. No runtime changes. * fix: preserve Fetch receipts and isolate terminal error imports Keep Fetch configuration and request-continuation receipts alive across permitted document changes without relaxing access revocation, exclusive lease ownership, response-stage checks, or document-sensitive body reads. This prevents successful native operations from falsely retiring both clients' target sessions. Import the existing pure error-name helper directly instead of loading its logging re-export during terminal classification. Preserve the same error semantics while removing unnecessary logging, config, and filesystem imports. Validation: 359 browser owner/sibling tests, 162 terminal/failover tests, changed-file gates, full build, and fresh full-candidate review through P2. The unchanged normalizer integrity guard now passes with eight bundled modules. Exact-head CI and real browser/UI proof remain pre-merge gates. Refs: openclaw#133747 * test(ui): keep draft expectations scoped to recovery ownership Retain the draft after a same-owner Gateway restart, but require a fresh recovery owner to start without the previous owner's text. Keep pending-state retirement, one-create, disabled-start, and original-route assertions for all three cases. This matches the existing draft-persistence owner boundary; no runtime behavior is changed. The rebased late-hydration regressions fail with the original Gateway-change warning on the pre-fix owners and pass with the repair. The complete focused UI run passes 429 tests, including 38 browser cases. Refs: openclaw#133747 --------- Co-authored-by: Shakker <[email protected]>
Related: #134165.
What Problem This Solves
Resolves a problem where pull requests based on the channel recovery change fail the core lint and test-type checks before their own changes can be validated.
Why This Change Was Made
Keep the existing recovery tests and their assertions intact: the shutdown test's Promise executor must not return the Immediate handle, and the RPC helper must use the actual
wsWebSocket type. Write the intentionally unresolved SecretRef fixture through the existing atomic JSON fixture path, with canonical SecretRef checks and the same runtime-state reset, instead of passing authored source values to the resolved-config writer's string-token contract.User Impact
No production behavior or public API change. The existing tests still verify plaintext and resolved-secret account recovery, unavailable-secret isolation, breaker bypass, in-flight ownership, and shutdown fencing. No deadlines, retries, or assertions change.
Evidence
wsmismatch and object-token errors in the same newly added fixture.The raw parent diff of c003292 confirms these fixture additions in #134165. This follow-up preserves its channel-recovery behavior and coverage.