Skip to content

refactor(runtime): deslop core subsystems - #157982

Merged
steipete merged 2 commits into
mainfrom
deslop/l43-src-misc
Sep 25, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/l43-src-misc

Conversation

@steipete

@steipete steipete commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #157965

What Problem This Solves

Maintainer-requested lane l43 removes duplicated plumbing and dead internal paths across core runtime subsystems, including channel/provider/search setup, hooks, and shared JSON Schema handling.

User Impact

The cleanup preserves existing behavior, security decisions, persisted data, provider selection, and public interfaces. One bug fix makes failed meeting-audio startup terminate abandoned output processes and absorb their delayed spawn errors while preserving the original input failure.

Why This Change Was Made

Equivalent internal paths now share their existing owners; private forwarding layers and duplicate types are removed. No schema, retention, permission, provider selection, tool contract, or public protocol changes are intended.

Simplifications by subsystem
  • System agent: use canonical planner and inference entry points, share turn queuing and wizard dispatch, remove unwritten follow-up state and redundant types.

  • Claws: reuse add failure results, update partial-error handling, empty plans and summary inventories while keeping mutation and rollback ordering.

  • Meetings: share Gateway response/error handling and local/node realtime engine construction, reuse transcript parsing and transport types, remove duplicate predicates and unreachable caption cleanup.

  • Talk/TTS: give preference reading and path/auto-mode resolution one owner, reuse directive projection and canonical helpers, remove redundant branches and stored state.

  • Security: use canonical finding types and full-distance Levenshtein calculation, collapse identical findings paths and private forwarding helpers, retain decisions, error text, and order.

  • Media: remove redundant result/types/forwarding code and unused private options, reuse codec normalization, and drop unreachable compression fallbacks while preserving all safety and byte constraints.

  • Worker/fleet: share ownership predicates, protocol validators and runtime-owned types without moving fencing or lifecycle checkpoints.

  • Transcripts/plugin state: reuse the result factory per typed transcript branch, share plugin error encoding and blob preparation; reuse existing types and errno checks without changing SQL, transactions, schemas, retention, or transcript bytes.

  • Flows: share catalog install/back/resume handling and config/result projections; replace the literal status-label switch with descriptors while preserving lazy translation.

  • Hooks: reuse canonical numeric/string normalization, simplify import-cache selection and slug extraction, and remove duplicated tutorials/narration; event names, payloads, order and error isolation remain intact.

  • Shared schema handling: bind private recursive child operations to the existing resource context and share ordered dependency traversals; retain all exports and ref/default/error semantics.

Fixes found along the way

Input process construction can throw after the meeting output process has started. Local startup now cleans up that output; local and node startup also handle a delayed output error after abandoning construction. Existing injected-process fixtures cover both cases. The local regression fails on the base because SIGTERM is never sent; the node regression fails because the delayed output error escapes. Both pass with the repair.

Evidence

Execution proof ran on Linux Blacksmith Testbox. The broad proof used tbx_01m3b9xsy9cz4e8egsb4ws5jp9; after that lease was cancelled, final validation used replacement tbx_01m3bg9h1wxx3w4p1r2bdvk648. Testbox runs: broad proof, final proof. The wrapper command results below are the execution authority; stopped Testbox carrier runs can show cancelled. Validation base: 818b0092d2ee65080b53a57e8949b0f8b4e03ff9. The branch was subsequently rebased onto a68216889f1 to carry the landed CI-budget and upgrade-fixture corrections; git range-diff confirms the refactor patch is unchanged, and incoming main did not alter production files in this lane. Original validated head: 139360696b0 (CI).

  • Owner selection: 363 files / 5,023 tests passed (585.87s wall); 12 Windows-only cases skipped.
  • Cross-subsystem importers: 267 files / 7,731 tests passed across 53 Vitest shards (1,367.30s wall); one Windows-only case skipped.
  • Google Meet, Teams Meetings, Zoom Meetings: 50 files / 462 tests passed (117.70s wall).
  • pnpm build: passed initially (479.19s wall) and after the transcript typing repair (508.15s wall).
  • Transcript owner/consumer rerun after the typing repair: 7 files / 93 tests passed (63.58s wall).
  • SDK export registration and surface budgets: passed. Final base/head API comparison passed (337.06s): no entrypoint or direct signature changes. Reviewed declaration digest cce9cfb1 has 131 reachable closure changes across nine deduplicated declaration sections: private type removal, equivalent owner-type reuse, TTS preference ownership/re-exports, and property-order noise. The public member chains and structural types remain compatible.
  • Independent Codex review: no actionable P0-P2 findings, including a fresh review after preserving branch-specific transcript result types.
  • check-changed: final production-path and baseline selection passed (1,635.81s), including core types, all 25 test-type shards, lint, dead-export scans, import cycles, and the selected guards. Earlier transcript typing and three lint findings were corrected; no casts, increased budgets, or skipped checks were used. Changed-test typing/lint also passed in the earlier full selection.
  • Media follow-up: both selected files passed (19.60s wall).

Initial hosted CI run finished with 146 successful jobs and two failing test shards (plus the aggregate gate). The hosted-tail row-budget assertion is already corrected on main by #157836: dist rows are excluded from the existing 70-row Node cap while retaining the 90-row compact cap. The Gateway SecretRef restart fixture timed out on the GitHub merge tree, including #157964; its lease-settlement race is repaired by the separately landed #158027. The next CI run also reported an upgrade shell-fixture initialization failure now fixed by #157996, plus a different real-timer promoted-no-op stop timeout. A bounded observation-only replay of that exact 56-file Gateway group passed (134.22s); all receipt, restart, and cleanup phases completed, so that historical timeout remains unlocalized and is not claimed fixed. The demonstrated fake-timer SecretRef lease race landed as 2d64a7470e8c2bc8256797c5d3e3d5ca2aef94ba. Exact-head CI and both required openclaw/ci-gate contexts passed on 139360696b0; that original proof remains valid for the unchanged portion of this PR. This PR has not been merged.

Changed test costs, measured with pnpm test <file> --maxWorkers=1:

File Passing tests Command wall
src/meeting-bot/realtime-local-audio-transport.test.ts 9 1.744s
src/meeting-bot/node-host.audio.test.ts 27 3.173s
src/system-agent/assistant.configured.test.ts 9 22.318s (includes cold worker build; assertions took about 0.52s)

Per-file hosted CI timings were not uploaded, and the available preflight artifact/log does not map files to jobs. The isolated command costs above are measured; hosted per-file seconds are unavailable.

