Skip to content

refactor(gateway): deslop gateway fourth pass - #158786

Merged
steipete merged 6 commits into
mainfrom
deslop/l72-gateway4
Sep 27, 2026
Merged

steipete merged 6 commits into
mainfrom
deslop/l72-gateway4

Conversation

@steipete

@steipete steipete commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

The tooling dependency #159068 is merged. This diff now contains only the Gateway cleanup and its assertion-baseline reduction.

Status: September 27 rebase force-pushed; exact-head hosted CI is attached and queued. Published head: 954fada0ff9d67059e9182c85e51cb1ef41f8eeb. CI run 36310507291 reports that exact head. Tests, protocol, SDK checks, and build passed; the changed-file gate failed only two unchanged main line caps. Earlier evidence below is historical.

What Problem This Solves

Gateway internals still duplicate request adapters, projections, lifecycle plumbing, and shared utility behavior after earlier cleanup passes. The prepared rebase of this fourth pass removes 1,253 net production lines across 131 Gateway files.

User Impact

No intentional user-visible change. RPC names, parameter/result/event shapes, authorization, transcript bytes and ordering, restart and worker fencing, persistent-store semantics, config keys, and public plugin SDK exports remain unchanged.

Why This Change Was Made

Existing owners now serve more callers, with small descriptors where handlers share a flow. Production changes stay in src/gateway; the assertion baseline shrinks by exactly 20 removed assertions. Three test/support files move type imports without changing cases or assertions.

  • Request adapters: use defineValidatedGatewayHandler for channel pairing, effective tools, approval configuration, wizard sessions, catalog terminal start, session discussion, and Talk marks. Remove redundant parameter copies and forwarding while preserving original request objects and specialized errors.
  • Agent admission and persistence: share invalid-request responses and repeated lifecycle/delivery predicates, consume canonical continuation types, and normalize prepared facts once.
  • Sessions and transcripts: consolidate page-reader routing/capture, announce classification, and exact/bulk row-read setup; remove catalog authorization forwarding and duplicate text normalization.
  • Workers: share pending-result selection and provisioning checks, reuse canonical types, and remove projection/transport forwarding. Authority checks remain at their original boundaries.
  • Approvals and lifecycle: derive operation recognition from dispatch, share grant and terminal-row projection, reuse deadline settlement and config override preparation, and bind coordinator operations directly.
  • Desktop, terminal, Talk, HTTP, and GitHub: share RFB buffering/write settlement, reuse deferred/cache/normalization/error owners, and remove result forwarding, duplicate declarations, and narrating comments.

The four preceding PR file lists were checked before the size census. Most edited production files were untouched by those passes; overlaps complete caller cutovers.

Evidence

Rebase on September 27, 2026

Rebased the five Gateway cleanup commits onto main 9ae6e185306272725c36231de98017515c475d33. Candidate head: 954fada0ff9d67059e9182c85e51cb1ef41f8eeb; tree: 0e8b4e33b38dfd56567f12926397a4ca622b0a25.

  • Kept: all other Gateway cleanup hunks, the three canonical type-import-only test/support edits, and all eight baseline edits removing exactly 20 assertions. Production delta: 1,659 additions / 2,912 deletions = -1,253 lines across 131 files.
  • Dropped: only the obsolete raw auth-pruning setInterval/unref simplification in auth-rate-limit.ts, because main replaced that code with GatewayScheduler in refactor(gateway): schedule auth pruning with the runtime owner #159455. Main's scheduler injection, clock, cancellation, disposed guard, and penalty settlement remain intact. The retained auth-file diff now removes comments only. No behavior decision was needed.
  • Main preservation: main's cron scheduler retry/cancellation implementation remains unchanged. The old synchronization merge 3fa091da8b6af0869b72044565f732e0ff81216d had no manual resolution delta and its main parent is an ancestor of this base. All main tests remain unchanged except the three historical type-import edits; no test logic, assertions, timeouts, concurrency settings, or skips changed.
  • Review: fresh isolated Codex autoreview completed clean through P2; an independent source/history comparison also found no rebase-equivalence defect.
  • Remote proof: provider blacksmith-testbox, lease tbx_01m3gyeq9kwp0t5tce7adbjbga, run 36305198391. The wrapper verified the exact candidate source/tree. Frozen install passed before the gates. The cross-project selection remained the exact 417 files listed below, all present on this base. Source-tree identity and zero tracked drift were checked before and after.
  • Changed-file gate: node scripts/check-changed.mjs --base 9ae6e185306272725c36231de98017515c475d33 -- <135 changed paths> completed in 1,585s. Every phase except broad core lint passed, including all 25 test type partitions, core types, formatting, boundaries, ratchets, and dead-export scans. Lint found two untouched files above 700 lines: src/gateway/session-row-projection.ts (701) and src/agents/subagents/registry/subagent-registry.task-settlement.test-support.ts (811). Both are byte-identical at base, candidate, and refreshed main d86796f25b3632bd211ebf1d78e430c7bd844c88. The existing untouched-file enforcement repair fix(ci): keep untouched line-limit drift from blocking changed checks #158995 remains open. No duplicate repair, suppression, or test change was added.
  • Cross-project tests: all 12 Vitest shards passed, 9,606 tests passed / 7 existing skips, in 2,264s, including the original seven-file E2E group (9/9 passed). The prior connection timeout did not occur in this run; this is passing current-candidate evidence, not a claim to have fixed the historical transient.
  • Protocol/SDK/build: pnpm protocol:check passed (2s), pnpm plugin-sdk:check-exports passed (under 1s), pnpm plugin-sdk:surface:check passed (4s), and pnpm build passed (382s). Build emitted a non-blocking UI startup gzip warning, 362.7 KiB against 362.6 KiB; no budget was changed.
  • Completion: the wrapper reported command exit 1 solely because of the recorded lint failures; all later requested phases completed. Lease stopped after completion. The prepared head merges without conflicts against the refreshed main snapshot. The previous auto-merge request was disabled through GraphQL, its absence verified, and the candidate force-pushed with an explicit lease against 3fa091da8b6af0869b72044565f732e0ff81216d. Exact-head hosted CI attachment is confirmed. A new auto-merge request was observed afterward at 09:48:31 UTC; this rebase operation did not re-arm or merge.

Rebase on September 26, 2026

