Skip to content

refactor(gateway): share delivery and lifecycle handling - #167775

Merged
steipete merged 4 commits into
mainfrom
deslop/d30-gateway-toplevel-20261008
Oct 9, 2026
Merged

steipete merged 4 commits into
mainfrom
deslop/d30-gateway-toplevel-20261008

Conversation

@steipete

@steipete steipete commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This maintainer-directed cleanup reduces duplicate Gateway delivery and lifecycle code.

User Impact

No user-visible behavior changes. Features, configuration, protocol and persisted shapes, flags, and user-facing text remain unchanged.

Why This Change Was Made

Shared implementations now cover chat delivery and display projection, session reset and transcript reads, credential selection, public conversation responses, approval projections, and paired lifecycle operations. Variant-specific authority checks, error precedence, lazy loading, and cleanup ordering remain explicit.

The candidate removes 717 net production lines across 67 production files in the top-level Gateway scope. One existing test fixture follows grouped internal maintenance options; all assertions remain unchanged. Two assertion-ratchet entries shrink to reflect removed assertions. No new suppressions or budget changes.

The completed deep pass removes 0.36% of the 198,748-line production scope; the complete coverage log is below. Larger extraction prototypes were rejected when preserving their contracts left negligible or negative savings. The conflict-only rebase retained overlapping simplifications already on main; the 717-line figure counts only the remaining branch contribution and uses the campaign's 500–999-line exception.

Current candidate: 0b26c00bccd0be8b93d7245ea0afe84254484c68, based on 9490c112abba4c22eabc5cc5b85120d2a5e3f6aa. The final conflict-only rebase preserves main's durable error publication, current-owner check and live startup registry callback alongside the shared delivery path.

Evidence

  • Exact candidate 0b26c00: all 16 affected files and 420 tests passed in 1,006.61 seconds, with zero skips or unhandled errors. Coverage includes persistence success/failure ordering, the real WebSocket terminal/history flow, stale dispatch ownership, startup registry adoption, paced chat, and the changed startup fixture.
  • Production types, all 27 test-type graphs, and all three Knip scans passed. Each Knip scan reported zero entries.
  • A fresh SDK comparison of pinned 9490c112 and 0b26c00 snapshots completed in 1,486.92 seconds with no entrypoint or export changes.
  • Independent P0–P2 review found no accepted actionable issue; the final conflict integration received a fresh scoped-clean review before the signed rebase continued.
  • node scripts/check-changed.mjs passed in 2,096.98 seconds. Runtime and Madge report zero cycles. The final wrapper inventory/source-closure, eager-bootstrap and lint-suppression batch passed all 23 tests across three files in 59.95 seconds. Hosted CI 37919932189 completed on this head. Every selected lane passed except the inherited Workboard generated-asset check; the CI gate reports that single downstream failure. The detailed attribution is below and in the pinned-head evidence comment.

The full-directory selection executed across the recorded continuations, but there is no single-head green local directory result. Historical failures and unavailable final reporting for 127 original focused files remain documented below. No assertions, retries, skips, or timeout budgets were weakened. The unchanged startup fixture's before/after standalone wall times were 133.07s/133.38s on the original refactor revisions; the hosted changed-test matrix passed; per-file CI timing was not recovered, and no estimate is supplied.

Exact-head CI failure attribution

build-artifacts job 113785696942 completed pnpm build successfully in 159.1 seconds, then failed plugins:assets:check solely on extensions/workboard/openclaw.plugin.json. Unrelated PR #167662 reproduced the exact same failure on the same main parent at job 113785188584. The browser/build-driver inputs, committed manifest and dependencies are unchanged by this lane; none of its paths occurs in the inspected generation graphs.

openclaw/ci-gate job 113789070112 failed only because of that build-assets check. Its selected-lane accounting confirms all other selected lanes passed and every skipped lane was unselected. No cancelled or missing selected job is waived. The combined commit status mirrors that CI result; dependency and security-sensitive guards passed.

The completed ClawSweeper review is bound to 0b26c00, lists no findings and no before-merge items, and explicitly retains the test-driven proof limitation. The campaign's inherited-failure exception is used without describing CI as fully green or changing the unrelated Workboard output.

Earlier local proof and full-directory coverage
  • Baseline selection: 123 files / 2,277 tests passed on the original base.
  • On 404a0a2, production types and all 27 test-type graphs passed, as did ratchets, formatting, boundaries, coercion and deprecated-API checks. Changed-core lint, script lint, native schema, database-first, media-download, sidecar-loader and webhook-order guards also passed. Runtime and Madge cycle checks both report zero cycles. Both pairing-auth guards passed.
  • The complete native changed check exited 1 at dead-code analysis. Production Knip reported four out-of-lane exports: bindCliQuestionAnswerAuthority, prepareSessionEventTargetForHost, readSessionEntryCreationTransition and RESTART_CONTINUATION_CONTEXT_PREFIX. These exact production findings also appear in main CI run 37889372602, job 113686778698 at 53868c16088fd9cc86e84340178d8291c7a6f133. Their definitions, consumers and analyzer inputs were unchanged by this lane. Main subsequently repaired all four in 3b3cd5939993f16017b6747cbcf80a83b49006ef, now included in the final base. All three final-head scans pass with zero entries; the earlier failed scans remain historical evidence.
  • Script Knip found zero entries. The concurrent full-tree scan twice reached its unchanged 600-second deadline. Running just that component through the unchanged native owner then completed in 438.61 seconds and failed on the transition-reader re-export and restart-prefix export above. No analyzer configuration, issue flags, version, buffer or deadline changed. The completed failure does not establish the original timeout cause; the hosted production log does not establish a hosted full-tree result.
  • SDK comparison from 9490c112abba4c22eabc5cc5b85120d2a5e3f6aa to 0b26c00bccd0be8b93d7245ea0afe84254484c68 completed in 1,486.92 seconds with no added/removed entrypoints or export changes. Both inputs were pinned detached worktrees, with the updated compiler/dependencies. The same result was previously observed on d574; this is a fresh final-head comparison.
  • Independent P0–P2 review found no accepted actionable issue. The final paced-heartbeat correction received a fresh scoped-clean review. Earlier reports were rejected against their unchanged owners: repository ownership is still revalidated by the returned arrow closure, and probe results already included null defaults for omitted details.
  • The changed startup fixture passed all 14 cases before and after the original refactor. On base b3196df and candidate 4b1056b, pnpm test src/gateway/server-startup-early.test.ts --maxWorkers=1 wall times were 133.07s and 133.38s, mostly transform/setup. The fixture is byte-identical from that candidate to 0b26 and passed again in the final affected suite. Assertions are unchanged; no performance improvement is claimed. The hosted changed-test matrix passed; per-file CI timing was not recovered, and no estimate is supplied.
  • On that previous candidate, source-closure and suppression checks passed six tests across two files. The 45-file follow-through on f70 completed every selected native plan: eager-import closure 17 passed; database-worker targets 14 passed; Gateway server targets 181 passed and 10 failed; all 30 otherwise-unexecuted infra targets 312 passed; the existing cron preparation regression 5 passed; Gateway E2E 10 passed and 3 failed. Total: 539 passing and 13 failing cases, across 43 passing and two failing files. This is a failed run, with failures investigated below.
  • A whole-file temporary diagnostic on the same production head preserved all assertions, awaits, deadlines, and case order in server.sessions.create.dispatch.test.ts. It finished with 26 passes and one failure in 595.19 seconds. The trace pins the first failure to the sessions.create response before sessions.list; all title callbacks were consumed by their own cases. The earlier ten-failure cluster was not reproduced and its cause remains unresolved. Instrumentation was removed with exact-byte verification.
  • Bounded f70 follow-through completed with 26 passing tests across three files in 936.94 seconds: concurrent streams and the complete kernel file passed all 13 tests; the complete Gateway E2E file passed all 13. The E2E file had temporary synchronous timing markers only, removed with exact-byte verification afterward. Its first pairing case completed in 66.922 seconds, including all health/pairing assertions and joined shutdown/cleanup. The earlier E2E, kernel-cleanup and readiness failures remain unexplained; this replay is not a fix. The interrupted directory run and native methods-only recovery are described below; the final-head hosted result is recorded above.