Production: 908 lines added, 2,227 removed, 1,319 net removed. Tests: 57 added, 24 removed. The generated assertion baseline only lowers eight existing allowances, removing fifteen total; no allowances are added.

All lane production files were read. Export/importer traces cover src, extensions, packages, test, scripts, ui, and apps; existing SDK compatibility exports remain intact. The widened sweep exceeds the campaign target. The coverage log includes the added flows, shared, and hooks subtrees.

Widening proof

The added flows, hooks, and shared-schema changes remove another 443 production lines. Fresh independent Codex P0–P2 review found no actionable issues. Both shared-schema exports and all SDK-reachable exports remain available with unchanged signatures.

On Blacksmith lease tbx_01m3byc2sy1n2pqd7h3rkw00xg (run), the owner/cross-consumer selection passed 129 passing file runs / 2,071 test executions; one native-Windows file with ten cases was skipped on Linux. The selection includes onboarding E2E, CLI and wizard setup, hosted setup, Gateway hook mapping, plugin schema validation, MCP runtime, and media cache consumers. Command wall was 1,235.475s, including the required 892.9s private-QA build preflight.

The first changed-check attempt correctly required the assertion baseline to shrink from 28 to 25 for src/shared/json-schema-defaults.ts. The canonical pruning command owns that update; no allowance was raised. The next changed-check run passed core typing and all 25 test-type groups, then identified the last direct consumer of the canonical ChannelSetupResult export. Its typed result adapter is retained, with the redundant Boolean projection removed; no public export was deleted. A subsequent lint pass required the Doctor finding projection to use a fresh Object.assign target instead of spread inside map; optional-field presence and insertion order are preserved. The final lint preflight passed on all 97 changed source/test files (38.448s); Doctor projection owner and flow integration tests passed 154 tests across two files (29.338s). Final check-changed passed (1,848.275s), including core typing, all 25 test-type groups, every selected guard, dead exports, cycles, and lint. SDK export registration (0.226s) and surface budgets (3.842s) passed. SDK base/head API comparison passed (346.343s): no entrypoint/export additions or removals and all 131 affected export records have unchanged direct declaration text and kind. Reviewed digest 69a51c81c729575513b1b870b2647f04443ce257c5dc715e32afbebc8af87a56. The eleven deduplicated sections resolve to equivalent internal type reuse, private-only removal, whole-module fallback pairing, and unchanged-source emitter ordering; public member chains remain compatible. None originates in the newly widened flows/hooks/shared files.

The corrected setup consumers passed 725 test executions (79.276s). pnpm build, with private QA enabled for the onboarding E2E consumer, passed (764.780s); the last Doctor projection adjustment was mechanical lint cleanup and received fresh owner tests, core/type checks, and independent review.

The first lease’s carrier was cancelled during an unfinished type-check continuation (transport exit 255; no code diagnostic). Its completed build/test results remain valid. The unfinished gates moved to tbx_01m3c5cbkd5kjcqn37n57ken5z (completion run), warmed with a 90-minute lease inactivity limit for the measured command duration. Test timeouts and assertions were unchanged. A short-lived replacement was stopped before execution. All widening leases are stopped. Published candidate: 937072f80eb584a7a883602e32cd4a7b51bd00e8, rebased onto fresh main 2ae0e9141cc19655e7fac445b796dc3cf508fcc0. Both commits are patch-identical by git range-diff. Incoming main preserves its media legacy-URL fix, Claws unused-argument removal and Doctor runtime cleanup contribution. The post-rebase persisted-media regression passed all 40 tests (36.388s command wall; the only local focused test during widening). READY-TO-LAND: exact-head CI passed, and dependency/security review published successful required statuses for this head, including openclaw/ci-gate. The PR is open and non-draft, with auto-merge disabled; landing remains with the coordinator. No CI reruns were needed for this candidate.