Rebased onto main 40a14550a2b017010417d4225b6bc7a0ab44b153. Candidate head: e2484a96c62ab217b230a6fa8f3abf1875b1bf14; tree: b99cfb1d6cb484c2282d70f13f495f880ff54929.

  • Kept: all Gateway simplifications from the five Gateway commits, including request adapters, admission/persistence, sessions/transcripts, worker projections, approvals/lifecycle, desktop/terminal/Talk/HTTP/GitHub helpers, canonical type imports, callback receiver preservation, and the exact 20-assertion baseline shrink. Production delta remains 1,660 additions / 2,917 deletions = -1,257 lines across 131 files.
  • Conflict resolution: retained main's defaultSha === headSha shortcut in control-ui-session-prs-landing.ts and reapplied the shortened adjacent comment. Main's scheduler injection, proxy-capture shutdown cleanup, and queued-abort diagnostics also remain intact. No behavior choice was needed; main's tests are unmodified.
  • Dropped: the two stacked tooling commits already included by merged fix(tooling): stabilize declaration and process fixture validation #159068. No Gateway simplification hunk was dropped. Four Gateway commits are patch-identical; the first differs only in context around intervening main changes.
  • Test selection: reuse the previous 409-file selection, omit only http-common.fuzz.test.ts deliberately deleted on main by test(runtime,plugins): remove low-value tests (batch d015) #158721, union the prior 17-file boundary selection, and add main's control-ui-session-prs-branch.test.ts: 417 files through the canonical cross-project Vitest router.
  • Review: independent Codex review completed through P2. Its sole finding claimed draining workers with destroy intent reach orphan recovery; rejected against the full function: provider-lifecycle.ts:598–601 handles non-null destroy intent with finishDestroy and an unconditional return before the simplified branch. There is no intervening fallthrough await or record reassignment. No accepted finding remains.
  • Changed-file gate: pnpm install --frozen-lockfile passed; node scripts/check-changed.mjs -- <135 changed paths> ran for 1,536.20 seconds and failed only broad core lint: untouched src/gateway/session-row-projection.ts has 701 counted lines against its 700-line cap. Core/test type graphs, formatting, boundaries, ratchets, coercion/deprecation guards, and all dead-export scans passed. The failing file is identical at base, candidate, and refreshed main (e8b90850758fa0e69bc0b9d29fff5b9c77ba504c). Existing #158995 owns the proposed untouched-file enforcement fix; it is open and not incorporated here. No duplicate repair, suppression, or unrelated test change was added.
  • Cross-project tests: node scripts/run-vitest.mjs <417-file selection below> finished all 12 projects in 2,122 seconds: 9,609 passed, 1 failed, 7 existing skips. The sole failure was unchanged src/agents/bash-tools.exec-gateway-approval.e2e.test.ts, “keeps a scheduled approval floor in a reused full-permission session,” during initial connection: gateway closed (4000): connect timeout at 16.9 seconds, before exec assertions. The original seven-file E2E selection subsequently passed 7 files / 9 tests on the fresh lease (513s wrapper wall, including prerequisites; 66.41s Vitest). The same timeout, assertion, and concurrency settings were retained. This is nonreproduction evidence, not a fix or a green replacement for the original broad run. The close reason comes from the unchanged fixed 15s client connect/hello timer; the test's 120s acquisition/request/preauth settings do not configure it. No safe causal repair was established.
  • Protocol/SDK: pnpm protocol:check passed (2s), tracked protocol-output comparison showed zero drift, pnpm plugin-sdk:check-exports passed (1s), and pnpm plugin-sdk:surface:check passed (3s).
  • Build/transport: the original Testbox workflow was cancelled at 03:51:29 UTC after 105 minutes; the stream exited 255 while pnpm build was active, so that attempt supplies no build verdict. Original lease completed and was stopped. Fresh blacksmith-testbox lease tbx_01m3gg95e223848qy5trp2jy1w, run 36292996872, passed frozen installation (1s), pnpm build (399s), and the original seven-file E2E selection (513s). The completion command exited zero and verified the exact source tree before and after. The original lease and fresh completion lease are stopped. Provider blacksmith-testbox, lease tbx_01m3g9t0v3sbefj7550nh6nng0, Testbox run 36287534534.

Force-pushed with an explicit lease against the prior head. CI run 36294437446 is attached to exact head e2484a96c62ab217b230a6fa8f3abf1875b1bf14 and its hosted outcome remains pending. GitHub reports the PR open and mergeable, with no auto-merge request. The unrelated mac-elevation-artifact.test.ts failure is untouched. No auto-merge operation was performed.

Historical evidence

Independent Codex review is clean through P2. The previous head was 5413fc9bf5779c5bda5f9d851673efb60aa746f7; all five Gateway commits remained patch-identical during the final mechanical rebase. Its exact tree, 1e63ffc993055babffc12d84df29a65ecc4af3e4, passed remote validation before publication.

  • Previous Testbox: provider blacksmith-testbox, lease tbx_01m3fk99zdcyj4zhe89w8pem0d, run 36266423609. Frozen dependency install; node scripts/check-changed.mjs -- <changed files> passed (1,879s); node scripts/run-vitest.mjs <17 rebase/importer boundary files> passed 502 tests across three projects (84s); pnpm build passed (374s). pnpm protocol:check plus tracked-output comparison produced zero protocol drift. pnpm plugin-sdk:check-exports and pnpm plugin-sdk:surface:check passed. Source tree was checked before and after; final receipt was exit 0. Lease stopped.
  • Broad Gateway/importer proof: lease tbx_01m3eh08ffz8e306qkvq4t4hdh, run 36233149170: 409-file node scripts/run-vitest.mjs selection, all 12 shards passed, 9,641 tests passed / 7 existing skips, 2,348s. Later correction/rebase boundary selections, full builds, dead-code, protocol, and SDK checks also passed. Corrected worker selection passed 127 tests across eight files in 82s. These historical results cover the unchanged cleanup; the final campaign above covers intervening boundary changes.
  • Test cost: the two changed test files only move type imports. pnpm test <file> --maxWorkers=1 on Testbox: prepared-pool repository 2 tests / 20s wall; provider retention 14 tests / 25s wall. Hosted run 36237243299 measured test-body times 5.440s and 17.393s. No new test cases.
  • Previous-head CI: run 36272876007 was cancelled by fail-fast after macos-node-2 failed in the unchanged mac-elevation-artifact.test.ts case “rejects mismatched worker commit.” /usr/bin/lipo reached termination, but managed process cleanup reported kill EPERM for process group 28513 and EPROCESSGROUP_CLEANUP_FAILED. The shard passed 552 of 553 tests. Bounded owner-level investigation did not establish a safe repair; the cancelled Swift job provides no final-head Swift verdict. Previous head 99d23ae82a3b passed run 36262507857; that is historical evidence, not final-head green.

Fixes Found Along the Way

Validation corrections preserve handler-key typing, callback receivers, canonical type imports, and existing lint/normalization contracts. No deadlines, assertions, concurrency settings, or skips were relaxed.