The original full-directory process, on pre-rebase candidate a2c27d8291c27c66fa2e1f983afb9566865d0ce6 with Node 26.10.0, was interrupted without its final aggregate or result-cache write. Its log retained 21,039 passing, 35 failing and 20 existing skipped case observations across 1,620 files. Native scheduling joins every project group before advancing; source inspection plus complete per-group file observations establish that the earlier 1,598 selected files settled before Gateway-methods began. Their final file statuses, late teardown errors and overall outcome are unavailable, so this is execution coverage with a reporting gap, not a green directory run.

The methods group had 420 unobserved files and 22 with uncertain completion. Its first native recovery on f70eba292069e41420bf35cc0684316071be931a / Node 26.5.0 was also interrupted, but the existing resource reporter retained terminal receipts for 71 files: 67 passed and four failed. There were 2,389 passing, five failing and one existing skipped case observations across 73 files; two case-seen files without terminal receipts remain unfinished. No final aggregate or detailed assertion stack survived. The 371 unfinished files are preserved as literal whole-file targets; completed files are not rerun merely to replace the lost aggregate.

A subsequent continuation was stopped and joined through native SIGINT before any cases because a fresh merge check found a real conflict in server-chat.ts. The second conflict-only rebase produced d574d52c55462c921d434cd2fa87c96e15c942e2 on fd2fa6b904a2069bf9c2c150302475dffdc51e29. Main's new transcript-publication holds and disposal drain remain intact; its positional flush callback now adapts to the lane's existing delivery object. The other two lane commits are patch-identical. That continuation settled 31 files with passing native receipts before it was deliberately stopped and joined to preserve one more interaction with main's deferred publication: the first paced heartbeat filter uses captured metadata, while the deferred publication receives the same visibility-only metadata as main. That correction is signed in 404a0a2.

The final native continuation on 404a0a2 / Node 26.5.0 completed all 357 selected whole files: 354 passed and three existing opt-in benchmark files were skipped. It passed 3,129 cases with 16 existing skips and zero unhandled errors, exiting 0 after 7,532.72 seconds with clean source. The selection was the 352 unfinished files plus five affected chat files; native scheduling, reporters, case order and deadlines were unchanged. The exact union of all original 442 methods targets has no missing files across the recorded continuations: 435 passed, four retained historical failures and three existing skips. That mixed-head accounting does not erase the four failures or establish a single-head green directory result.

All 148 original focused targets have execution evidence. Ten have completed passing receipts on 0b26; 11 have completed prior-head results (10 passed and one failed); the remaining 127 have earlier settled-group execution with unavailable final-file reporting. No focused target lacks execution evidence, but this is not a claim that all focused files passed. The original selection's remaining 30 infra files and E2E target already executed on f70. The rebase does not promote earlier proof into current-head execution or erase unresolved failures.

The old candidate is not main. Source, runtime, selection, caches and overlapping workloads differ, so these runs do not establish a load cause or inherited failure. Existing failures remain recorded even when a focused replay passes. No assertions, skips, retries, or timeout budgets were changed.

Investigated local failures and remaining uncertainty

The interrupted broad run retained 35 observed failing cases; its final aggregate and detailed assertion diffs were lost. The source-level attributions below retain the unknowns rather than inferring successful file status. Complete fixtures, relevant owners and the lane diff were inspected for each group. No safe task-caused repair has been established from these observations, and none is claimed as an inherited-CI waiver.

File Cases Observed boundary and disposition
server.plugins-install-authority.test.ts 2 Install-boundary waits expired before the action; the fixture does not expose the early RPC outcome. Refusal versus delayed staging remains unresolved.
server-methods/chat.reset-visible-yield.test.ts 2 First case exceeded 90 seconds; the next met metadata-shutdown admission. Matched-runtime controls and the later trace are described below; no timing or fixture change is proposed.
gateway-concurrent-streams.test.ts 1 The child missed the 60-second readiness boundary before stream assertions. The complete f70 file passed both cases in the bounded follow-through; the original readiness failure remains unexplained.
session-row-projection.backfill.test.ts 1 Coalescing assertions passed; the final process-global fake-timer count was one. Timer ownership remains unknown.
gateway-active-memory.test.ts 1 Prepared-generation admission failed before either provider call. No recall/prompt regression is established.
session-row-projection.category.test.ts 1 The third case, with 8,193 setup writes, reached its 120-second deadline; the pending phase is unknown.
session-history-broadcast.worker.test.ts 1 A global SQL spy observed two WAL checkpoints during the by-ID read case. Periodic maintenance can produce this SQL; the actual database/stack is unrecorded. Later cases passed.
server.config-patch.test.ts 4 RPC deadlines in changes-list, agent-delete, agent-create and config-apply. The roster case's config-apply belongs to shared teardown; body success is not separately established.
server-kernel.test.ts 1 Health and cached agent dispatch assertions passed; the final one-second wait for deferred registry cleanup expired. Pending versus suppressed cleanup remains unknown.
server-agent-database-startup.test.ts 1 Health/readiness and admission fencing assertions passed before the one-second preparation-marker wait failed.
server.sessions.create.lifecycle.test.ts 1 Create/pin and both patch outcomes passed before an immediate global-idle snapshot failed; remaining counters/owner are not yet captured.
server-plugins.lifecycle.channels.test.ts 2 First replacement was refused before entry because another lifecycle operation held the lease. The second response's exact mismatch remains unresolved.
server.app-sdk-composed-resources.test.ts 1 A two-second artifacts-list client deadline expired; fake versus real call is unlocalized.
server-close.model-acquisition.test.ts 2 One failure proves an unwanted runtime-module import during intentional shutdown, after cancellation and joining passed. The recovery path is in unchanged agent catalog-worker code outside this lane. The second zero-count assertion remains unlocalized. No main-red waiver is claimed.
server.chat-abort-sibling-fanout.test.ts 1 A ten-second response wait and cleanup count failed. The public RPC versus parent's final-response cleanup wait remains unlocalized; later fanout and replaced-parent cases passed.
server.sessions-send.test.ts 4 Four mixed allowed/denied table cases exceeded their ten-second case deadlines. Config/store preparation and model prewarm precede the tool, so a policy outcome has not been established.
server-plugins.activation-health.test.ts 1 The RPC settled before the successful worker-clear gate. Its response was not captured; early refusal and recovery/clear failure remain possible. The shared load parameters and both cleanup joins retain their prior behavior.
server.agent-execution-shutdown.test.ts 3 Stop, restart and graceful cases reported ten-second connect/create response timeouts before execution setup. The old fixture lacks the lazy-handler preparation and clock fix already integrated into the final head by #167301 (3d943a769258e45a48c5491d32bc9c759add8ed5). The original pending response remains unlocalized; no current-head passing result or causal fix is claimed from source alone.
server-plugins.lifecycle.readers.test.ts 1 Either call admission remained open or reload settled early; the final assertion stack is unavailable after interruption. The fixture gate can fire during retained-work draining before quiescence. Metadata-response failure and lane causation are not established.
server.sessions.inbound-worktree-writer.test.ts 1 The failed assertion is not yet localized. The intended peer-write check has a one-second polling window and asynchronous preparation before its writer; total case duration is not writer-block duration. Restoration awaits allocation outside the session-row writer. The already-restored sibling passed.
talk/handlers/client-native-control.test.ts 1 A captured fixture outcome contained an error after its workspace gate and hold completed; the underlying error is absent from progress output. The registration timer starts after workspace/session preparation. A direct RPC failure, readiness cause and lane regression are not established; the other 13 cases passed.
server-methods/models-auth-login.catalog.integration.test.ts 1 Login completed, a passive list received the delayed account model, and exactly one catalog HTTP request occurred before a worker-cost assertion failed. The mismatched counter is hidden; the observer counts process-wide catalog/auth-refresh work. Later refresh, pinning, latency and pending-marker assertions were not reached.
server-methods/models-auth-refresh.catalog.integration.test.ts 1 Renewal/replacement-account rows, credentials and worker-count gates passed. The logout RPC returned while a catalog HTTP response remained held, but took 3,018 ms against a hard 1,000 ms assertion. The latency cause is unknown; final no-available-models/no-old-account-row assertions were not reached.

The separate f70 45-file run failed ten cases in server.sessions.create.dispatch.test.ts and three in gateway.test.ts. Creation dispatch first had three RPC response deadlines followed by title-case deadlines. An unconsumed one-shot callback can survive between cases, but the instrumented whole-file replay did not reproduce cross-case consumption; only the first repository creation response timed out again. Gateway E2E had a 120-second first-case deadline, then metadata-admission refusal, then a logging-reload poll that saw no debug level. The fixture permits timed-out bodies to outlive shared reset, making interference plausible but unproven. Auth/pairing assertions were not reported failing. The whole-file diagnostic passed all 13 cases, including those three, without changing assertions or deadlines. Its first startup consumed 56.985 seconds, health 2.767 seconds and close 0.213 seconds; the original timeout phase remains unknown.