Coverage: all 232 production files over 200 lines, sorted by baseline size
Lines File Status Simplification or preservation reason
1538 src/flows/model-picker.ts READ Merged scoped/unscoped nonempty allowlist projection; retained scope filtering, model metadata and ordered allow entries.
1513 src/security/audit.ts READ Applied: inline gateway collector forwarding; share identical safe-bin result loop; retained all collector order and finding text.
1271 src/media/web-media.ts READ Removed single-use pixel-budget forwarder and unreachable normalized-quality fallback branches; retained MIME, root, provenance and size admission.
1270 src/flows/doctor-core-checks.ts READ Keep lazy diagnostics, captured-note semantics, security decisions, repair ordering and owner-specific warning text.
1267 src/security/audit-extra.sync.ts READ Applied: canonical finding type and shared UTF-16 Levenshtein helper; retained suggestion threshold and ordering.
1140 src/shared/json-schema-defaults.ts READ Applied: bind shape-error and ref-inlining child recursion to current resource context; merge schema-map/dependencies inlining and ordered dependency application; preserve both exports, getter reads, first-error paths, ref boundaries and default sequencing. Net reduction: 76 lines.
1071 src/flows/channel-setup.ts READ Unified catalog installation/back-navigation and final configuration dispatch; retained canonical result adapters, rollback, persistence and prompt order.
1009 src/system-agent/verified-inference.ts READ Removed state-resolver forwarding wrapper; retained independent credential, runtime-owner and artifact validation because each protects a different drift boundary.
805 src/fleet/backup.runtime.ts READ backup/restore archive bounds, generation-pinned actions and recovery checkpoints have distinct ownership contracts; no sound deletion.
795 src/fleet/service.runtime.ts READ reused fleet ownership and health type; preserved list projection after all inspections settle.
788 src/shared/text/assistant-visible-text.ts READ preserved quote-aware parser, profile order and transcript bytes; no sound structural reduction.
769 src/media/fetch.ts READ Calls canonical sensitive-text redactor directly; retained fetch retry/redirect/header/body timing and error mapping.
766 src/flows/search-setup.ts READ Existing provider selection owner now constructs config for key, selection and disabled paths; callback order and lookup count retained.
759 src/fleet/containers.runtime.ts READ container/network inspect variants preserve different response fields and errors; command/redaction and locality guards are necessary.
759 src/media/store.ts READ Removed directory/limit aliases and result/URL forwarding helpers; shortened narration; retained publication, modes, limits and pruning semantics.
751 src/talk/client-voice-session.ts READ Retained durable append/close ownership and post-await confirmation checks; no safe consolidation without persistent-store changes.
750 src/system-agent/setup-inference-turn.ts READ Probe resource settlement, frozen-owner comparison and activation revalidation have distinct lifetimes; no further behavior-identical consolidation found.
749 src/meeting-bot/session-runtime.ts READ Lifecycle lock, retained-tab rollback, and cleanup handles have distinct custody; no sound further collapse without changing await/fencing order.
741 src/transcripts/capture.ts READ Capture admission, finalization and failed-start restoration retain distinct lifecycle fences; no sound structural merge without changing ordering.
736 src/fleet/service-support.runtime.ts READ reused existing inspectionHasFleetOwner for all ownership decisions and exported the existing health result type.
734 src/talk/client-voice-confirmation.ts READ Retained one-shot grants, utterance receipts, challenge expiry and live-scope fencing; branches serve distinct authority states.
729 src/transcripts/store-read.ts READ SQL bounds payload bytes in the same statement as identities; page, export and shipped legacy readers have distinct budgets and projections.
727 src/transcripts/auto-start.ts READ Continuous and occupancy starts share startCapture already; retry, guild ownership and cleanup branches preserve separate lifecycle contracts.
719 src/claws/packages.ts READ Lease, preflight, persistence and rollback paths have distinct ordering and retained-owner contracts; no dead exported runtime entrypoints.
714 src/meeting-bot/chrome-transport.ts READ Applied: local and paired-node engine selection now share startRealtimeEngine while retaining node-only context and binding precedence.
712 src/claws/lifecycle.ts READ Removed one-use blocked-action forwarding helper and repeated parameter projection; manifest consent actions unchanged.
704 src/claws/lifecycle-state.ts READ Removal preview and apply preserve monitor drainage, journal fencing and cleanup order; superficially repeated checks cross await boundaries.
702 src/claws/add.ts READ Workspace-file failure uses the existing partialResult owner; retry statuses, recorded packages and failure diagnostics unchanged.
702 src/meeting-bot/node-host.ts READ Applied: removed numeric-fallback and wake forwarders; partial-spawn cleanup now absorbs abandoned output errors while preserving the input error and close custody.
694 src/claws/update-plan.ts READ Shared identical not-found plan projection across absent database, table and install paths; database admission and cleanup untouched.
689 src/hooks/install.ts READ Install source routing already has one transaction/scanning owner; preserve source-specific validation and errors.
686 src/claws/update-capability-changes.ts READ Reused AgentConfig owner, inferred portable-tool return type, removed repeated array/undefined checks and rank casts.
681 src/system-agent/operations-execution-helpers.ts READ Removed naming-only dynamic-import wrappers and used canonical ConfigFileSnapshot type; kept per-commit inference/authority gates and exact audit outcomes.
679 src/system-agent/setup-inference-credentials.ts READ Saved credentials, auto discovery and interactive login have distinct consent and persistence contracts; existing stagePreparedCandidate already owns common staging.
678 src/media/parse-output.ts READ Distinct local/remote admission, code spans and whitespace-preserving projections; no sound consolidation without output-byte or path changes.
670 src/system-agent/chat-wizard-host.ts READ Unified injected/default invocation for skills/search/gateway/memory flows; retained channel-specific authority callback signature and WizardSession ownership.
667 src/system-agent/operations-execute.ts READ Removed one-use overview import wrapper; dispatch branches preserve distinct output, approval, lazy-loading and side-effect contracts.
662 src/media/playback-transcode.ts READ Inspection/transcode caches have distinct admission and lifetimes; retained pinned-file checks, limits and native-format decisions.
659 src/meeting-bot/status-call-source.ts READ Applied: removed unreachable observer cleanup under !active and reused sameCaptionRow for matching; capture/settlement bytes preserved.
657 src/system-agent/greeting.ts READ CAS cursor ordering, per-fact single-flight, diagnostic cache fallback and host-owned alerts must remain distinct; avoided synchronous store/audit semantics changes.
656 src/system-agent/operations-parse.ts READ Removed dead followUp result field with no producers; preserved anchored grammar, sensitive-path parsing and exact approval descriptions.
656 src/transcripts/store.ts READ Replaced duplicate errno shape checks with canonical hasErrnoCode; export/session operations retain exact lease and transaction ownership.
655 src/claws/package-remove.ts READ Explicit claim, revalidation and external mutation paths protect independent/shared ownership; no safe merger of these phases.
650 src/hooks/message-hook-mappers.ts READ Payload adapters differ in field presence and insertion order; preserving explicit projections avoids changing hook shapes.
648 src/claws/schema.ts READ Strict parser owns field-specific schemas, refinements and ordered diagnostics; no interchangeable validation contracts.
647 src/claws/export.ts READ Imported canonical AgentConfig type; explicit portable projections exclude host-private and inherited settings.
642 src/flows/doctor-core-checks.runtime.ts READ Provider outputs are untrusted and getter/proxy failures have tested distinct findings; retain their checks and ordering.
638 src/system-agent/chat-turn-router.ts READ Removed dead model-setup follow-up handling and output composition; maintained proposal consumption, approval and post-write repair ordering.
637 src/system-agent/setup-inference-activate.ts READ Provider staging and rollback retain exact config/auth ownership, utility-role checks and commit guards; no safe larger cutover found.
634 src/flows/doctor-health-contribution-runners.config.ts READ Guarded config writer, include ownership, durable receipts and post-write cleanup are distinct required contracts.
634 src/plugin-state/plugin-state-store.ts READ Async and sync facades preserve named Plugin SDK compatibility and operation-specific input/error validation; callbacks cannot cross worker boundary.
633 src/meeting-bot/realtime-engine.ts READ Provider callbacks, output generations, consult cancellation, and retryable cleanup have different lifecycle guarantees; already canonical owners.
627 src/system-agent/setup-apply.ts READ Removed redundant workspace reread/reassignment after copying the same defaults; retained empty-default shape, snapshot/hash and cross-store guards.
626 src/claws/reader.ts READ Source byte snapshots, descriptor cleanup, package/development parsing and diagnostics have distinct bounds and safety contracts.
626 src/system-agent/setup-inference-core.ts READ Used canonical embedded runner type and one encoded-choice parser for provider-auto and saved-auth; retained protocol shapes, messages and owner evidence.
625 src/security/audit-extra.async.ts READ No sound cleanup: timeout cancellation/error mapping, filesystem probe order, and lazy boundaries are distinct contracts.
622 src/flows/doctor-health-contributions.ts READ Retain migration ordering, auth repair, systemd ownership and update admission; no sound lifecycle collapse.
621 src/tts/tts-synthesis-support.ts READ Provider selection and attempt lifecycle already share one owner; retained acquisition/release and projection-error ordering.
618 src/claws/provenance.ts READ Install and package ownership compare-and-swap/legacy schema reads preserved; no store-semantics refactor in this sweep.
613 src/security/install-policy.ts READ Applied: remove unreachable env alternative, constant loop-start alias, and empty child-env forwarding helper.
612 src/plugin-state/plugin-blob-store.sqlite.ts READ Blob expiry retains external cleanup metadata and physical quota accounting; SQL kernels preserve distinct live/expired/eviction selections.
610 src/claws/update-apply.ts READ Centralized retained-requirement/rollback partial-failure classification and reused existing digest helper; rollback execution order stays local.
602 src/security/audit-channel.ts READ No sound cleanup: account inspection fallbacks and symbolic DM collision indexing carry distinct policy semantics.
600 src/flows/channel-setup.status.ts READ Replaced status translation switch with exact descriptor map; reused label sanitizer and removed repeated commentary.
596 src/meeting-bot/browser-controller.ts READ Join and recovery differ in tab adoption, identity, deadline, and permission semantics; common browser act/selection helpers already own shared mechanics.
592 src/system-agent/tui-backend.ts READ Reused overview operation owner, merged equivalent gateway/search handoff dispatch and inlined sequence increment; preserved retirement and handoff checks.
583 src/talk/agent-consult-runtime.ts READ Retained session admission, model-lock checks and prepared authority; similarly shaped reads have distinct consistency/routing contracts.
572 src/tts/tts-provider-resolution.ts READ Retained scoped/runtime inventory selection and persona/model precedence; parallel paths preserve distinct prepared-inventory contracts.
571 src/claws/lifecycle-delete-support.ts READ Workspace staged deletion and restore, surviving database ownership and final journal release must retain ordering.
558 src/flows/doctor-health.ts READ Retain preflight, maintenance finish/release, refusal precedence and update-result settlement.
558 src/system-agent/config-redaction.ts READ Dynamic-key/schema distinction, unknown-owner redaction and secret-prefix checks are security contracts; no safe simplification beyond existing shared redaction owners.
557 src/media/media-facts.ts READ Inlined single-use numeric normalization; retained persisted legacy alignment and canonical transcript-byte projection.
554 src/worker/worker-connection.ts READ reconnect, durable replay and heartbeat fencing already have one state owner; no redundant lifecycle path.
542 src/plugin-state/plugin-state-store.sqlite.ts READ Sync SDK, Doctor partial-prefix import and exact-row repair require distinct paths; no safe deletion or transaction consolidation.
542 src/security/audit-plugins-trust.ts READ No sound cleanup: plugin probing intentionally differs from configured tool policy (profile alsoAllow handling); preserve decisions.
524 src/meeting-bot/runtime-facade.ts READ Facade owns requester-session custody and platform hooks; forwarding methods retain its SDK shape and callbacks preserve receiver binding.
505 src/claws/mcp.ts READ Lease-protected MCP ownership, pending replay, independent/shared origins and row timestamps are distinct contracts.
502 src/claws/workspace.ts READ Source attestation, alias guard, replay ownership and status transitions preserved; per-reader schema projections intentionally differ.
499 src/flows/doctor-health-contributions-initial.ts READ Explicit contribution order and distinct repair/diagnostic adapters carry observable health identities.
494 src/flows/doctor-tool-schema-runtime.ts READ Read-only MCP inspection protects requester/OAuth scope, schema diagnostics and complete disposal.
494 src/worker/embedded-agent.runtime.ts READ imported live/transcript client types from their runtime owners instead of redeclaring them.
491 src/media/input-files.ts READ Derives file source union from image source plus filename; retained separate image/file MIME, cancellation and extraction contracts.
488 src/flows/doctor-health-contributions-final.ts READ Explicit contribution order and update phases carry observable health identities; retain.
483 src/talk/realtime-session-harness.ts READ Retained typed/legacy response dedupe and output reentrancy checks; response and audio ownership already centralized.
482 src/claws/cron.ts READ Gateway identity, replay, schedule normalization and uncertain installation states require current owner paths.
478 src/meeting-bot/transcripts-bridge.runtime.ts READ Durable append, summary fencing, replay, subscriber detach, and final-capture retry semantics are distinct; no schema/retention or delivery change justified.
477 src/security/fix.ts READ No sound cleanup: chmod/ACL results differ and repeated fields keep filesystem side effects and error shape explicit.
476 src/system-agent/agent-turn.ts READ Removed redundant embedded-runner/result overlays and casts; inlined trivial CLI-session deletion and removed already-proven else-if check; retained turn authority and transcript continuity.
470 src/security/audit-gateway-config.ts READ No sound cleanup: independent findings encode different auth/exposure decisions and precise remediation text.
458 src/system-agent/setup-inference-detect.ts READ Saved-signin and provider discovery use different lazy resource/cancellation owners; partial detection preserves shipped timeout and preference semantics.
456 src/claws/project.ts READ Project root ambiguity, portable path collisions and generated-package inputs preserve concrete filesystem validation.
455 src/system-agent/inference-route.ts READ Projection intentionally separates authored, prepared and execution config; provider alias and agent-identity comparisons are named ownership contracts.
454 src/plugin-state/plugin-state-store.kernel.ts READ Prepared query caches are connection-owned; expiry ordering, key lookup and typed row codecs already share canonical kernels.
453 src/security/external-content.ts READ No sound cleanup: source-prefix mapping, marker folding, token sanitization, and truncation preserve exact prompt bytes.
447 src/meeting-bot/plugin-entry.ts READ Applied: one Gateway registration owner now handles success/error responses for all actions, preserving validation/ownership order and method names.
444 src/meeting-bot/session-transcript-store.ts READ Separate retained tail and durable stream cursors protect epoch/index/partial-delivery contracts; no sound simplification without changing transcript semantics.
428 src/talk/audio-codec.ts READ Removed unreachable fallback after expectDefined; retained numerical operation order, filter state and byte handling.
426 src/hooks/gmail-watcher.ts READ Process-group cleanup, delayed pipe closure and renewal cancellation have distinct lifecycle obligations; no sound structural removal.
415 src/talk/forced-consult-coordinator.ts READ Removed unread private creation timestamp and merged identical cancelled/delivered result branches.
415 src/worker/inference-stream.runtime.ts READ text/thinking/tool projections have different signatures, state and error strings; no sound common projection beyond current owners.
414 src/tts/openai-compatible-speech-provider.ts READ Inlined single-use extension forwarding helper; retained provider alias/voice/model/config precedence and HTTP cleanup.
412 src/security/audit.deep.runtime.ts READ No sound cleanup: plugin and skill scan findings have different provenance/text; retained bounded reads and scan order.
411 src/tts/tts-settings.ts READ Consolidated preference file, path and auto-mode reading under tts-config; reused provider-map normalization; removed redundant provider normalization.
410 src/meeting-bot/platform-adapter.ts READ Applied: recent-caption and full-transcript rows now use the existing canonical line schema with identical text and optional-field projection.
410 src/talk/provider-types.ts READ Stable SDK and provider protocol shapes; runtime response normalization has meaningful terminal-error distinctions.
410 src/talk/realtime-session-lifecycle.ts READ Reused canonical deferred primitive; retained readiness, timer, abort and connection generation state transitions.
404 src/system-agent/hosted-setup.runtime.ts READ Existing runHostedSetup already owns common write flow; each wizard differs in approval, restart, post-write hooks or memory-copy outcome, and audit contracts stay unchanged.
399 src/talk/session-runtime.ts READ Retained provider-adoption, close/detach and callback fencing; forwards each distinct public bridge operation with its admission invariant.
394 src/claws/doctor.ts READ Health findings have field-specific messages and requirements; live cron corroboration differs intentionally from recorded provenance.
388 src/meeting-bot/status-prejoin-source.ts READ Applied: removed one-use aliases and a function that only returned the supplied page identity source; emitted prelude bytes are unchanged.
388 src/talk/agent-run-control-shared.ts READ Reused canonical object coercion and removed redundant status branch; preserved array-object handling, intent ordering and speech text.
387 src/fleet/doctor.runtime.ts READ reused fleet ownership predicate for both container and network checks.
387 src/system-agent/overview.ts READ Display/default/setup distinctions and normalized roster deduplication are meaningful; overview and startup messages intentionally have different fields and text.
385 src/system-agent/setup-app-recommendations.ts READ Provider token extraction retains per-value pushes to avoid spread-map allocations; catalog detection and recommendation policies have distinct contracts.
371 src/worker/launch-descriptor.ts READ launch schema guards enforce own-key, capability, identity and frame budgets; no redundant admitted-input checks.
370 src/flows/bundled-health-checks.ts READ Public artifact owner trust, readiness phases and isolated plugin-state snapshots are required boundaries.
368 src/talk/client-voice-mutation-digest-owner.ts READ Retained finite retry ownership, generation fencing and durable delivery semantics; no safe simplification worth altering lifecycle.
366 src/claws/provenance-runtime-read.ts READ Staged cache publication, handed-off fact scope and database lifecycle invalidation must retain identity and authority checks.
366 src/system-agent/plugin-artifact.ts READ Archive caps, digest/path checks, retained approval artifacts and installer guards protect different boundaries; no unsafe removal or retention change.
363 src/security/safe-regex.ts READ Applied: single private cache lookup; unreachable missing-value fallback removed; same cached result object.
359 src/shared/text/text-projection.ts READ preserved incremental projection state and duplicate-paragraph/code-region semantics.
357 src/hooks/internal-hooks.ts READ Patch: remove 80 net lines of narrating API/field comments and duplicated examples; preserve dispatcher ordering, snapshots, error isolation and API facts.
355 src/hooks/bundled/session-memory/handler.ts READ Patch: remove 13 lines of narration; preserve transcript capture, provenance reservation and admitted asynchronous memory writes.
355 src/talk/activation-name.ts READ Retained leading/trailing fuzzy-match asymmetry and ordered stripping rules; edge cases express actual speech-admission policy.
353 src/system-agent/rescue-message.ts READ Persisted untrusted operation parser requires exact keys and approval consumption before awaits; capture formatting differs from chat and cannot share blindly.
351 src/hooks/gmail-setup-utils.ts READ Credential/Python/Tailscale resolution has source-specific failure and precedence contracts; no sound structural removal.
351 src/security/audit-extra.summary.ts READ Applied: canonical finding type; inline search forwarding and boolean fetch wrapper; preserve exposure evaluation order.
350 src/worker/worker.runtime.ts READ environment cleanup, admission and post-turn result fencing have distinct settlement contracts; retained.
349 src/meeting-bot/realtime-agent-engine.ts READ STT/TTS flow differs intentionally from bidi in turn closure, echo history, provider buffering, and teardown; no safe duplicate flow to merge.
348 src/meeting-bot/realtime-local-audio-transport.ts READ Applied bug fix: retire already-spawned output and own its delayed spawn error if input spawn throws; output-generation and diagnostic lifecycles unchanged.
346 src/hooks/gmail-ops.ts READ Patch: reuse canonical optional-string normalization for serve path and Tailscale target (6 net lines); preserve config values and command sequencing.
337 src/claws/types.ts READ Public manifest/plan shapes constrain portable subsets; replacing them with host config types would widen contracts.
334 src/fleet/cell-profile.ts READ validation and run/create argument variants already use one canonical builder; public callers/tests retain both wrappers.
334 src/shared/assistant-error-format.ts READ preserved provider error precedence, exact output text and bounded proxy history.
331 src/transcripts/capture-summary.ts READ Summary queue and capture lifetimes use different retained generation and cancellation checks; fallback and stored-note preservation are intentional.
328 src/claws/lifecycle-status.ts READ Reused canonical extension type and prepared package/MCP/cron inventories once for summary projection.
328 src/worker/embedded-agent-live.runtime.ts READ exported live client type for the embedded runtime; preview bounding and terminal/transcript ordering retained.
322 src/worker/node-workspace-protocol.ts READ consolidated exact identifier and namespace schemas with supervisor protocol; command-specific admission and result bounds retained.
321 src/tts/directives.ts READ Merged generic and provider-specific override projection; inlined pass-through config/tag readers; directive grammar and precedence unchanged.
317 src/hooks/gmail.ts READ Patch: reuse canonical positive-finite and optional-string normalization (11 net lines); preserve defaults, positive fractions flooring to zero, and invocation arguments.
317 src/meeting-bot/realtime-engine-support.ts READ Provider selection and lifecycle-event handlers already own cross-engine policy; log helpers preserve established provider/error wording.
316 src/system-agent/chat-engine.ts READ Centralized serialization/rejection recovery of four entry points in enqueueTurn; kept per-action inference checks, history bytes and cancellation behavior.
315 src/meeting-bot/node-invoke-policy.ts READ Applied: status/stop share identical forwarding case; retained all normalization, command override, and safe-generation checks.
312 src/worker/worker-connection-frames.ts READ request descriptors already centralize dispatch; synchronous replay cursor and identity/budget checks remain necessary.
311 src/meeting-bot/output-loopback-verifier.ts READ Waveform generation/fingerprint matching and deadline windows enforce audibility proof; no duplicate mechanism or removable branches found.
311 src/talk/agent-consult-tool.ts READ Stable model-facing tool schemas/prompts and shipped custom-tool validation; no safe structural removal under lane contracts.
308 src/meeting-bot/runtime-facade-types.ts READ Applied: removed redeclared launch/recovery request shapes in favor of canonical chrome-transport-types definitions.
306 src/worker/worker-command.runtime.ts READ standalone descriptor and managed stream have different lifetime/backpressure contracts; no safe merger.
305 src/claws/application-plan.ts READ Extension preflight and portable-package planning expose distinct diagnostics and capability details; keep explicit projections.
301 src/tts/tts-payload.ts READ Removed repeated normalization of already-trimmed speech and replaced payload cast with checked annotation.
299 src/talk/agent-run-control.ts READ Retained exact-run versus legacy-session selection and pre-dispatch authority revalidation; these are distinct authorization contracts.
294 src/transcripts/store-sqlite.ts READ Canonical identity, byte-preserving deduplication and row codecs own persisted format; helper/query paths have live callers.
291 src/claws/package-update.ts READ Claim-and-replace package edge and rollback ownership preserved; local key helper avoids importing the heavier planner graph.
291 src/meeting-bot/browser-session-control.ts READ Distinct URL/session/retained-leave ownership checks and reserved close deadlines protect user tabs; no redundant cleanup path.
291 src/shared/pid-alive.ts READ preserved distinct platform birth/liveness probes and their failure/timeout contracts.
290 src/plugin-state/plugin-blob-store.ts READ Unified register and registerIfAbsent preparation into prepareWrite; removed redundant PreparedBlob type and field reconstruction.
290 src/plugin-state/plugin-state-store.retention.ts READ Transaction-local retention counts, clock rollback handling and eviction ordering are substantive, not redundant validation.
289 src/system-agent/assistant-prompts.ts READ Planner and tool-loop prompts serve separate live entry points; preserved all model-facing strings, JSON parser and history bounds.
288 src/media/media-probe.ts READ Reuses canonical optional lowercase normalization; retained codec selection, descriptor fallback and probe budgets.
288 src/shared/config-eval.ts READ Retained the existing eligibility owner and explicit ordered checks; binary cache freshness and awaited authority remain unchanged.
287 src/media/media-reference.ts READ URI and local-path resolution deliberately differ in malformed input and containment handling; retained public adapters.
286 src/meeting-bot/realtime-output-owner.ts READ Output queue settlement and provider-response ownership are separate invariants; retained active-write invalidation and bounded stale-id semantics.
284 src/media/local-media-access.ts READ Policy/open/read checks enforce different admission and post-await authority boundaries; no safe simplification.
279 src/tts/tts-synthesis.ts READ Synthesis, persistence and channel transcode owners already separate; retained failure metadata and channel compatibility boundaries.
278 src/shared/usage-aggregates.ts READ existing accounting owner is canonical; distinct cost/latency/model buckets retain semantics.
276 src/claws/lifecycle-config-removal.ts READ Deletion journal claim, expected install snapshot, monitor quiescence and config commit are deliberately separate owner phases.
276 src/media/read-capability.ts READ Removed boolean return ceremony; retained sender policy, explicit sandbox precedence and remote workspace exclusion.
276 src/transcripts/store-sqlite-read.ts READ Compound selectors, raw digest and summary snapshots have distinct SQL snapshot/projection contracts; retained existing owner queries.
271 src/meeting-bot/runtime-probes.ts READ Speech audibility and caption-progress probes have intentionally different timing/verification contracts; no useful shared polling abstraction.
271 src/shared/device-bootstrap-profile.ts READ Retained bootstrap normalization and closed purpose/scope profiles; no security or SDK policy changes.
270 src/meeting-bot/page-script-source.ts READ Leave/transcript generated scripts retain ownership markers and finalized-buffer behavior; superficially similar audio retirement has different pending-source rules.
268 src/media/store.read-scope.ts READ Retained file/directory identity, settlement and ownership checks at each awaited mutation; no safe simplification.
267 src/meeting-bot/plugin-config.ts READ Applied: removed redundant positive-number normalization before the canonical positive timer resolver; keys/defaults/provider precedence unchanged.
267 src/shared/dot-path.ts READ preserved parser provenance, JSON5 escapes, error text and unsafe-key checks.
266 src/meeting-bot/browser-audio-capture-source.ts READ Current-session and media-source revalidation after device awaits/render callbacks prevent mic leakage; no removable guards or duplicate owner.
265 src/worker/worker-rpc-live-event-client.ts READ preview degradation, terminal resync and generation checks are distinct state transitions; retained.
262 src/claws/mcp-update.ts READ Config mutation uncertainty and sibling owner revalidation require distinct add/change/remove compensation.
262 src/meeting-bot/agent-consult.ts READ Applied: rejected tool calls share one result/event path and direct canonical tool resolver replaces forwarding helper; cancellation checks remain.
260 src/system-agent/assistant.ts READ Cut over configured-planner tests to public planSystemAgentCommand and removed redundant forwarding entry point; retained frozen route and cleanup revalidation.
260 src/system-agent/system-agent.ts READ CLI one-shot, JSON and TUI paths retain separate ownership and authority checks; plugin registry lease correctly wraps only import, not conversation.
259 src/plugin-state/plugin-state-worker-client.ts READ Operation adapters carry host-only authority, absence results and observation checks; preserved separation from serialized inputs.
254 src/fleet/registry.kernel.ts READ registry transaction/lease/schema admission semantics are protected; no sound behavior-identical reduction.
253 src/talk/talk-session-controller.ts READ Turn lifecycle and output state already share canonical emit/finish paths; retained stale-turn checks and observer isolation.
252 src/hooks/update.ts READ Update staging retains current lifecycle authority and paired record/payload compensation; preserve all outcomes and error text.
252 src/plugin-state/plugin-store-validation.ts READ JSON structure, realm prototypes, sparse arrays and byte limits are public input boundaries; no validation removal is behavior-identical.
252 src/shared/store-writer-queue.ts READ preserved FIFO, reentrancy, cancellation, async context and per-turn fairness owner.
248 src/hooks/discovery.ts READ Discovery boundaries and null-versus-empty semantics select executable ownership; no sound removal beyond narration.
246 src/meeting-bot/audio-backend.ts READ Applied: audio command format imports its SoX owner type; backend selection and source/sink creation probes retained.
246 src/talk/realtime-voice-lazy-lifecycle.ts READ Retained bridge-generation disposal, reentrant close ownership and final-transcript drain; shared lifecycle already owns admission.
244 src/shared/tailscale-status.ts READ discovery and adoption intentionally differ; preserve SDK compatibility and route ownership checks.
241 src/system-agent/setup-inference-auth-options.ts READ Guided/manual/install sorting differs by metadata priority and feature visibility; collapsing it would change provider-selection order.
241 src/system-agent/setup-model-selection.ts READ Default versus explicit-agent and utility versus primary selections preserve distinct shipped config semantics; updater already owns shared mutation.
239 src/claws/openclaw-profile.ts READ Published legacy pointer and dynamic-profile migrations have named compatibility contracts; safety loader remains explicit.
236 src/meeting-bot/plugin-shell.ts READ Shell constructs platform-owned registration defaults and lazy CLI boundary; public helper/type surface has real three-platform consumers.
236 src/security/dm-policy-shared.ts READ No sound cleanup: deprecated adapters retain named public plugin SDK ingress migration contracts.
236 src/worker/node-supervisor-protocol.ts READ consolidated exact identifier and namespace schemas with workspace protocol; operation errors and receipt bounds unchanged.
235 src/media/channel-inbound-roots.ts READ Trusted installed and bundled artifact discovery have distinct failure/authority contracts; preserved lazy snapshot owner.
235 src/system-agent/setup-inference-transition.ts READ Rollback detects concurrent changes and separates credential/config publication; preserved schema, durability, recovery and queued-application semantics.
235 src/talk/agent-talkback-runtime.ts READ Retained queue weight/count bounds, metadata-identity coalescing and serial drain; local abort classification differs from general helper contract.
235 src/worker/worker-connection-admission.ts READ admission generation, retryability and socket-close ordering are necessary; retained.
232 src/system-agent/setup-inference-credential-access.ts READ Credential revision, mutation token, snapshot CAS and rollback prove different ownership states; no guard removed.
231 src/flows/channel-setup.prompts.ts READ Retained distinct command-owner consent, multi-account removal and DM policy prompts with unchanged text and sequencing.
231 src/flows/doctor-health-contribution-runners.state.ts READ Retain migration ordering, durable config dependencies and plugin metadata invalidation.
230 src/meeting-bot/session-durable-transcripts.ts READ Policy transition, stop retry token, and stream cursor advancement protect disabled-period/finalization semantics; no safe collapse.
230 src/worker/transcript-message.ts READ closed projections preserve field omission, diagnostic redaction and authoritative replay budgets; no safe broad clone replacement.
229 src/claws/project-build.ts READ Deterministic tar selection, input attestation and atomic artifact publication require separate verification stages.
229 src/shared/text/tool-call-shaped-text.ts READ Retained bounded candidate parsing, diagnostic classification precedence and exact visible-text decisions.
227 src/meeting-bot/session-cleanup-tracker.ts READ Setup custody, coalesced stopping, browser settlement, and retryable partial cleanup are distinct required lifecycle states.
227 src/plugin-state/plugin-state-store.journal.ts READ Sequence allocation, cursor eviction fallback and oldest-row protection preserve append order and exact persisted JSON.
227 src/shared/worker-bundle-archive.ts READ preserved archive path/size/hash checks and extraction verification.
223 src/shared/async-work-scope.ts READ preserved current-owner/ancestry carriers, tracked cancellation and settlement order.
221 src/transcripts/library.ts READ Public pagination, legacy projections and bounded exports preserve different result contracts and streaming cleanup.
220 src/talk/provider-internal.ts READ Retained private symbol adapter and explicit public-field projection; forwarding functions enforce distinct host/plugin boundaries.
220 src/tts/tts-streaming-resources.ts READ Retained provider-context capture, cancellation-before-join and dual-error projection; stream cleanup ordering cannot be flattened safely.
218 src/shared/chat-message-content.ts READ preserved phased text selection, mutable-signature cache and original transcript source text.
217 src/media/local-roots.ts READ Removed unused private preferred-temp override and options type; retained session-safe canonical root filtering.
217 src/worker/worker-rpc-inference-client.ts READ resume/event cursor and settlement branches protect distinct reconnect behavior; retained.
216 src/plugin-state/plugin-state-store.types.ts READ Public sync/async compatibility contracts and error provenance are intentional; no dead exports or needless local type copies.
214 src/claws/cron-update.ts READ Readiness, live scheduler comparison, uncertain mutations and rollback keep required operation order.
213 src/meeting-bot/realtime-node-audio-transport.ts READ Generation-capable and shipped legacy node-output paths have named compatibility behavior; input/stop/output error handling differ intentionally.
213 src/talk/turn-context-tracker.ts READ Retained turn ownership marks and distinct closed/audio/ignored-context retention; mutations make superficially repeated pruning necessary.
213 src/tts/voice-models.ts READ Replaced local lowercase normalization with canonical helper; preserved alias matching and same-provider model fallback ordering.
212 src/tts/tts-core.ts READ Retained lazy completion runtime and shipped dependency-injection signature; prepared-model lifetime and timeout layers differ intentionally.
211 src/fleet/registry.ts READ noncreating readers and scoped worker writes deliberately have distinct admission and cleanup contracts; retained.
211 src/transcripts/status.ts READ Metadata/runtime availability merging and exact-versus-uncertain capture matching preserve visible status and disclosure rules.
211 src/transcripts/store-sqlite-write.ts READ Session origin, exact revision compare, summary replacement and manifest updates retain distinct transaction guards and persisted bytes.
210 src/media/audio-transcode.ts READ Opus and macOS container conversions have distinct limits/output/errors; shared subprocess and temp owners already used.
209 src/tts/tts-config.ts READ Consolidated prefs path/read/legacy auto mode and removed per-layer forwarding helpers; kept merge order and original machine-read timing.
204 src/talk/client-voice-session-store.ts READ Retained SQLite schema, parsing and native query error ordering; persistent-store scope has no sound behavior-only restructuring.
203 src/system-agent/inference-fallback.ts READ Per-model expansion differs from provider-wide failure retirement and credential-owner deduplication; preserved request-first ordering and failure text.
203 src/transcripts/summary-model.ts READ Bounded head/tail prompt construction and utility/primary fallback preserve model-facing instructions and cancellation custody.
201 src/transcripts/provider-types.ts READ Public provider/source/action/result contracts have SDK and plugin importers; no removable types or behavioral wrappers.