Separate tooling repairs address a disappearing Linux thread during process-fixture inspection and unnecessary declaration parsing; their proof and limits are documented in the dependency PR. Main independently repaired QA references (18b0130a21b), tooling fetch expectations (380a77a86f6), UI line limits (ea400438182), and the state-worker line cap (6c7325097fae); all are incorporated.

The prior head's macOS job in run 36265998280 failed the unchanged MacNodePresenceReporterTests case “activity crossing opt out is followed by a clear” with retryClear=true: one clear was observed, two expected. The reporter and test match main. Investigation remains separate; a later green replay will not be represented as a fix.

An earlier Testbox stream exited 255 while its remote command continued. Completed receipts were recovered; incomplete pipeline work was not counted. The final campaign used quiet per-phase logs and an atomic completion receipt and completed successfully. All lane-owned Testboxes are stopped. The Windows dispatcher left a temporary namespace whose descendant settlement was unverified; the disposable Actions runner owned cleanup.

Native failure investigation

The unchanged Mac Node 2 shard was replayed on matching macOS 15.7.9 / Darwin 24.6.0 resources in diagnostic run 36277943074: 553/553 tests passed, then 20/20 focused artifact-case repetitions passed. No EPERM, cleanup diagnostic, or retained-resource outcome appeared. This is nonreproduction evidence, not a fix.

On a fresh main base with the affected presence reporter and test unchanged, Swift diagnostic run 36279900524 completed five full default-profile suites, 2,289 tests each, plus the existing rendered and named partitions. Every receipt exited zero; no presence timing-failure observation was emitted. The older failing suite had 2,291 tests; unrelated main changes account for the different suite source. The deadline, retry assertion, runner width, and selected partitions were preserved. The crossing-opt-out case uniquely requires the automatic retry; the simpler retry test can make both attempts inside its setter and is not a substitute.

Controlled Darwin run 36283429845 established a real zombie-only group and reproduced EPERM, with verified cleanup of every fixture child. It did not establish false cleanup: a live custodian in the same session could rejoin the retained group. The receipt's falseCleanupReproduced field records the original hypothesis and is not an accepted bug verdict. Linux's existing guard examines the whole session; Darwin's ps sess field cannot provide equivalent evidence. A group-only exception would weaken the boundary, so none was added. This experiment does not attribute the original transient lipo failure.

The diagnostic harness first hit GitHub's 500 KiB workflow-file limit, then a missing receipt-directory setup error before Swift execution. Both harness problems were corrected and reviewed before the completed runs above. Diagnostic-only workflows are not final-head CI proof. No test timeout, threshold, assertion, concurrency setting, skip, process-fencing contract, or production behavior was changed to obtain green. No safe additional repair PR was established for the two unresolved native failures.