The interrupted f70 methods resume also observed a failure in server-methods/update.test.ts, in the transferred internal activating-notice case. The condensed boolean error favors the five-second callback-completion poll, but the unavailable final stack prevents excluding the shared response-schema assertion or claiming acknowledgement/activation completed. The notice callback sets its flag only after checking transcript content and the completed ledger step; its exception reason is swallowed and the fixture deletes the helper log. The internal path bypasses the mocked outbound notice module and generated-media delivery changed by this lane. The same test passed on the older candidate in 9.088 seconds and failed in this run in 56.448 seconds, but head/runtime/workload differences prevent causal attribution. No safe lane-caused repair has been established.

The same f70 resume observed two failures in server-methods/session-catalog-privacy.test.ts: a 120-second deadline in remote-publication/mixed-adoption coverage, then a missing-profile error in the next resident-delivery case. The first pending phase is unlocalized. The fixture freezes its internal timers and does not pass the test cancellation signal into its asynchronous work, so a timed-out body can outlive teardown and later restore global registry/timer/environment/config state. The second error may come from ambient-store role lookup or a retained catalog; neither a deleted row nor a causal cascade is established. Later audience cases passed. The fixture and direct list/visibility/lifetime/profile owners are unchanged in the lane; no safe task-caused repair was established.

The resume also timed out in sessions-reset-subagent-cleanup.test.ts's collector cleanup retry: unchanged variant. Despite the filename, that variant does not call the refactored reset body: it retries real session deletion after a simulated first transport failure, then reads the retained collector result. The pending phase remains unlocalized between the retry/deletion work and the signal-less collector wait. All three subsequent reset variants passed. The synchronous reset error-helper consolidation preserves guard order and error shapes; no direct task-caused defect was identified.

The f70 methods resume also timed out in session-catalog-import.integration.test.ts during the ordinary import/re-import case. The deliberately stalled model loader is installed only after projection startup, and ordinary import supplies no model/catalog loader to session creation; no direct wait on that loader was found. The pending phase, assertion progress and first-case cancellation/join remain unproven. Managed file teardown reached retirement and the eleven later cases passed, which does not prove the original timed-out promise settled. The relevant fixture/import/create/history owners are unchanged; no safe task-caused repair or inherited-failure attribution was established.

The earlier visible-yield investigation kept the 90-second deadline. The same corrected candidate 1ef71c2c0a76514d6d2768e8b521ae73c8d8577f timed out in the original checkout but passed the first case in a clean control in 69.4 seconds. The original base passed there in 54.4 seconds and then-current main 9932db4167dc65d8e12f7b503effd4506b3c6d1f in 72.0 seconds, all on Node 26.5.0. A Node 26.10.0 main attempt timed out and is excluded from that matched-runtime comparison. No source or timeout change fixed the original failure. The later full-suite trace reached a provider at 87.4 seconds and yielded at 89.62 seconds; startup delay and cleanup completion remain unisolated.

The d574 wrapper/source/suppression batch completed with 22 passed cases and one failed lease-bootstrap case in test/scripts/eager-import-closure.test.ts. The child returned status: null; its signal, error code and stdout were not recorded. A 30-second child deadline exists, but the observed result does not prove timeout termination or identify the last completed child step. The extracted child source graph has zero overlap with the lane's changed files; static inventory, source closure and suppression checks passed. Earlier whole-file passing proof does not explain this termination or establish a fix. The final whole-file batch on 0b26 passed all 23 cases across three files; this bootstrap case passed in 7.749 seconds with the original deadline and assertions. That later pass does not explain the original termination or establish a causal fix.

Complete file-by-file production coverage log

All 890 baseline production modules (198,748 physical lines) were read end to end. Six test-support files totaling 1,814 lines were excluded from production. Three new internal shared modules are listed with a zero baseline. Net removed is measured against rebased main 9490c112abba4c22eabc5cc5b85120d2a5e3f6aa at candidate 0b26c00bccd0be8b93d7245ea0afe84254484c68 and includes additions; zero means no remaining lane diff. Baseline LOC retains the original source-reading census at b3196dfda33555857eae9cd52ea29367a91bd9ea. Tests, fixtures/support, generated files, declarations, and the shrink-only ratchet maintenance are excluded from the production reduction.