@clawsweeper

clawsweeper Bot commented Sep 25, 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.

@github-actions

github-actions Bot commented Sep 25, 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: 937072f80eb584a7a883602e32cd4a7b51bd00e8
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/security/audit-extra.summary.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.
  • src/security/audit-extra.sync.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.
  • src/security/audit.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.
  • src/security/install-policy.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.
  • src/security/safe-regex.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 25, 2026, 9:51 AM ET / 13:51 UTC (Revision 6).

ClawSweeper review

What this changes

The branch consolidates duplicated setup and runtime code and stops an abandoned meeting-audio output process when input startup fails.

Merge readiness

⛔ Blocked before merge - 5 items remain

This PR contains a useful meeting-audio fix that is absent from current main. I found no discrete introduced defect, but the required published-updater compatibility proof for changed Claw and fleet lifecycle paths remains unrecorded.

Priority: P2
Reviewed head: 937072f80eb584a7a883602e32cd4a7b51bd00e8

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The refactor has substantial validation and no identified code finding, while the required existing-installation upgrade proof remains a merge gap.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The maintainer-authored PR is exempt from the external-contributor real-setup gate. Its injected-process fixtures and Testbox results support the changed audio path, but they do not supply the separate published-updater compatibility result; no stored-data model 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 real-setup gate. Its injected-process fixtures and Testbox results support the changed audio path, but they do not supply the separate published-updater compatibility result; no stored-data model change was identified.
Evidence reviewed 9 items Current main still has the audio startup failure path: Current main starts the output process and then starts the input process without handling a synchronous input-spawn failure.
Introduced audio cleanup: The pinned PR adds a catch that attaches a delayed-error listener, terminates the output process, and rethrows the original input error.
Audio regression coverage: The changed fixture injects an input-spawn exception and checks both output termination and handling of a delayed output error; this review did not execute the fixture.
Findings None None.
Security None None.