Exact current cross-project test selection (417 files)
node scripts/run-vitest.mjs \
  src/agents/agent-harness-completion-delivery.test.ts \
  src/agents/bash-tools.exec-gateway-approval.e2e.test.ts \
  src/agents/harness/native-hook-relay.test.ts \
  src/agents/main-session-recovery/main-session-restart-dispatch-start.test.ts \
  src/agents/main-session-recovery/main-session-restart-recovery.test.ts \
  src/agents/mcp-connection-resolver.test.ts \
  src/agents/prepared-model-runtime.hot-reload-dispatch.test.ts \
  src/agents/subagents/announce/subagent-announce-delivery.runtime.test.ts \
  src/agents/subagents/announce/subagent-announce.requester-cron-authority.test.ts \
  src/agents/subagents/announce/subagent-announce.requester-settle-dispatch.test.ts \
  src/agents/subagents/spawn/acp-spawn.authority.test.ts \
  src/agents/subagents/spawn/acp-spawn.test.ts \
  src/agents/subagents/spawn/subagent-spawn-gateway.test.ts \
  src/agents/subagents/spawn/subagent-spawn.in-process-gateway.test.ts \
  src/agents/subagents/spawn/subagent-spawn.preparation-authority.test.ts \
  src/agents/subagents/spawn/subagent-spawn.production-boundary.test.ts \
  src/agents/tools/cron-tool.management.test.ts \
  src/agents/tools/gateway.runtime-identity.test.ts \
  src/agents/tools/in-process-gateway.cron-completion.test.ts \
  src/agents/tools/in-process-gateway.test.ts \
  src/auto-reply/reply/get-reply-run.media-only.test.ts \
  src/cli/devices-cli.gateway.test.ts \
  src/commands/doctor-hosted-gateway.test.ts \
  src/gateway/agent-runtime-identity-token.test.ts \
  src/gateway/agent-turn/agent-request-preflight.source-lineage.test.ts \
  src/gateway/agent-turn/agent-request-preflight.test.ts \
  src/gateway/agent-turn/agent-run-dispatch.legacy.test.ts \
  src/gateway/agent-turn/agent-run-dispatch.owner.test.ts \
  src/gateway/agent-turn/agent-run-execution-lineage.test.ts \
  src/gateway/agent-turn/agent-session-persist.test.ts \
  src/gateway/agent-turn/internal-facade.test.ts \
  src/gateway/auth-rate-limit.test.ts \
  src/gateway/auth.test.ts \
  src/gateway/channel-avatar-http.test.ts \
  src/gateway/chat-abort-lifecycle-internal.test.ts \
  src/gateway/chat-abort.authority.test.ts \
  src/gateway/chat-abort.test.ts \
  src/gateway/chat-display-projection.cold-imports.test.ts \
  src/gateway/chat-display-projection.forwarded.test.ts \
  src/gateway/chat-display-projection.media.test.ts \
  src/gateway/chat-display-projection.reconciliation.test.ts \
  src/gateway/chat-display-projection.recovery.test.ts \
  src/gateway/chat-display-projection.test.ts \
  src/gateway/chat-display-projection.visibility.test.ts \
  src/gateway/config-reload.test.ts \
  src/gateway/control-ui-assistant-media-metadata.test.ts \
  src/gateway/control-ui-assistant-media-policy.test.ts \
  src/gateway/control-ui-link-readers.test.ts \
  src/gateway/control-ui-plugin-assets.test.ts \
  src/gateway/control-ui-plugin-auth-cookie.test.ts \
  src/gateway/control-ui-plugin-tabs.test.ts \
  src/gateway/control-ui-session-pr-check-details.test.ts \
  src/gateway/control-ui-session-prs-branch.test.ts \
  src/gateway/control-ui-session-prs-landing.test.ts \
  src/gateway/control-ui-session-prs.test.ts \
  src/gateway/control-ui-session-widget-scopes.test.ts \
  src/gateway/control-ui.http.test.ts \
  src/gateway/cron-creator-authority-grant.test.ts \
  src/gateway/desktop/audio-bridge.test.ts \
  src/gateway/desktop/observe-bridge.test.ts \
  src/gateway/desktop/rfb-preauth.test.ts \
  src/gateway/desktop/websocket-runtime.test.ts \
  src/gateway/gateway-misc.test.ts \
  src/gateway/github-oauth-lifecycle.scheduling.test.ts \
  src/gateway/github-oauth-lifecycle.test.ts \
  src/gateway/github-personal-publication-outcomes.test.ts \
  src/gateway/github-personal-publication.test.ts \
  src/gateway/github-publication-transcript.test.ts \
  src/gateway/github-publication-workflows.test.ts \
  src/gateway/github-publication.test.ts \
  src/gateway/github-repository-publication-workflows.test.ts \
  src/gateway/github-repository-publication.test.ts \
  src/gateway/github-tool-identity-config.test.ts \
  src/gateway/hooks.test.ts \
  src/gateway/hosted-lifecycle-dispatch.test.ts \
  src/gateway/http-auth-utils.paired-device.test.ts \
  src/gateway/http-auth-utils.test.ts \
  src/gateway/http-common.test.ts \
  src/gateway/http-endpoint-helpers.test.ts \
  src/gateway/http-utils.authorize-request.test.ts \
  src/gateway/http-utils.model-override.test.ts \
  src/gateway/http-utils.request-context.test.ts \
  src/gateway/local-request-context.session-tools.test.ts \
  src/gateway/managed-image-attachments.authority.test.ts \
  src/gateway/managed-image-attachments.test.ts \
  src/gateway/method-scopes.dashboard-presentation.test.ts \
  src/gateway/method-scopes.own-session.test.ts \
  src/gateway/method-scopes.sessions-patch.test.ts \
  src/gateway/method-scopes.test.ts \
  src/gateway/node-agent-cli-runtime.test.ts \
  src/gateway/node-command-policy.authority.test.ts \
  src/gateway/node-command-policy.test.ts \
  src/gateway/node-registry-policy.test.ts \
  src/gateway/node-registry.worker-launch.test.ts \
  src/gateway/operator-approval-mcp-grants.test.ts \
  src/gateway/operator-approval-receipts.test.ts \
  src/gateway/operator-approval-session-events.test.ts \
  src/gateway/operator-approval-standing-grants.test.ts \
  src/gateway/operator-approval-store.execution-identity.test.ts \
  src/gateway/operator-approval-store.test.ts \
  src/gateway/operator-approval-store.worker.test.ts \
  src/gateway/operator-approvals-client.e2e.test.ts \
  src/gateway/operator-run-cancellation.test.ts \
  src/gateway/plugin-icon-http.test.ts \
  src/gateway/plugin-node-capability.test.ts \
  src/gateway/plugin-theme-art-http.test.ts \
  src/gateway/question-manager.test.ts \
  src/gateway/rate-limit-attempt-serialization.test.ts \
  src/gateway/server-aux-handlers.authority.test.ts \
  src/gateway/server-aux-handlers.test.ts \
  src/gateway/server-chat-metadata-lifecycle.integration.test.ts \
  src/gateway/server-chat.agent-events.test.ts \
  src/gateway/server-claws-monitors.test.ts \
  src/gateway/server-claws-packages.test.ts \
  src/gateway/server-close.cleanup-scope.test.ts \
  src/gateway/server-close.metadata.test.ts \
  src/gateway/server-close.plugin-failure.test.ts \
  src/gateway/server-close.port-reservation.test.ts \
  src/gateway/server-close.question-publication.test.ts \
  src/gateway/server-close.queued-heartbeat.test.ts \
  src/gateway/server-close.test.ts \
  src/gateway/server-cron-lazy.test.ts \
  src/gateway/server-cron.drain.test.ts \
  src/gateway/server-cron.test.ts \
  src/gateway/server-http.canvas.test.ts \
  src/gateway/server-http.device-pairing-ingress.test.ts \
  src/gateway/server-http.hooks-delivery.test.ts \
  src/gateway/server-http.hooks-request-timeout.test.ts \
  src/gateway/server-http.node-workspace-transfer.test.ts \
  src/gateway/server-import-boundary.test.ts \
  src/gateway/server-instance-runtime.test.ts \
  src/gateway/server-kernel.shutdown-budget.test.ts \
  src/gateway/server-kernel.startup.test.ts \
  src/gateway/server-kernel.test.ts \
  src/gateway/server-maintenance.dedupe.test.ts \
  src/gateway/server-maintenance.telemetry.test.ts \
  src/gateway/server-maintenance.test.ts \
  src/gateway/server-methods.session-narrow-mutations.test.ts \
  src/gateway/server-methods.session-pending-stop.test.ts \
  src/gateway/server-methods.session-scoped-reads.test.ts \
  src/gateway/server-methods/agent-run-local-operator-authority.test.ts \
  src/gateway/server-methods/agent.task-runtime.test.ts \
  src/gateway/server-methods/agent.test.ts \
  src/gateway/server-methods/artifacts.transcript-images.test.ts \
  src/gateway/server-methods/channel-pairing.test.ts \
  src/gateway/server-methods/chat-history-handler.availability.test.ts \
  src/gateway/server-methods/chat-history-handler.cli-import.test.ts \
  src/gateway/server-methods/chat-history-handler.test.ts \
  src/gateway/server-methods/chat-history-model-policy.test.ts \
  src/gateway/server-methods/chat-history-pages.recovery.test.ts \
  src/gateway/server-methods/chat-history-registry.test.ts \
  src/gateway/server-methods/chat-history-request-budget.test.ts \
  src/gateway/server-methods/chat-history-requester.test.ts \
  src/gateway/server-methods/chat-history-retained-sharing.test.ts \
  src/gateway/server-methods/chat-history-worker.benchmark.test.ts \
  src/gateway/server-methods/chat-history-worker.test.ts \
  src/gateway/server-methods/chat-message-get-handler.test.ts \
  src/gateway/server-methods/chat-metadata-admission.test.ts \
  src/gateway/server-methods/chat-metadata-handler.test.ts \
  src/gateway/server-methods/chat-metadata-runtime.native-session.test.ts \
  src/gateway/server-methods/chat-metadata-runtime.test.ts \
  src/gateway/server-methods/chat-metadata-session-writes.test.ts \
  src/gateway/server-methods/chat-pending-inputs.test.ts \
  src/gateway/server-methods/chat-send-attachments.cancel.test.ts \
  src/gateway/server-methods/chat-send-dispatch-errors.test.ts \
  src/gateway/server-methods/chat-send-pre-admission.test.ts \
  src/gateway/server-methods/chat-send-profile-binding.test.ts \
  src/gateway/server-methods/chat-send-request.test.ts \
  src/gateway/server-methods/chat-send-session-binding.test.ts \
  src/gateway/server-methods/chat-send-user-turn.test.ts \
  src/gateway/server-methods/chat-startup-requester.test.ts \
  src/gateway/server-methods/chat-startup-short-reference.test.ts \
  src/gateway/server-methods/chat-webchat-acp-binding.test.ts \
  src/gateway/server-methods/chat-webchat-acp-lifecycle.test.ts \
  src/gateway/server-methods/chat.abort-authorization.test.ts \
  src/gateway/server-methods/chat.abort-cascade.test.ts \
  src/gateway/server-methods/chat.abort-contention.test.ts \
  src/gateway/server-methods/chat.abort-currentness.test.ts \
  src/gateway/server-methods/chat.abort-errors.test.ts \
  src/gateway/server-methods/chat.abort-incarnation.test.ts \
  src/gateway/server-methods/chat.abort-persistence.test.ts \
  src/gateway/server-methods/chat.abort-save-warning.test.ts \
  src/gateway/server-methods/chat.directive-tags.test.ts \
  src/gateway/server-methods/chat.native-runtime-consent.test.ts \
  src/gateway/server-methods/chat.stop-cascade.test.ts \
  src/gateway/server-methods/computer.test.ts \
  src/gateway/server-methods/config-write-flow.test.ts \
  src/gateway/server-methods/cron.scheduled-policy-adoption.integration.test.ts \
  src/gateway/server-methods/environments.desktop.test.ts \
  src/gateway/server-methods/exec-approval.agent-runtime.test.ts \
  src/gateway/server-methods/exec-approvals.test.ts \
  src/gateway/server-methods/lazy-core-handlers.test.ts \
  src/gateway/server-methods/models-session.test.ts \
  src/gateway/server-methods/nodes.invoke-abort.test.ts \
  src/gateway/server-methods/nodes.invoke-wake.test.ts \
  src/gateway/server-methods/plugin-approval-turn-source-routing.e2e.test.ts \
  src/gateway/server-methods/plugin-approval.agent-runtime.test.ts \
  src/gateway/server-methods/plugins.lifecycle-contention.test.ts \
  src/gateway/server-methods/progress-card-refresh.queued.test.ts \
  src/gateway/server-methods/question.own-run.test.ts \
  src/gateway/server-methods/question.recovery.test.ts \
  src/gateway/server-methods/question.test.ts \
  src/gateway/server-methods/requester-cron-authority.integration.test.ts \
  src/gateway/server-methods/session-active-runs.test.ts \
  src/gateway/server-methods/session-catalog-entry-snapshot.test.ts \
  src/gateway/server-methods/session-catalog-gateway-copy.test.ts \
  src/gateway/server-methods/session-catalog-list-lifetime.test.ts \
  src/gateway/server-methods/session-catalog-privacy.test.ts \
  src/gateway/server-methods/session-catalog-provider-access.test.ts \
  src/gateway/server-methods/session-catalog-provider-diagnostics.test.ts \
  src/gateway/server-methods/session-catalog-provider-steps.test.ts \
  src/gateway/server-methods/session-catalog-resident-entries.test.ts \
  src/gateway/server-methods/session-catalog-share-route.test.ts \
  src/gateway/server-methods/session-catalog-terminal-start.test.ts \
  src/gateway/server-methods/session-catalog-visibility.test.ts \
  src/gateway/server-methods/session-catalog.home-isolation.test.ts \
  src/gateway/server-methods/session-catalog.test.ts \
  src/gateway/server-methods/session-change-event.test.ts \
  src/gateway/server-methods/session-creator-preparation.test.ts \
  src/gateway/server-methods/session-discussion.test.ts \
  src/gateway/server-methods/sessions-create-timeout.test.ts \
  src/gateway/server-methods/sessions-create-worktree-base.test.ts \
  src/gateway/server-methods/sessions-describe-active-run.test.ts \
  src/gateway/server-methods/sessions-mutations.sticky-model.test.ts \
  src/gateway/server-methods/sessions-read-active.test.ts \
  src/gateway/server-methods/sessions-title.test.ts \
  src/gateway/server-methods/sessions.abort-agent-scope.test.ts \
  src/gateway/server-methods/sessions.abort-dedupe-currentness.test.ts \
  src/gateway/server-methods/sessions.abort-durability.test.ts \
  src/gateway/server-methods/sessions.abort-embedded.test.ts \
  src/gateway/server-methods/terminal.dispatch-authority.test.ts \
  src/gateway/server-methods/terminal.test.ts \
  src/gateway/server-methods/themes.test.ts \
  src/gateway/server-methods/tools-effective.cache.test.ts \
  src/gateway/server-methods/tools-effective.test.ts \
  src/gateway/server-methods/tools-github.test.ts \
  src/gateway/server-methods/users-github.test.ts \
  src/gateway/server-methods/validation.test.ts \
  src/gateway/server-methods/wizard.test.ts \
  src/gateway/server-plugins.test.ts \
  src/gateway/server-reload-handlers.hot-reload-status.test.ts \
  src/gateway/server-reload-handlers.operator-model-policy.test.ts \
  src/gateway/server-reload-handlers.test.ts \
  src/gateway/server-reload-hot.cron-cold.test.ts \
  src/gateway/server-reload-hot.cron-lazy.test.ts \
  src/gateway/server-reload-managed-context.test.ts \
  src/gateway/server-reload-managed-secrets.test.ts \
  src/gateway/server-reload-restart.test.ts \
  src/gateway/server-restart-heartbeat.test.ts \
  src/gateway/server-runtime-state.tailscale.test.ts \
  src/gateway/server-runtime-subscriptions.access.test.ts \
  src/gateway/server-runtime-subscriptions.test.ts \
  src/gateway/server-secrets-reload.model-runtime.test.ts \
  src/gateway/server-worker-environment-startup.bootstrap.test.ts \
  src/gateway/server-worker-placement-cancel.test.ts \
  src/gateway/server.agent-artifact-apis.test.ts \
  src/gateway/server.agent-execution-shutdown.test.ts \
  src/gateway/server.auth.identity-scopes.test.ts \
  src/gateway/server.board-generated-identity.test.ts \
  src/gateway/server.chat-first-turn-binding.test.ts \
  src/gateway/server.chat-history-cursor.test.ts \
  src/gateway/server.chat-metadata-boundary.test.ts \
  src/gateway/server.plugin-frame-auth.test.ts \
  src/gateway/server.plugin-http-auth.test.ts \
  src/gateway/server.plugin-http-role-scopes.test.ts \
  src/gateway/server.plugin-node-capability-auth.test.ts \
  src/gateway/server.private-completion.test.ts \
  src/gateway/server.public-worker-ingress.test.ts \
  src/gateway/server.roles-allowlist-update.test.ts \
  src/gateway/server.sessions-send.test.ts \
  src/gateway/server.sessions.abort-authorization.test.ts \
  src/gateway/server.sessions.archive-owner.test.ts \
  src/gateway/server.sessions.create-worktree-spawn.test.ts \
  src/gateway/server.sessions.create.dispatch.test.ts \
  src/gateway/server.sessions.create.projects.test.ts \
  src/gateway/server.sessions.create.resolved-model.test.ts \
  src/gateway/server.sessions.create.titles.test.ts \
  src/gateway/server.sessions.create.worktree-selection.test.ts \
  src/gateway/server/hooks-request-handler.fanout.test.ts \
  src/gateway/server/hooks.background-admission.test.ts \
  src/gateway/server/hooks.early-failure.test.ts \
  src/gateway/server/plugins-http.runtime-scopes.test.ts \
  src/gateway/server/ws-connection.load-failure.test.ts \
  src/gateway/server/ws-connection.startup.test.ts \
  src/gateway/server/ws-connection.test.ts \
  src/gateway/server/ws-connection/auth-context.state.test.ts \
  src/gateway/server/ws-connection/auth-context.test.ts \
  src/gateway/server/ws-connection/authenticated-request-dispatch.server.test.ts \
  src/gateway/server/ws-connection/connect-hello.setup-completion.test.ts \
  src/gateway/server/ws-connection/handshake-auth-helpers.test.ts \
  src/gateway/server/ws-connection/message-handler.post-connect-health.test.ts \
  src/gateway/session-event-payload.test.ts \
  src/gateway/session-history-worker.integration.test.ts \
  src/gateway/session-history.subagent-visibility.test.ts \
  src/gateway/session-lifecycle-run-failure.test.ts \
  src/gateway/session-lifecycle-state.persistence.test.ts \
  src/gateway/session-row-projection.accepted-facts.test.ts \
  src/gateway/session-row-projection.archived.test.ts \
  src/gateway/session-row-projection.foreground.test.ts \
  src/gateway/session-row-projection.prepared-read.test.ts \
  src/gateway/session-row-projection.topology.test.ts \
  src/gateway/session-row-projection.worker-read.test.ts \
  src/gateway/session-sharing.test.ts \
  src/gateway/session-transcript-readers.markers.test.ts \
  src/gateway/session-transcript-readers.test.ts \
  src/gateway/session-utils-read-lifetime.test.ts \
  src/gateway/session-utils-store-lookup.test.ts \
  src/gateway/session-utils.queued-collector-admission.test.ts \
  src/gateway/session-utils.queued-collector.test.ts \
  src/gateway/sessions-history-http.revocation.test.ts \
  src/gateway/sessions-patch-catalog-queue.e2e.test.ts \
  src/gateway/talk/client-authority.test.ts \
  src/gateway/talk/client-gateway-control.agent-consult.retry-context.test.ts \
  src/gateway/talk/client-gateway-control.agent-consult.test.ts \
  src/gateway/talk/client-gateway-control.agent-import-failure.test.ts \
  src/gateway/talk/client-gateway-control.close.test.ts \
  src/gateway/talk/client-gateway-control.native.test.ts \
  src/gateway/talk/client-gateway-control.test.ts \
  src/gateway/talk/handlers/index.test.ts \
  src/gateway/talk/handlers/native-consult-target.test.ts \
  src/gateway/talk/handlers/realtime-relay-close.test.ts \
  src/gateway/talk/nodes.test.ts \
  src/gateway/talk/relay-audio-base64.test.ts \
  src/gateway/talk/relay/cancellation-recovery.test.ts \
  src/gateway/talk/relay/confirmation.test.ts \
  src/gateway/talk/relay/index.test.ts \
  src/gateway/talk/relay/relay-consult-adoption.regression.test.ts \
  src/gateway/talk/session-registry.test.ts \
  src/gateway/talk/transcription-relay.test.ts \
  src/gateway/terminal/buffer-text.test.ts \
  src/gateway/terminal/launch.test.ts \
  src/gateway/terminal/node-relay.test.ts \
  src/gateway/terminal/session-manager.task-lifecycle.test.ts \
  src/gateway/tools-invoke-http.abort.test.ts \
  src/gateway/user-profiles-http.auth.test.ts \
  src/gateway/user-profiles-http.gravatar.test.ts \
  src/gateway/user-profiles-http.test.ts \
  src/gateway/watch-node-http.test.ts \
  src/gateway/worker-environments/bootstrap.test.ts \
  src/gateway/worker-environments/bundle.test.ts \
  src/gateway/worker-environments/cloud-transcript-write-admission.test.ts \
  src/gateway/worker-environments/credential-broker.test.ts \
  src/gateway/worker-environments/inference-lifecycle.test.ts \
  src/gateway/worker-environments/inference.test.ts \
  src/gateway/worker-environments/node-enrollment.test.ts \
  src/gateway/worker-environments/node-launch-adapter.test.ts \
  src/gateway/worker-environments/node-worker-repository-sync.test.ts \
  src/gateway/worker-environments/node-worker-tunnel.lifecycle.test.ts \
  src/gateway/worker-environments/node-worker-tunnel.session-processes.test.ts \
  src/gateway/worker-environments/node-worker-tunnel.test.ts \
  src/gateway/worker-environments/node-workspace-transfer-credential.test.ts \
  src/gateway/worker-environments/node-workspace-transfer-encoding.test.ts \
  src/gateway/worker-environments/node-workspace-transfer-revocation.test.ts \
  src/gateway/worker-environments/placement-dispatch-move-recovery.test.ts \
  src/gateway/worker-environments/placement-dispatch-reclaim.test.ts \
  src/gateway/worker-environments/placement-dispatch-staged-results.test.ts \
  src/gateway/worker-environments/placement-force-abandon.test.ts \
  src/gateway/worker-environments/placement-move-abandon.test.ts \
  src/gateway/worker-environments/placement-store.move.test.ts \
  src/gateway/worker-environments/placement-turn-authority.test.ts \
  src/gateway/worker-environments/placement-worker-gate.test.ts \
  src/gateway/worker-environments/prepared-environment-store.test.ts \
  src/gateway/worker-environments/prepared-pool-build.test.ts \
  src/gateway/worker-environments/prepared-pool-expiry.test.ts \
  src/gateway/worker-environments/prepared-pool-local-project.test.ts \
  src/gateway/worker-environments/prepared-pool-maintenance.test.ts \
  src/gateway/worker-environments/prepared-pool-repository.test.ts \
  src/gateway/worker-environments/prepared-pool.test.ts \
  src/gateway/worker-environments/project-preparation.test.ts \
  src/gateway/worker-environments/provider-bootstrap.test.ts \
  src/gateway/worker-environments/provider-provisioning.cancellation.test.ts \
  src/gateway/worker-environments/provider-provisioning.shutdown-replay.test.ts \
  src/gateway/worker-environments/provider-provisioning.test.ts \
  src/gateway/worker-environments/provider-reconciliation.test.ts \
  src/gateway/worker-environments/repository-workspace-startup.test.ts \
  src/gateway/worker-environments/session-attachment-service.test.ts \
  src/gateway/worker-environments/session-repository-checkpoints.test.ts \
  src/gateway/worker-environments/store-change-events.test.ts \
  src/gateway/worker-environments/store-node-enrollment.test.ts \
  src/gateway/worker-environments/store-runtime-refresh.test.ts \
  src/gateway/worker-environments/store-worker.test.ts \
  src/gateway/worker-environments/store.test.ts \
  src/gateway/worker-environments/worker-bootstrap-artifact-transfer.test.ts \
  src/gateway/worker-environments/worker-turn-launcher-claim-admission.test.ts \
  src/gateway/worker-environments/worker-turn-launcher-initial-setup.test.ts \
  src/gateway/worker-environments/worker-turn-launcher-reclaimed-placement.test.ts \
  src/gateway/worker-environments/worker-turn-launcher-reconciliation-authority.test.ts \
  src/gateway/worker-environments/worker-turn-launcher-remote-handoff.test.ts \
  src/gateway/worker-environments/worker-turn-launcher.imports.test.ts \
  src/gateway/worker-environments/worker-turn-payload.test.ts \
  src/gateway/worker-environments/worker-turn-rpc.test.ts \
  src/gateway/worker-environments/workspace-accepted-sync.test.ts \
  src/gateway/worker-environments/workspace-actual-manifest.test.ts \
  src/gateway/worker-environments/workspace-finalize.test.ts \
  src/gateway/worker-environments/workspace-reconcile-fs.test.ts \
  src/gateway/worker-environments/workspace-reconcile-publication.test.ts \
  src/gateway/worker-environments/workspace-reconcile-recovery.test.ts \
  src/gateway/worker-environments/workspace-reconcile.test.ts \
  src/gateway/worker-environments/workspace-result-finalize.test.ts \
  src/gateway/worker-environments/workspace-result-repository.test.ts \
  src/gateway/worker-environments/workspace-result-staging.concurrent.test.ts \
  src/gateway/worker-environments/workspace-result-staging.reads.test.ts \
  src/gateway/worker-environments/workspace-sync-inventory-limits.test.ts \
  src/gateway/worker-environments/workspace-sync-inventory.test.ts \
  src/gateway/workspace-icon-http.test.ts \
  src/infra/node-runtime-integration-contract.test.ts \
  src/mcp/channel-bridge.startup.test.ts \
  src/node-host/node-worker-supervisor.admission.test.ts \
  src/worker/worker.chat-abort.test.ts \
  test/e2e/qa-lab/runtime/gateway-exec-approvals.e2e.test.ts \
  test/e2e/qa-lab/runtime/gateway-plugin-approvals.e2e.test.ts \
  test/e2e/qa-lab/runtime/gateway-usage-memory-apis.e2e.test.ts \
  test/plugins/chat-abort-codex.gateway.test.ts \
  test/plugins/team-reports-http.gateway.test.ts \
  test/scripts/sanitize-bundler-helper-dts-exports.test.ts \
  test/scripts/worker-deploy-build-plugin.test.ts \
  test/scripts/write-cli-startup-metadata.test.ts

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: XL labels Sep 26, 2026
@steipete
steipete marked this pull request as ready for review September 26, 2026 09:42
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: c2847646d2d8735672d7d5c6434079ecab7552ab
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/auth-rate-limit.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/desktop/rfb-preauth.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/github-oauth-lifecycle.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/http-auth-utils.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/http-utils.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/method-scopes.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/node-command-policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/gateway/operator-scopes.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server-methods/channel-pairing.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server-methods/chat-abort-authorization.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server-methods/exec-approvals.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/gateway/server-methods/session-catalog-authorization.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server/ws-connection.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server/ws-connection/connect-hello.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server/ws-connection/message-handler-loader.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/worker-environments/credential-broker.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 27, 2026, 6:00 AM ET / 10:00 UTC (Revision 18).