File (src/gateway/)	Baseline LOC	Net removed
server-chat.ts	1702	49
server-channels.ts	1670	0
managed-image-attachments.ts	1592	0
session-reset-service.ts	1446	33
config-reload.ts	1437	0
node-registry.ts	1359	0
session-create-service.ts	1356	0
server-cron.ts	1337	0
watch-node-http.ts	1127	0
call.ts	1101	14
server-node-events.ts	1082	0
server-startup-post-attach.ts	1047	5
openai-http.ts	979	15
control-ui.ts	964	0
openresponses-http.ts	871	5
exec-approval-lifecycle.ts	763	0
server-http.ts	749	0
server-reload-hot.ts	741	5
exec-approval-manager.ts	740	0
control-ui-session-pr-subscriptions.ts	735	0
session-utils-store-lookup.ts	734	0
server-broadcast.ts	733	0
session-observer.ts	730	0
server-runtime-subscriptions.ts	724	0
session-sharing.ts	723	0
node-registry-private.ts	719	0
session-row-projection-read.ts	719	0
session-utils-row.ts	718	0
server-startup-finish.ts	717	0
mention-inbox.ts	716	0
server-plugin-reload.ts	715	5
session-row-projection.ts	715	0
session-history-snapshot.ts	712	0
session-sharing-preparation.ts	712	0
server-session-events.ts	711	24
cron-stream-job-owner.ts	707	0
github-publication-executor.ts	707	0
session-row-projection-record.ts	704	0
question-session-access.ts	703	0
tool-resolution.ts	698	18
github-personal-oauth.ts	696	0
server-restart-sentinel-agent-delivery.ts	695	8
hooks.ts	690	21
session-worktree-preparation.ts	690	0
server-restart-sentinel.ts	687	0
server-lifecycle.ts	686	0
hooks-mapping.ts	683	0
server-worker-environment-startup.ts	682	0
session-companion-ask.ts	682	0
sessions-patch.ts	682	0
session-activity-summaries.ts	678	0
cron-stream-output.ts	677	0
github-oauth-lifecycle.ts	677	0
mcp-app-operations.ts	675	0
model-account-connect.ts	675	9
server-chat-state.ts	674	0
chat-display-projection.sanitize.ts	672	6
session-utils-list.ts	668	0
chat-abort.ts	667	0
server-worker-placement-startup.ts	654	0
cli-session-history-index.worker.ts	653	0
operator-approval-store.receipts.ts	653	22
chat-display-projection.history.ts	651	3
question-manager.ts	650	0
agent-runtime-identity-token.ts	647	0
session-utils-model.ts	647	0
server-startup-config.ts	646	8
http-auth-utils.ts	645	0
github-repository-publication.ts	638	0
server-close.ts	638	0
config-reload-plan.ts	632	0
github-publication.ts	629	0
node-invoke-plugin-policy.ts	627	0
control-ui-session-prs.ts	625	0
session-transcript-read-kernel.ts	624	52
github-publication-git-transport.ts	622	0
session-list-filters.ts	610	0
github-publication-store.ts	608	0
mcp-http.ts	608	0
probe.ts	608	9
session-recovery-service.ts	604	0
server-startup-bootstrap.ts	602	20
operator-run-authority.ts	598	0
server-runtime-state-prepare.ts	595	0
server-runtime-state.ts	595	0
server-maintenance.ts	594	10
session-lifecycle-state.ts	593	0
session-row-placement-projection.ts	589	0
sessions-history-http.ts	585	0
server-runtime-services.ts	582	0
session-artifact-read.ts	578	0
cli-session-history.claude.ts	576	0
github-publication-availability.ts	576	0
session-row-projection-materialize.ts	573	0
chat-display-projection.core.ts	572	9
mcp-grant-store.ts	570	0
server-methods.ts	566	0
server-request-context.ts	562	0
auth.ts	561	0
server-cron-notifications.ts	556	0
github-personal-publication.ts	548	0
github-repository-publication-executor.ts	548	0
mcp-http.runtime.ts	548	0
server-reload-restart.ts	548	0
github-publication-coordinator-methods.ts	547	0
node-command-policy.ts	541	36
server-core-runtime.ts	538	-2
mcp-app-form-resources.ts	534	0
server-restart-sentinel-notice.ts	532	16
server-plugin-reload-cleanup.ts	531	0
session-utils-store.ts	524	0
server-plugin-in-process-authority.ts	523	0
session-observer-model.ts	523	0
chat-attachments.ts	519	4
server-reload-managed-secrets.ts	518	0
session-history-tail.ts	510	0
server-plugins.ts	508	0
server-reload-managed.ts	504	0
control-ui-asset-retention.ts	503	0
github-repository-publication-store.ts	503	0
operator-approval-store.rows.ts	503	15
server-plugin-session-facts.ts	499	2
tools-invoke-shared.ts	499	0
server-aux-handlers.ts	498	0
server-plugin-subagent-runtime.ts	498	0
session-sharing-policy.ts	498	0
server-worker-placement-session-target.ts	497	0
sessions-resolve.ts	496	0
session-row-presentation.ts	495	0
net.ts	492	0
operator-approval-standing-grants.ts	492	0
cli-session-history.ts	488	0
session-lifecycle-preparation.ts	486	0
human-mention-policy.ts	481	0
session-utils-store-worker.ts	475	0
session-transcript-archive-reader.ts	471	0
session-sharing-read.ts	468	0
conversation-route-ownership.ts	464	0
node-invoke-system-run-approval.ts	463	0
operator-approval-store.transitions.ts	462	11
cron-exit-watchers.ts	461	0
server-instance-runtime.ts	458	0
cron-creator-authority-grant.ts	451	0
plugin-icon-http.ts	450	0
session-access-authority.ts	450	0
mcp-app-extension-runtime.ts	449	0
client.ts	448	9
session-transcript-readers.ts	448	0
mcp-app-standalone-host.ts	447	0
session-row-projection-refresh.ts	440	0
session-transcript-index.fs.ts	440	0
plugin-node-capability.ts	439	0
dashboard-session-title.ts	438	0
server-plugin-in-process-dispatch.ts	435	0
session-incognito-lifetime.ts	431	0
mcp-app-host-files.ts	430	0
server-http-upgrades.ts	430	0
session-membership-projection.ts	430	0
approval-web-push.ts	426	5
session-transcript-files.fs.ts	424	0
control-ui-plugin-assets.ts	418	0
github-user-identity.ts	418	0
operator-model-presentation.ts	416	0
session-row-membership-read.ts	416	0
server-startup-plugins.ts	413	0
auth-rate-limit.ts	411	0
session-row-scope.ts	405	0
server-secrets-reload.ts	402	4
node-registry.invoke-stream.ts	399	0
mcp-app-standalone.ts	396	0
conversation-turn.ts	394	19
operator-approval-store.ts	394	0
ws-log.ts	393	0
user-profiles-http.ts	388	0
server-control-ui-root.ts	385	0
operator-approval-store.kernel.ts	384	0
cron-stream-watchers.ts	383	0
server-node-subscriptions.ts	383	0
mcp-http.loopback-runtime.ts	379	0
message-action-turn-capability.ts	375	0
server-chat-progress-snapshot.ts	375	0
github-repository-publication-recovery.ts	373	0
session-identity-projection.ts	373	0
control-ui-session-prs-checks.ts	367	0
board-host-tools.ts	359	0
control-ui-session-pr-read.ts	359	0
session-utils-store-sources.ts	359	0
exec-approval-ios-push.ts	357	0
github-publication-git-index.ts	356	0
session-history-state.ts	355	0
server-worker-placement-reclaim.ts	353	6
control-ui-link-preview.ts	348	0
control-ui-session-prs-git.runtime.ts	346	0
operator-approval-placement-grants.ts	345	0
server-run-shutdown.ts	345	0
session-sharing-source.ts	343	0
restart-trace.ts	340	0
session-transcript-catalog.ts	338	0
github-publication-requester.ts	336	0
server-cron-lazy.ts	336	0
operator-access-policy.ts	331	0
server-startup-config-helpers.ts	331	0
session-row-projection-ancestors.ts	329	0
mcp-http.request.ts	327	0
session-create-model-selection.ts	327	0
progress-card-store.ts	326	0
node-claude-skill-runtime.ts	323	0
node-runner-inventory-runtime.ts	323	0
session-transcript-record-parser.ts	322	0
operator-role-policy.ts	321	0
ingress-attribution.ts	318	3
control-ui-plugin-tabs.ts	316	0
embeddings-http.ts	313	0
http-utils.ts	313	0
operator-run-recovery.ts	312	0
chat-display-projection.canvas.ts	311	0
method-scopes.ts	309	0
session-companion-rpc.ts	308	0
session-transcript-title-reader.ts	308	0
server-kernel.ts	306	0
server-broadcast-narration.ts	304	0
device-revocation.ts	301	0
event-web-push.ts	301	0
server-shared-auth-generation.ts	301	0
control-ui-session-prs-landing.ts	300	0
server-startup-trace.ts	300	7
http-common.ts	298	0
web-push-authority.ts	298	0
channel-health-monitor.ts	297	0
control-ui-plugin-auth-cookie.ts	297	0
server-chat-buffer.ts	297	0
session-repository-materialization.ts	297	0
http-auth-user-profile.ts	296	0
client-bootstrap.ts	295	0
managed-image-record-store.kernel.ts	295	0
operator-approval-session-events.ts	295	0
credentials.ts	294	24
session-store-key.ts	292	0
mention-inbox-projection.ts	291	0
server-in-process-dispatch.ts	291	11
session-facts-read.ts	291	0
chat-queued-turns.ts	290	0
server-discovery-runtime.ts	290	0
session-sharing-target-read.ts	288	0
update-run-watcher.ts	287	0
presence-summary.ts	285	0
session-sharing-target-input.ts	282	0
github-personal-publication-store.ts	277	0
channel-operator-authority.ts	274	0
session-utils-store-retained.ts	274	0
chat-display-projection.helpers.ts	273	7
server-model-catalog.ts	273	6
session-reset-acp.ts	273	0
github-publication-pull-requests.ts	269	0
github-public-api.ts	268	0
node-catalog.ts	268	17
session-observer-work.ts	267	0
chat-abort-lifecycle-internal.ts	266	0
control-ui-public-session-token.ts	266	0
session-group-catalog.ts	265	0
open-responses.schema.ts	264	0
server-startup-log.ts	264	0
board-view-ticket.ts	263	0
server-worker-placement-dispatch-admission.ts	259	0
session-history-worker-reader.ts	259	0
control-ui-session-pr-check-details.ts	258	0
project-github-search.ts	258	0
internal-source-reply-persistence.ts	257	0
session-row-projection-generation.ts	255	0
local-request-context.ts	254	0
control-ui-static.ts	253	0
node-pending-work.ts	253	0
server-reload-contracts.ts	253	0
session-utils-core.ts	253	0
mcp-http.handlers.ts	252	0
auth-surface-resolution.ts	251	0
node-pairing-ssh-verify.ts	251	0
assistant-media-policy.ts	250	0
tool-resolution-completion.ts	250	0
server-connection-state.ts	249	0
session-lifecycle-persistence-owner.ts	249	0
server-agent-database-startup.ts	247	0
live-chat-projector.ts	245	12
github-publication-shared-read.kernel.ts	244	0
provider-browser-auth.ts	243	2
session-row-prepared-read.ts	242	0
control-ui-public-session-render.ts	240	0
server-broadcast-live-text.ts	240	0
workspace-icon-http.ts	237	7
session-utils-projection.ts	236	0
session-groups.ts	235	0
device-scope-upgrade.ts	234	0
conversation-list.ts	233	0
credentials-secret-inputs.ts	232	6
control-ui-public-session-admission.ts	231	0
control-ui-session-pr-prepared-read.ts	231	0
stale-install.ts	231	0
github-repository-publication-snapshot.ts	227	0
startup-auth.ts	227	0
connection-details.ts	226	0
local-http-probe.ts	224	0
server-chat-metadata-lifecycle.ts	224	0
session-group-catalog.kernel.ts	224	0
session-transcript-derived-readers.ts	223	0
node-invoke-plugin-approval.ts	222	0
session-event-payload.ts	221	0
server-plugin-runtime-client.ts	220	0
session-create-service.types.ts	220	0
mcp-http.schema.ts	219	0
control-ui-public-session.ts	216	95
session-request-agent.ts	216	0
session-row-projection-publication.ts	215	0
server-plugin-reload-channels.ts	214	0
server-startup-handler-prewarm.ts	214	0
node-connection-notifications.ts	213	0
session-utils-display.ts	213	0
call-device-auth.ts	212	0
http-byte-range.ts	212	0
node-plugin-tool-snapshot.ts	212	0
session-event-prepared-row.ts	212	0
session-row-projection-context.ts	212	0
server-runtime-config.ts	210	0
server-startup-early.ts	210	22
session-row-projection-archive.ts	210	0
server-plugins-node-runtime.ts	209	0
session-transcript-read.types.ts	208	0
worktree-maintenance.ts	207	0
session-catalog-identity.ts	206	0
session-observer-lifecycle.ts	206	0
skill-library-authoring.ts	206	0
update-run-notice-target.ts	205	0
probe-auth.ts	204	0
session-transcript-preview.ts	204	21
cli-session-history.claude-snapshot.ts	203	0
github-actions-read.ts	203	0
node-reapproval-coordinator.ts	203	13
agent-event-assistant-text.ts	202	0
mcp-app-transcript.ts	202	0
session-sharing-worker-grant.ts	202	0
control-ui-public-chat.ts	198	27
agent-runtime-execution-lineage.ts	197	0
channel-health-policy.ts	197	0
server-broadcast-scopes.ts	196	0
cli-session-history.process-held.ts	195	0
managed-image-record-store.ts	195	5
session-companion-context.ts	195	0
session-sharing-authorization.ts	194	0
session-utils-store-selection.ts	193	0
github-publication-workflows.ts	192	0
assistant-identity.ts	189	0
server-chat-live-text.ts	188	0
node-wake-state.ts	187	0
shared-read-responses.ts	187	0
http-auth-plugin-cookie.ts	185	0
mention-inbox-store.ts	185	12
node-runtime-state.ts	185	0
session-history-readonly-reader.ts	185	0
session-subagent-resume.ts	185	0
operator-run-cancellation.ts	184	0
origin-check.ts	183	4
auth-resolve.ts	182	0
boot.ts	182	0
server-kernel-request-runtime.ts	182	0
operator-approval-store.types.ts	181	0
resolve-configured-secret-input-string.ts	179	0
server-chat-lifecycle-publication.ts	179	0
server-worker-placement-change-events.ts	179	0
github-publication-failure.ts	178	0
server-startup-update-check.ts	177	0
session-method-policy.ts	177	0
github-repository-publication.kernel.ts	176	0
session-history-delta-visibility.ts	176	0
openai-compatible-agent-run.ts	175	0
server-request-lifecycle.ts	175	0
server-startup-observers.ts	174	0
server-node-session-runtime.ts	173	0
task-suggestion-registry.ts	173	0
node-connect-reconcile.ts	172	0
approval-session-audience.ts	169	0
http-media-range.ts	169	0
server.ts	167	0
session-lifecycle-plugin-hooks.ts	167	0
session-row-projection-identities.ts	167	0
session-activity-summary-source.ts	166	0
managed-image-session-read.ts	164	0
host-thaw-recovery.ts	163	0
local-user-ingress.ts	160	0
session-row-projection-backfill.ts	159	0
channel-status-patches.ts	158	0
server-reload-active-work.ts	158	0
worker-workspace-conflict-transcript.ts	158	0
operator-run-recovery-source.ts	156	0
github-repository-publication-workspace.ts	155	6
session-utils.types.ts	153	0
tools-invoke-http.ts	153	0
assistant-avatar.ts	151	0
server-cron-completion.ts	151	0
session-automation-index.ts	151	0
session-create-inheritance.ts	150	0
server-reload-channel-restart.ts	149	0
auth-policy.ts	148	0
server-plugin-runtime-generation.ts	148	0
system-ca-warmup.ts	148	0
upload-policy.ts	148	0
github-repository-publication-restore.ts	147	0
operator-invocation-authority.ts	146	0
session-utils-store-read.ts	146	0
auth-config-utils.ts	145	0
server-restart-update-run.ts	145	0
session-observer-preamble.ts	145	0
channel-avatar-http.ts	144	0
expected-profile.ts	144	0
server-startup-transcripts.ts	144	0
server-work-metrics.ts	144	0
session-observer-audience.ts	144	0
subagent-completion-tool-handoff.ts	144	0
server-start.ts	143	0
transcript-image-artifacts.ts	143	0
mention-inbox-recording.ts	141	0
server-chat-event-admission.ts	141	0
session-cold-storage-maintenance.ts	141	0
session-companion-policy.ts	141	0
session-create-target.ts	141	0
control-ui-public-session-cache.ts	140	0
agent-list.ts	139	0
control-ui-contract.ts	139	0
mcp-oauth-callback.ts	139	0
node-invoke-placement-grant.ts	139	0
server-http-probes.ts	139	9
session-classification.ts	139	0
openai-compat-errors.ts	138	-8
session-event-projection.ts	138	0
session-sharing-snapshot-cache.ts	138	0
chat-display-projection.commentary.ts	136	0
config-reload.types.ts	135	0
config-revision-token.ts	135	0
server-database-page-cache.ts	135	0
exec-approval-registration.ts	134	0
mcp-app-reconstruction.ts	134	0
mcp-app-tool-approval.ts	134	0
session-transcript-message.ts	133	0
control-ui-public-session-read.ts	132	0
board-widget-approval.ts	131	0
server-plugin-reload-recovery.ts	131	0
session-list-read-result.ts	131	0
conversation-send.ts	130	0
credential-planner.ts	130	0
exec-approval-manager.types.ts	130	0
artifact-download-grants.ts	129	0
update-run-notice.runtime.ts	129	0
artifact-downloads.ts	128	0
serialized-json.ts	128	0
server-public.ts	128	0
server-worker-runtime-install-progress.ts	128	0
session-history-subagent-sources.ts	128	0
operator-approval-store.operations.ts	127	0
session-end-transcript-reader.ts	127	0
models-http.ts	126	0
transport-error.ts	126	0
config-reload-recovery.ts	125	0
control-ui-resource-routes.ts	124	0
server-worker-placement-move-barrier.ts	124	0
session-activity-summary-state.ts	123	0
session-row-projection-revisions.ts	123	0
exec-approval-expiry.ts	122	0
session-create-existing-selection.ts	121	0
session-row-projection-catalog.ts	121	0
config-reload-plugin-drain.ts	120	0
derive-goal-session-title.ts	120	0
mcp-app-sandbox-http.ts	120	0
recovery-typing.ts	120	0
server-channel-account-lifetime.ts	119	0
session-companion-prompt.ts	119	0
session-companion.ts	119	0
chat-sanitize.ts	118	18
server-plugin-bootstrap.ts	118	0
server-sidecar-owners.ts	118	0
exec-approval-recovery.ts	117	0
server-lifetime-sidecars.ts	117	0
server-shutdown.ts	117	0
server-startup-model-runtime.ts	117	0
server-startup-secret-diagnostics.ts	117	0
session-resource-tool-policy.ts	116	0
control-ui-session-entry.ts	115	0
session-kill-http.ts	115	0
cron-stream-output-lines.ts	114	0
exec-approval-results.ts	114	0
http-request-authority.ts	114	0
node-registry.presence.ts	114	0
openai-tool-choice.ts	114	0
websocket-keepalive.ts	114	0
config-diff.ts	113	0
control-ui-session-pr-request.ts	113	0
control-ui-session-routes.ts	113	2
openresponses-prompt.ts	113	0
session-transcript-entry-message.ts	113	0
session-transcript-preview-reader.ts	113	4
control-ui-routing.ts	112	10
session-utils-store-candidates.ts	112	0
tool-resolution-authority.ts	112	0
control-ui-index.ts	111	0
managed-image-attachments.custody.ts	111	0
operator-approvals-client.ts	111	0
presence-projection.ts	111	0
server-tailscale.ts	111	0
channel-thaw-restart.ts	110	0
server-broadcast-types.ts	110	0
server-tls-renewal.ts	110	0
session-subagent-reactivation.ts	110	0
embeddings-provider-lifetime.ts	109	0
server-startup-outcomes.ts	108	0
server-instance-runtime.types.ts	107	0
control-ui-csp.ts	106	0
node-agent-cli-runtime.ts	106	0
server-recovery-runtime-context.ts	106	5
server-worker-placement-session-evidence.ts	106	0
github-oauth-device-flow.ts	105	0
session-observer-completion.ts	105	0
session-observer-read.ts	103	0
board-http.ts	102	0
control-plane-rate-limit.ts	102	0
node-registry.system-run.ts	102	0
plugin-activation-runtime-config.ts	102	0
server-startup-session-migration.ts	102	0
boot-echo-guard.ts	101	5
session-display-projection.ts	101	0
control-ui-share.ts	100	0
http-image-response.ts	100	0
server-chat-tool-recipients.ts	99	0
server-methods-list.ts	99	0
server-worker-required-profile.ts	99	0
startup-local-cli-pairing.ts	99	0
server-startup-sidecar-scheduler.ts	97	0
approval-channel-custody.ts	96	0
device-pair-setup-completion.ts	96	0
hosted-plugin-surface-url.ts	96	0
session-reset-incognito.ts	96	0
control-ui-session-pr-source.ts	95	0
server-retained-plugin-cleanup.ts	95	0
server-restart-sentinel-snapshot.ts	94	0
session-row-projection-transcript.ts	94	0
sessions-patch-lifecycle-flags.ts	93	0
managed-image-tickets.ts	92	0
server-session-key.ts	92	0
session-tool-participant.ts	92	0
config-get-response.ts	91	0
node-pairing-ssh-verify.runtime.ts	91	0
cli-session-history.claude-activity.ts	90	0
node-pairing-auto-approve.ts	90	0
security-path.ts	90	0
session-ancestor-references.ts	90	0
session-utils-read-lifetime.ts	90	0
session-workspace-roots.ts	90	0
board-widget-view.ts	89	0
gateway-config-prompts.shared.ts	89	0
control-ui-asset-manifest-parse.ts	88	0
github-publication-relevance.ts	88	0
server-worker-placement-move-destination.ts	87	0
session-projection-work.ts	87	0
node-legacy-protocol-filter.ts	86	0
sessions-patch-subagent-policy.ts	86	0
edge-auth.ts	85	0
server-runtime-handles.ts	85	0
server-lanes.ts	84	0
session-activity-summary-events.ts	84	0
session-swarm-summary.ts	84	0
github-publication-shared-read.ts	83	0
server-idle-task.ts	83	0
server-plugin-in-process-dispatch.types.ts	83	0
session-row-model-facts.ts	83	0
artifact-download-projection.ts	82	0
control-ui-bootstrap-contract.ts	82	0
session-utils.fs.ts	82	0
sessions-patch-display-metadata.ts	82	0
github-publication-runtime.ts	81	0
github-publication-transcript.ts	81	0
operator-session-run.ts	81	0
server-model-catalog-auth.ts	81	0
session-creation-provenance.ts	81	0
session-sharing-incognito.ts	81	0
mention-inbox-worker.ts	80	0
openai-compatible-input-limits.ts	80	2
question-validation.ts	80	0
chat-abort.types.ts	79	0
control-reply-text.ts	79	0
active-sessions-shutdown-drain.ts	78	0
auth-token-source-conflict.ts	78	0
server-plugin-in-process-scopes.ts	78	0
server-reload-utils.ts	78	0
worktree-merged-heads.ts	78	0
github-publication-base.ts	77	0
server-update-sentinel.ts	77	0
session-utils-contracts.ts	76	0
sessions-patch-context-window.ts	76	0
control-ui-session-path-resolve.ts	75	0
server-cron-reconciled.ts	75	0
server-request-entry.ts	75	0
github-publication-target.ts	74	0
github-tool-identity-config.ts	74	0
server-node-events-apns.ts	74	0
session-utils-store-lineage.ts	74	0
assistant-avatar-thumbnail.runtime.ts	73	0
github-publication-recovery.ts	73	0
node-catalog-read.ts	73	0
server-cron-event-dispatch.ts	73	0
server-restart-sentinel-continuation-intent.ts	73	0
update-run-summary.ts	73	0
agent-prompt.ts	72	0
scheduled-run-gateway-context.ts	72	0
server-worker-placement-reconcile-guard.ts	72	0
session-observer-terminal.ts	72	0
control-ui-file.ts	71	0
gateway-http-route-contracts.ts	71	0
mention-inbox.types.ts	71	0
session-facts-transient.ts	71	0
control-ui-links.ts	70	0
github-publication-execution-effects.ts	70	0
plugin-theme-art-http.ts	70	0
session-viewer-presence.ts	70	0
slow-request-diagnostics.ts	70	0
http-endpoint-helpers.ts	69	0
board-store.ts	68	0
assistant-media-errors.ts	67	5
server-plugin-github-account.ts	67	0
assistant-avatar-cache.ts	66	0
device-pairing-join-http.ts	66	0
node-invoke-readiness.ts	66	0
server-history-prewarm.ts	66	0
session-list-target.ts	66	0
device-pairing-prune.ts	65	0
secret-input-paths.ts	65	0
server-http-plugin-auth.ts	65	0
session-observer-companion.ts	65	0
session-fast-mode-presentation.ts	64	0
github-oauth-lifecycle-helpers.ts	63	0
known-weak-gateway-secrets.ts	63	0
session-row-transcript-backfill.ts	63	0
http-operator-access.ts	62	0
openresponses-session-store.ts	62	0
server-connection-work.ts	62	0
server-shutdown.runtime.ts	62	0
session-observer-model-slots.ts	62	0
auth-token-store-ref.ts	61	0
server-discovery.ts	61	0
session-execution-settings.ts	61	0
sessions-patch-admission.ts	61	0
mention-inbox.worker.ts	60	0
server-plugin-user-profile.ts	60	0
session-row-transcript-backfill.kernel.ts	60	0
node-registry-pairing.ts	59	0
openresponses-shape.ts	59	0
server-chat-heartbeat.ts	59	0
server-worker-placement-runtime-refresh.ts	59	0
session-companion-state.ts	59	0
session-sharing-authorization-async.ts	59	0
session-utils-model-selection.ts	59	0
exec-approval-authority.ts	58	0
mention-inbox.native.ts	58	0
server-wizard-sessions.ts	58	0
session-create-diagnostics.ts	58	0
control-plane-audit.ts	57	0
github-publication-content.ts	57	0
github-publication-execution-identity.ts	57	0
server-startup-restart-sentinel.ts	57	0
session-group-registration.kernel.ts	57	0
session-worker-placement-context.ts	57	0
startup-tasks.ts	57	0
managed-image-attachments.media-kind.ts	56	0
operator-approval-placement-grants.read.ts	56	0
server-node-events-exec-notice.ts	56	0
session-history-subagent-projection.ts	56	0
server-diagnostics.ts	55	0
server-worker-placement-local-dispatch.ts	55	0
http-header-value.ts	54	0
operator-approval-authorization.ts	54	0
session-transcript-usage.ts	54	0
managed-image-thumbnail-cache.ts	53	0
node-invoke-system-run-approval-match.ts	53	0
server-http-modules.ts	53	0
server-worker-placement-workspace-recovery.ts	53	0
auth-token-resolution.ts	52	0
board-sandbox.ts	52	0
mcp-app-channel-action.ts	52	0
operator-approval-standing-grants.types.ts	52	0
session-observer-persistence.ts	52	0
assistant-media-content-disposition.ts	51	0
node-session.types.ts	51	0
server-channel-start-fence.ts	51	0
managed-image-record-store.types.ts	50	0
server-startup-config.types.ts	50	0
explicit-connection-policy.ts	49	0
github-repository-target.ts	49	0
node-skill-descriptors.ts	49	0
operator-approval-runtime-token.ts	49	0
operator-scopes.ts	48	0
server-channel-autostart-recovery.ts	48	0
session-group-catalog.types.ts	48	0
session-list-order.ts	48	0
session-request-targets.ts	48	0
session-row-projection-access.ts	48	0
tailscale-published-origin.ts	48	0
session-group-defaults-access.ts	47	0
session-transcript-source-pages.ts	47	0
control-ui-user-avatar-route.ts	46	0
cron-stream-matcher.ts	46	0
mention-inbox-presentation.ts	46	0
plugin-channel-reload-targets.ts	46	0
server-node-events-types.ts	46	0
server-worker-placement-cancel.ts	46	0
session-transcript-summary.ts	46	0
env-deprecation.ts	45	0
in-process-session-run.ts	45	0
operator-role-source-policy.ts	45	0
server-model-catalog-view.ts	45	0
tls-fingerprint.ts	45	0
session-create-key.ts	44	0
agent-runtime-approval-authority.ts	43	0
events.ts	43	0
server-active-work.ts	43	0
server-cron-contract.ts	43	0
server-reload-model-runtime-scope.ts	43	0
session-sharing-describe.ts	43	0
control-ui-asset-manifest.ts	42	0
managed-outgoing-artifact-id.ts	42	0
server-channel-startup.ts	42	0
server-cron-plugin-job.ts	42	0
server-live-state.ts	42	0
session-reset-target.ts	42	0
chat-abort-ops.ts	41	0
rate-limit-attempt-serialization.ts	41	0
session-utils-store.types.ts	41	0
active-sessions-shutdown-tracker.ts	40	0
authenticated-presence-user.ts	40	0
config-applied-revision.ts	40	0
http-conditional.ts	40	0
server-channel-runtime.types.ts	40	0
session-group-membership.read.ts	40	0
session-transcript-read-target.ts	40	0
current-user-profile-display.ts	39	0
server-media-cleanup-lifecycle.ts	39	0
operator-approval-snapshot.ts	38	0
session-observer-rpc.ts	38	0
chat-inflight-snapshot.ts	37	0
in-process-subagent-resume.ts	37	0
operator-approval-store.native.ts	37	0
session-plugin-ownership.ts	37	0
session-transcript-path.ts	37	0
session-input-participant.ts	36	0
config-reload-status.types.ts	35	0
control-ui-identity.ts	35	0
control-ui-root-assets.ts	35	0
control-ui-session-entry-path.ts	35	0
node-invoke-sanitize.ts	35	0
session-create-fork-entry.ts	35	0
session-reset-transcript.ts	35	0
auth-install-policy.ts	34	0
operator-cli-message-input.ts	34	0
session-model-patch-origin.ts	34	0
chat-abort-diagnostics.ts	33	0
chat-attachment-policy.ts	33	0
control-ui-image-http-routes.ts	33	0
device-pairing-list.types.ts	33	0
error-shape.ts	33	0
session-list-diagnostics.types.ts	33	0
session-patch-hooks.ts	33	0
session-title-state.ts	33	0
node-invoke.types.ts	32	0
question-session-access.types.ts	32	0
server-cron-drain.ts	32	0
control-ui-http-utils.ts	31	0
startup-control-ui-origins.ts	31	0
github-remote.ts	30	0
mcp-http.protocol.ts	30	0
node-event-send.ts	30	0
session-creator.ts	30	0
auth-mode-policy.ts	29	0
control-ui-file.worker.ts	29	0
configured-default-repository.ts	28	0
mention-inbox-input.ts	28	0
node-wake-state-store.ts	28	0
server-qa-diagnostic-timings.ts	28	0
server-startup-readiness.ts	28	0
session-request-error.ts	28	0
skill-library-session.ts	28	0
applied-config-hash-publisher.ts	27	0
session-observer-contract.ts	27	0
session-permission-change.ts	27	0
device-worker-revocation.ts	26	0
mention-inbox.worker-contract.ts	26	0
node-invoke-request.ts	26	0
openai-agent-run-usage.ts	26	0
project-github-identity.ts	26	0
session-create-visibility.ts	26	0
session-mutation-authorization-error.ts	26	0
session-reset-notifications.ts	26	0
agent-runtime-session-spawn-context.ts	25	0
control-ui-shared.ts	25	0
github-publication-events.ts	25	0
in-process-session-delivery.ts	25	0
node-event-payload.ts	25	0
role-policy.ts	25	0
server-runtime-startup-services.ts	25	0
session-model-revision.ts	25	0
session-publication-grant.ts	25	0
hooks.types.ts	24	0
operator-approval-reviewer-binding.ts	24	0
server-maintenance-lifecycle.ts	24	0
server-transport-bridge.ts	24	0
ui-command-target.ts	24	0
chat-run-owner.ts	23	0
control-ui-public-session-ingress.ts	23	0
http-upload-policy.ts	23	0
model-auth-refresh.ts	23	0
native-hook-relay-http.ts	23	0
node-browser-proxy-policy.ts	23	0
openresponses-session-store.types.ts	23	0
session-history-error.ts	23	0
session-provider-review-projection.ts	23	0
session-subscription-keys.ts	23	0
in-process-agent-runtime-identity.ts	22	0
probe-target.ts	22	0
question-access.ts	22	0
server-model-catalog.types.ts	22	0
session-utils.ts	22	0
server-runtime-service-shared.ts	21	0
device-token-client-lifecycle.ts	20	0
hooks-policy.ts	20	0
operator-tool-gateway-authority.ts	20	0
server-reload-agent-databases.ts	20	0
server-shared.ts	20	0
session-row-projection-binding.ts	20	0
call-required-features.ts	19	0
conversation-read-origin.ts	19	0
github-cli-preflight.ts	19	0
server-reload-generation.ts	19	0
session-companion-errors.ts	19	0
session-row-transcript-backfill.types.ts	19	0
tool-upload-policy.ts	19	0
auth-policy.types.ts	18	0
call-mutation-fallback.ts	18	0
control-ui-plugin-frame-contract.ts	18	0
operator-identity-scopes.ts	18	0
server-constants.ts	17	0
channel-stop-timeout.ts	16	0
control-ui-bootstrap-presentation.ts	16	0
cron-stream-matcher.worker.ts	16	0
server-startup-secret-surfaces.ts	16	0
session-history-read.types.ts	16	0
conversation-errors.ts	15	0
gateway-owner-profile.ts	15	0
model-account-authority.ts	15	0
session-row-placement-projection.types.ts	15	0
chat-input-sanitize.ts	14	0
control-ui-plugin-policy.ts	14	0
cron-exit-watch-shell.ts	14	0
lazy-handler.ts	14	0
chat-display-projection.ts	13	0
control-ui-route-preloads.ts	13	0
gateway-access-revision.ts	13	0
live-text-continuity.ts	13	0
server-json.ts	13	0
ws-logging.ts	13	0
cron-creator-authority-grant.types.ts	12	0
server-in-process-dispatch.types.ts	12	0
server-sidecar-startup-mode.ts	12	0
internal-approval-authority.ts	11	0
node-computer-use-descriptor.ts	11	0
standing-grant-expiry-config.ts	11	0
control-ui-plugin-assets-contract.ts	10	0
server-utils.ts	10	0
config-reload-settings.ts	9	0
operator-access-policy.types.ts	8	0
process-instance.ts	8	0
session-archive.runtime.ts	8	0
model-account-connect-errors.ts	7	0
agent-command-policy.ts	6	0
node-pairing-auto-approve.types.ts	6	0
session-change-receivers.ts	6	0
session-lifecycle-runtime-loader.ts	6	0
session-utils-store-errors.ts	6	0
ui-command-target.types.ts	5	0
operator-approval-store.worker-contract.ts	4	0
operator-role-actor.ts	4	0
websocket-protocol.ts	4	0
github-user-identity.types.ts	3	0
server-close.runtime.ts	3	0
session-log.ts	3	0
node-registry-private-token.ts	2	0
role-policy.types.ts	2	0
workspace-file-limits.ts	2	0
chat-display-projection.map.ts	0	-11
control-ui-public-session-response.ts	0	-82
operator-approval-store.fields.ts	0	-24