How this fits together

OpenClaw setup and runtime services turn configuration and requests into managed resources, responses, and diagnostics. The changed meeting-audio path starts local processes and must clean them up when startup fails.

flowchart LR
A[Configuration and requests] --> B[Setup and runtime services]
B --> C{Ownership and safety checks}
C --> D[Claw and fleet resources]
C --> E[Meeting audio processes]
D --> F[Responses and diagnostics]
E --> F
Loading

Before merge

  • Resolve merge risk (P1) - Existing Claw or fleet installations could encounter an upgrade or rollback difference in the changed lifecycle paths; no published-updater-to-candidate result using representative retained state is recorded.
  • Complete next step (P2) - Record a published-updater-to-candidate upgrade and rollback result using representative existing Claw and fleet state before merge.
  • 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: database schema: src/claws/add.ts, migration/backfill/repair: src/flows/doctor-startup-channel-maintenance.ts, unknown-data-model-change: src/flows/doctor-startup-channel-maintenance.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #157965
Summary: The open linked issue describes this cleanup and the meeting-audio startup failure; this PR is its candidate implementation.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Record the published upgrade cell (recommended)
    Run a published updater against representative existing Claw and fleet state, record candidate behavior and rollback, and add the result to the PR body.

Technical review

Best possible solution:

Preserve the existing lifecycle and ownership checks, then record a published OpenClaw updater upgrading and rolling back representative installed Claw and fleet state before landing.

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

Yes. Current main starts meeting-audio output before input and has no cleanup if input construction throws; the PR adds an injected-process regression, which this read-only review did not run.

Is this the best way to solve the issue?

Yes for the focused audio cleanup and reuse of existing owners. The lifecycle changes still need the repository-required published-updater compatibility result.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a useful runtime cleanup with a bounded meeting-audio failure fix, without evidence of an urgent widespread regression.
  • merge-risk: 🚨 compatibility: Claw update and fleet lifecycle paths change without the repository-required published-updater proof using existing operator state.
  • 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 real-setup gate. Its injected-process fixtures and Testbox results support the changed audio path, but they do not supply the separate published-updater compatibility result; no stored-data model change was identified.

Evidence

What I checked:

  • Current main still has the audio startup failure path: Current main starts the output process and then starts the input process without handling a synchronous input-spawn failure. (src/meeting-bot/realtime-local-audio-transport.ts:109, f65afe9abb4d)
  • Introduced audio cleanup: The pinned PR adds a catch that attaches a delayed-error listener, terminates the output process, and rethrows the original input error. (src/meeting-bot/realtime-local-audio-transport.ts:115, 937072f80eb5)
  • Audio regression coverage: The changed fixture injects an input-spawn exception and checks both output termination and handling of a delayed output error; this review did not execute the fixture. (src/meeting-bot/realtime-local-audio-transport.test.ts:103, 937072f80eb5)
  • Changed lifecycle and ownership paths: Claw update failures now use a shared partial-mutation classifier; fleet operations use a shared predicate that still compares tenant and owner labels. (src/claws/update-apply.ts:390, 937072f80eb5)
  • Repository update proof contract: The applicable repository policy requires a published-driver-to-candidate proof cell for changes touching update or service lifecycle behavior. (AGENTS.md:83, 937072f80eb5)
  • Captured PR body identity: The full live PR body hashes to the supplied captured-body SHA-256. Its evidence lists Testbox runs and CI, but no published-updater run with representative existing Claw and fleet state or rollback result. (937072f80eb5)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: 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.

  • Record the published-updater-to-candidate upgrade and rollback result for representative existing Claw and fleet state.

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 (5 earlier review cycles)
  • reviewed 2026-09-25T06:50:55.246Z sha fc0f4db522aa06ae3ce42a76bf780d86278a1058 :: blocked before merge. :: none
  • reviewed 2026-09-25T07:23:28.098Z sha 9005a67 :: blocked before merge. :: none
  • reviewed 2026-09-25T08:08:17.556Z sha 1393606 :: blocked before merge. :: none
  • reviewed 2026-09-25T09:06:01.042Z sha 1393606 :: blocked before merge. :: none
  • reviewed 2026-09-25T13:24:39.971Z sha 937072f :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 25, 2026
Consolidate equivalent internal flows and reuse canonical types across the supporting runtime subsystems, preserving security, lifecycle, storage, and SDK contracts.

Fix meeting audio partial startup cleanup so an input spawn failure terminates abandoned output and handles delayed output errors without replacing the original failure.
@steipete steipete changed the title refactor(runtime): deslop supporting runtime subsystems refactor(runtime): deslop core subsystems Sep 25, 2026
@steipete
steipete merged commit 297c2b3 into main Sep 25, 2026
239 of 240 checks passed
@steipete
steipete deleted the deslop/l43-src-misc branch September 25, 2026 13:59
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* refactor(runtime): deslop supporting runtime subsystems

Consolidate equivalent internal flows and reuse canonical types across the supporting runtime subsystems, preserving security, lifecycle, storage, and SDK contracts.

Fix meeting audio partial startup cleanup so an input spawn failure terminates abandoned output and handles delayed output errors without replacing the original failure.

* refactor(runtime): deslop core subsystems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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.

Supporting runtime cleanup and partial meeting-audio startup failure

1 participant