ClawSweeper review

What this changes

The branch consolidates Gateway request, session, worker, approval, and reload helpers, reduces the assertion-safety baseline, and moves three test-support type imports.

Merge readiness

⛔ Blocked before merge - 5 items remain

Keep this PR open. Current main does not contain its distinct Gateway cleanup, and the merged fifth pass excluded these files. No concrete patch defect was found in the inspected paths, but the required upgrade transition remains unproven.

Priority: P3
Reviewed head: 954fada0ff9d67059e9182c85e51cb1ef41f8eeb

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The cleanup is coherent and broadly validated, while the lifecycle upgrade proof remains a material gap.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The maintainer-authored PR is exempt from the external contributor proof gate. Reported exact-head Testbox tests and build cover broad Gateway paths, but they do not show a published updater carrying existing settings and active work into this candidate; no stored-data contract change was identified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external contributor proof gate. Reported exact-head Testbox tests and build cover broad Gateway paths, but they do not show a published updater carrying existing settings and active work into this candidate; no stored-data contract change was identified.
Evidence reviewed 8 items Introduced reload changes: The pinned PR delta refactors runtime override preparation, active-work counting, and bound restart-coordinator methods without an apparent change to their intended decisions.
Current main still differs: The fetched main revision still differs from the PR head in central reload and worker-credential files; this is not an already-landed copy of the branch.
Related merged pass is distinct: The merged fifth-pass PR explicitly says it excluded every Gateway file touched by this PR: #159177.
Findings None None.
Security None None.