The deeper pass also implemented and rejected candidates that added indirection without meaningful reduction or conflated distinct authority, custody, failure, and platform contracts. Tests were retained as the behavioral specification.

Share repeated Gateway variant handling and lifecycle projections while preserving authority checks, error precedence, public wire/state shapes, and user-facing text.

Consolidate chat delivery, session reset/read paths, credential selection, public conversation responses, approval projections, and paired lifecycle operations. Retain all existing assertions; adapt one internal startup fixture and shrink two assertion-ratchet entries.

The full per-file deep pass covers the top-level Gateway production scope. Release-note context: internal refactor with no user-visible behavior change.
Keep model-account connection methods and their named Promise results in the existing SDK shape. Retain the original approval matcher and its short-circuit evaluation order, and keep shared terminal-field construction in a private module.

The final candidate preserves behavior while removing 758 net production lines. Core types, focused lint, independent P0-P2 review, and wrapper-closure/suppression guards passed; full runtime and SDK comparison proof follows on the signed head.
Keep unrecognized FsSafeError codes on the existing generic fallback through an explicit default branch. Rename the private degradation filter parameter to avoid shadowing the owner-held state.

Neither change alters public declarations or runtime outcomes. Focused lint and independent P0-P2 review passed.
Keep the captured heartbeat flag for the first buffered-text filter, but
omit it from the paced publication callback as on main. This preserves
the existing ownership lookup after a deferred transcript publication.
@clawsweeper

clawsweeper Bot commented Oct 9, 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 the gateway Gateway runtime label Oct 9, 2026
@steipete
steipete marked this pull request as ready for review October 9, 2026 10:49
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 0b26c00bccd0be8b93d7245ea0afe84254484c68
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/credentials-secret-inputs.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/gateway/credentials.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • 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/origin-check.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/provider-browser-auth.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server-secrets-reload.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 Oct 9, 2026
@clawsweeper

clawsweeper Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The Gateway, OpenClaw’s request and conversation server, shares repeated delivery, transcript-reading, credential-selection, and lifecycle handling while preserving existing behavior.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The refactor is useful and no actionable defect was found, but its supplied validation is primarily test-driven integration coverage with documented broad-run limits.
Proof confidence 🦐 gold shrimp (3/6) This maintainer PR is exempt from the ordinary contributor proof gate, and no material authority change requiring separate final-effect proof was established. Existing-state compatibility is supported by unchanged stored fields, write predicates, configuration semantics, and the reported unchanged SDK declarations.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The established Gateway area contributor directs this cleanup, and the substantial net reduction removes duplicated handling without adding configuration or product surface.

Merge readiness

✅ Ready for maintainer review

This PR remains a useful, maintainer-directed cleanup with distinct work beyond current main. No concrete introduced correctness or security defect was established.

Priority: P3
Reviewed head: 0b26c00bccd0be8b93d7245ea0afe84254484c68

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No standalone installed-Gateway run of the shared delivery and restart paths is recorded; the supplied final-head evidence is test-driven.
Agent review details

How this fits together

The Gateway receives HTTP requests, client commands, and agent events, then coordinates conversation delivery, stored transcripts, and runtime lifecycle operations. These changes consolidate its internal handling before responses and events reach clients.

flowchart TD
  A[HTTP requests and client commands] --> C[Existing admission and authorization]
  B[Agent events] --> D[Shared Gateway handling]
  C --> D
  D --> E[Transcript and approval owners]
  E --> F[Current ownership and publication checks]
  D --> F
  F --> G[Client responses and conversation events]
Loading

Technical review

Best possible solution:

Keep the shared implementations with their existing variant-specific checks, ordering, and public contracts.

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

Not applicable: this PR proposes a behavior-preserving refactor, not a reported user defect; this read-only review executed no target code.

Is this the best way to solve the issue?

Yes: the diff consolidates equivalent handling into small shared implementations while retaining distinct error precedence, authority checks, and lifecycle ownership.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0513aeae6a87.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Introduced scope and merge result: Reviewed the pinned merge-base-to-head diff. The recorded test merge has the supplied main SHA and exact PR head as its two parents; its server-chat changes preserve main’s terminal-persistence and current-owner checks. (src/gateway/server-chat.ts:981, 26926d4765ad)
  • Public-response authorization preserved: The shared response owner checks the active publication and representation freshness in the synchronous response frame before sending either content or a 304. (src/gateway/control-ui-public-session-response.ts:57, 0b26c00bccd0)
  • Deferred heartbeat handling preserved: Paced delivery retains the captured heartbeat flag for its initial filter while omitting that flag from deferred publication, matching the prior path’s ownership lookup. (src/gateway/server-chat.ts:774, 0b26c00bccd0)
  • Existing-state compatibility: Approval terminal fields retain the same persisted columns and values, and the surrounding update predicates remain intact. Mention storage, attachment facts, credential precedence, and startup auth overrides are consolidated without introducing a schema, stored-format, or configuration migration. (src/gateway/operator-approval-store.fields.ts:8, 0b26c00bccd0)
  • Complete validation context: Read the complete GitHub body, including the omitted coverage and failure sections. Captured body identity is SHA-256 fe660d3d6099feefe30fccac84190cd9620e88d793c0dcf712961e47e30b920c. It reports 420 passing final-head tests, unchanged SDK declarations, and passing changed checks, while explicitly retaining historical failures and mixed-head reporting gaps; those gaps are not represented as a green full-directory run. (0b26c00bccd0)
  • Production-boundary test contract: Existing concurrent-reader coverage drives the production HTTP server, publication store, transcript reader, and revocation owner through real fetch requests, including both public routes and rejection after revocation. This is test-driven integration coverage, not an installed-Gateway run. (src/gateway/control-ui-public-session.concurrent.test.ts:16, 0b26c00bccd0)

Likely related people:

  • Peter Steinberger: Raw commit 94c0f0d adds src/gateway/server-chat.ts:1014 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 94c0f0d589ab; files: src/gateway/server-chat.ts)

PR surface

Source -717, Tests +2, Other -1. Total -716 across 69 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 67 1385 2102 -717
Tests 1 8 6 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 2 -1
Total 69 1394 2110 -716

Review metrics

Metric Value Why it matters
Production versus tests Production +1,385/-2,102, net -717; tests +8/-6, net +2 Shared internal handling reduces production maintenance cost while the existing test assertions remain unchanged.

Labels

Label changes:

  • add P3: This is internal cleanup with no intended user-visible change or established urgent regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is internal cleanup with no intended user-visible change or established urgent regression.
  • 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.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 9, 2026, 6:57 AM ET / 10:57 UTC.

@steipete

steipete commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head CI attribution for 0b26c00bccd0be8b93d7245ea0afe84254484c68 (run 37919932189). CI tested merge 26926d4765add4f806178030e6c23a0c2606e44d, whose parents are main 0513aeae6a87b5c9d9b16b5f623d23d5d830940f and this PR head.

Failing job Attribution and proof
build-artifacts — 113785696942 pnpm build passed in 159.1s. The following generated-assets check failed only because extensions/workboard/openclaw.plugin.json differs from regenerated output. Unrelated PR #167662 reproduced the identical failure at head 27522af64628d3422e55e168a111cdd22613ded1, run 37919793367 / job 113785188584, after its own successful build. Both tested merges have the same main parent, 0513aeae.
openclaw/ci-gate — 113789070112 Downstream of that single failed build-assets check. Its selected-lane report shows every other selected lane succeeded, including Node tests, UI tests/E2E, lint, type checks, ratchets, and package boundaries. Every skipped lane is explicitly selected=false; there are no cancelled or missing selected jobs to waive. The combined openclaw/ci-gate commit status mirrors this CI result; dependency and security-sensitive contexts are successful.

The Workboard browser graph (81 repository files), conservative build-driver graph (174 files), committed manifest, relevant package declarations, and lockfile are unchanged from main to this PR's tested merge. None of the 69 lane paths occurs in either inspected graph. The peer PR also leaves these inputs unchanged. This is matching inherited-failure evidence, not a claim that the asset check passed. Main's earlier Workboard refactor changed six browser inputs without refreshing the committed manifest; regeneration belongs to that separate owner.

Local proof on the exact PR head: complete changed check passed; production types and all 27 test type graphs passed; all three Knip scans returned zero findings; runtime and Madge cycles are zero; SDK comparison has no API changes; affected runtime proof passed 16 files / 420 tests; wrapper/source-closure/eager-bootstrap and lint-suppression proof passed 3 files / 23 tests. The broad local run's historical failures and reporting gaps remain documented in the PR.

Independent review and the completed exact-head ClawSweeper review found no actionable issue. The security and dependency guards passed. The ClawSweeper review records test-driven proof rather than standalone installed-Gateway proof; no new authority behavior is claimed.

This supplies the campaign-authorized inherited-failure exception for a squash merge pinned to the exact head above. The production reduction remains 717 lines under the documented 500–999-line coverage exception.

@steipete
steipete merged commit 2c3cab6 into main Oct 9, 2026
236 of 239 checks passed
@steipete
steipete deleted the deslop/d30-gateway-toplevel-20261008 branch October 9, 2026 11:15
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 10, 2026
…7775)

Share repeated Gateway delivery, transcript, credential, approval, and lifecycle handling while preserving authority checks, error precedence, public wire/state contracts, and user-facing text.

Remove 717 net production lines across 67 top-level Gateway files. Keep every existing test assertion; adapt one internal startup fixture and shrink two assertion-ratchet entries.

The complete changed check, production and 27 test type graphs, Knip scans, zero-cycle checks, SDK API comparison, 420 affected runtime tests, and 23 wrapper/suppression tests passed on the reviewed head. Hosted selected test/lint/type/boundary lanes passed. The Workboard generated-manifest check and its downstream CI gate were admitted as an independently reproduced inherited failure; full attribution and historical local proof limits are recorded on the PR.

No user-visible behavior change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime 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