How this fits together

The Gateway receives client requests and configuration edits, then coordinates authorization, sessions, workers, and replies. Its reload path applies safe changes in process or drains active work before a restart.

flowchart LR
  A[Client requests] --> B[Gateway validation]
  B --> C[Session and approval owners]
  C --> D[Worker and channel actions]
  D --> E[Replies and events]
  F[Config edits] --> G[Reload coordinator]
  G --> H[Hot apply or restart]
Loading

Before merge

  • Resolve merge risk (P1) - An installed updater has not been shown carrying existing operator settings and active work into this candidate, then observing their reload or restart settlement. That leaves upgrade compatibility for the changed lifecycle path unproven.
  • Complete next step (P2) - Provide a published-updater × candidate trace with existing operator settings and active work, including their post-reload or post-restart outcome.
  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Prove the upgrade transition (recommended)
    Capture a redacted published-updater × candidate run using existing settings and active work, including the observed post-reload or post-restart outcome.

Technical review

Best possible solution:

Keep one Gateway reload and restart owner that preserves existing configuration and produces a recorded outcome for active work across an upgrade.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR proposes a behavior-preserving refactor rather than reporting a defect. Its reported Testbox validation does not exercise the installed-updater transition.

Is this the best way to solve the issue?

Unclear: the inspected owner consolidation is coherent, but the required upgrade scenario must establish that existing settings and active work survive the lifecycle path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 244d44197232.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is an internal cleanup with no intended user-visible change.
  • merge-risk: 🚨 compatibility: The branch changes config reload and restart plumbing, and the required existing-state upgrade transition has not been demonstrated.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external contributor proof gate. Reported exact-head Testbox tests and build cover broad Gateway paths, but they do not show a published updater carrying existing settings and active work into this candidate; no stored-data contract change was identified.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • J Bot: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted published-updater × candidate trace showing existing settings and active work after reload or restart.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (17 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-26T18:32:59.402Z sha 99d23ae :: blocked before merge. :: none
  • reviewed 2026-09-26T19:33:40.122Z sha 4ae4070 :: blocked before merge. :: none
  • reviewed 2026-09-26T21:36:14.429Z sha 5413fc9 :: blocked before merge. :: none
  • reviewed 2026-09-26T21:45:08.248Z sha 5413fc9 :: blocked before merge. :: none
  • reviewed 2026-09-27T01:29:02.698Z sha 5413fc9 :: blocked before merge. :: none
  • reviewed 2026-09-27T02:00:26.579Z sha 5413fc9 :: blocked before merge. :: none
  • reviewed 2026-09-27T04:45:38.256Z sha e2484a9 :: blocked before merge. :: none
  • reviewed 2026-09-27T06:02:16.504Z sha 3fa091d :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 26, 2026
@steipete
steipete force-pushed the deslop/l72-gateway4 branch 3 times, most recently from b071c86 to d6c7f4d Compare September 26, 2026 13:40
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 26, 2026
@steipete
steipete changed the base branch from main to deslop/l72-tooling-ci-repairs September 26, 2026 18:02
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Sep 26, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 26, 2026
@steipete
steipete force-pushed the deslop/l72-tooling-ci-repairs branch from ebc1d6d to a40df3a Compare September 26, 2026 19:21
Base automatically changed from deslop/l72-tooling-ci-repairs to main September 27, 2026 01:53
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 27, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Sep 27, 2026
@steipete
steipete enabled auto-merge (squash) September 27, 2026 04:47
@steipete
steipete disabled auto-merge September 27, 2026 09:44
@steipete
steipete enabled auto-merge (squash) September 27, 2026 09:48
@steipete
steipete merged commit 320c54c into main Sep 27, 2026
236 checks passed
@steipete
steipete deleted the deslop/l72-gateway4 branch September 27, 2026 10:49
altaywtf added a commit that referenced this pull request Sep 27, 2026
Restore the canonical bundle-or-npm installation type while retaining the prepared-node initializer. This fixes the TS2322 regression introduced by #158786.

Production types, test types, declaration generation, aggregate CI, source autoreview, and ClawSweeper passed.

Co-authored-by: Altay <[email protected]>
vincentkoc added a commit that referenced this pull request Sep 27, 2026
* commit '69809d7a94277d01be964bd1cbbb7aa0ebc58c9b': (219 commits)
  perf(agents): serialize large model requests once (#159574)
  refactor(cli): share capability agent-selection test cases (#159616)
  fix(workers): restore installation type checks (#159629)
  test(channels,qa,providers): remove low-value tests (batch d065) (#159627)
  test(doctor): run isolated migration cases concurrently (#159609)
  feat(apple): show agent identities in native chat (#159528)
  chore(i18n): refresh native locales (#159635)
  fix(gateway): keep node provisioning's installation contract after overlapped preparation
  fix(models): keep shared catalog requests alive for remaining callers (#157191)
  feat: let agents query online people and device activity (#159117)
  perf(gateway): first cloud dispatch prepares worker artifacts one after another (#159520)
  refactor(android): deslop Android app third pass (#159589)
  test(qa-lab,openshell,slack,reef,team-reports): remove low-value tests (batch d064) (#159607)
  fix: align process liveness checks (#151107) thanks @ekinnee
  fix: sessions model default does not clear the override (#159587)
  fix(ios): preserve typing during reentrant SwiftUI updates
  fix(ci): frozen 2026.8.33 validation fails on inherited test clock (#159594)
  perf(gateway): avoid duplicate recipient row lookup (#159595)
  refactor(gateway): deslop gateway fourth pass (#158786)
  test(agents): split subagent task-settlement test support under the line cap (#159584)
  ...
vincentkoc added a commit that referenced this pull request Sep 27, 2026
* commit '69809d7a94277d01be964bd1cbbb7aa0ebc58c9b': (219 commits)
  perf(agents): serialize large model requests once (#159574)
  refactor(cli): share capability agent-selection test cases (#159616)
  fix(workers): restore installation type checks (#159629)
  test(channels,qa,providers): remove low-value tests (batch d065) (#159627)
  test(doctor): run isolated migration cases concurrently (#159609)
  feat(apple): show agent identities in native chat (#159528)
  chore(i18n): refresh native locales (#159635)
  fix(gateway): keep node provisioning's installation contract after overlapped preparation
  fix(models): keep shared catalog requests alive for remaining callers (#157191)
  feat: let agents query online people and device activity (#159117)
  perf(gateway): first cloud dispatch prepares worker artifacts one after another (#159520)
  refactor(android): deslop Android app third pass (#159589)
  test(qa-lab,openshell,slack,reef,team-reports): remove low-value tests (batch d064) (#159607)
  fix: align process liveness checks (#151107) thanks @ekinnee
  fix: sessions model default does not clear the override (#159587)
  fix(ios): preserve typing during reentrant SwiftUI updates
  fix(ci): frozen 2026.8.33 validation fails on inherited test clock (#159594)
  perf(gateway): avoid duplicate recipient row lookup (#159595)
  refactor(gateway): deslop gateway fourth pass (#158786)
  test(agents): split subagent task-settlement test support under the line cap (#159584)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
* refactor(gateway): deslop gateway fourth pass

* refactor(gateway): avoid reserved environment prefix for model pattern

* chore(gateway): shrink assertion baseline after cleanup

* refactor(gateway): preserve typed handlers and canonical type imports

* refactor(gateway): retain callback receivers and satisfy lint contracts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
Restore the canonical bundle-or-npm installation type while retaining the prepared-node initializer. This fixes the TS2322 regression introduced by openclaw#158786.

Production types, test types, declaration generation, aggregate CI, source autoreview, and ClawSweeper passed.

Co-authored-by: Altay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant