Skip to content

refactor(runtime): deslop error handling and normalization - #165601

Merged
steipete merged 4 commits into
mainfrom
deslop/l387-error-normalize-rest-20261005
Oct 5, 2026
Merged

steipete merged 4 commits into
mainfrom
deslop/l387-error-normalize-rest-20261005

Conversation

@steipete

@steipete steipete commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Runtime consumers repeat error conversion, normalization, and validation already owned by their producers, and several private forwarding layers obscure the actual operation.

User Impact

The cleanup preserves public config, SDK and protocol shapes, diagnostics, error codes, cleanup, and authority checks. A memory-corpus fix correctly identifies cron-generated lineage through cycles. The expired June 2026 suspension-reason repair is retired under the July-and-later migration policy; July+ schema migrations remain intact.

Why This Change Was Made

This is one accumulated runtime cleanup batch. It removes 595 net production lines (109 production files), plus 38 net test lines. It is below the campaign's 1,000-line target after a complete largest-first sweep; the attached coverage records every one of the lane's 883 production files over 200 lines, including peer-owned paths left unchanged. No code moved to another tree.

Simplifications and ownership rationale
  • ACP consumers use options validated by the manager and metadata already normalized by the session store; native error codes retain their owner.
  • Claw installation inlines its sole legacy-resume adapter, reuses the existing agent lookup, and removes an install-record reader injection whose only implementation is the canonical database reader.
  • State execution settles its pending marker in its own cleanup path; private path identities describe the two states their producer actually emits; migration versions share their existing table families.
  • State profile listing consumes its canonical snapshot directly, and heartbeat renewal forwards the original promise without an await-only wrapper. Existing test assertions follow the canonical profile reader.
  • Tool-schema normalization and its cache share one prepared option set. Provider adapters reuse text already sanitized by their shared tool-result owner.
  • SDK events consume the Gateway client's validated envelope; event classification and error formatting avoid normalizing the same field twice.
  • Secret assignment uses its existing value predicate directly instead of throwing, catching, and converting the same validation failure. Redaction matchers share one policy-tagging path.
  • Media and TTS consumers reuse normalized IDs, prompts, MIME types and provider maps. Configured header layers merge in one pass with the same precedence and assignment semantics.
  • Skills consumers retain their command-name/origin normalization owner. Workshop removes a leftover catch/rethrow after its old Result wrapper was retired and a catch around a helper already returning false for all read failures.
  • MCP, routing, pairing, model-catalog, system-agent, trajectory, and transcript consumers reuse their producer's prepared fields instead of projecting or normalizing them again.
  • Doctor/TUI remove private import/callback forwarding and duplicate guards while retaining failure reporting, cleanup and lazy imports. Canvas uses the shared nonblank-string reader; transcript placement uses its schema as the validation owner. Wizard drops a second clone of an unexposed private staged config.

Fixes found along the way

Cron lineage traversal cached a false answer for a cycle member before another parent established the cycle's cron ancestry. Positive lineage now propagates through the edges actually traversed, preserving existing duplicate-row selection. The existing session corpus boundary test now covers a cycle with a pruned cron parent.

Evidence

  • Round-1 candidate: 2a7e1fb53a5aae27a844c03bf73b5e30d6915424, rebased without conflicts onto 3117493fe6ab64de6e04c7418bcb13e55f947b56.
  • Same-host comparison: Claws fails identically in all 3 main and 3 candidate runs. Restored-requester passes 3+3 runs with 8 CPUs, then reproduces the same three admission failures in every 3+3 run under CI's Node 24.19 / 2-CPU resource profile. SSH passes its original five-file cohort on both sides, all 3+3 focused repetitions, and an additional constrained-main probe. Full source identities, commands, timings, and every failed-job attribution are recorded in the final landing evidence.
  • Runtime import cycles: 0 on main and candidate. Madge cycles: 0 on main and candidate.
  • Current candidate focused proof: 7 files / 145 tests passed in 245.9 seconds, including the state-execution and Doctor cases.
  • Earlier broad Linux coverage: 145 files, 2,757 tests passed / 6 skipped. That is prior-base evidence; the current-head proof is listed above.
  • The memory-corpus regression fails on the original collector because cycle-b is absent. Previous single-worker session-files.test.ts proof: 708.85 s wall time including cold preparation, 456.75 s Vitest duration. Its 35 cases also pass in the current focused run.
  • Fresh independent review: one alleged P1 rejected with the unchanged buffering predicate and early-return proof documented in the landing-evidence comment; no accepted P0/P1 finding remains.
  • CI-BLOCKED: exact-head run 37343803462 completed with 164 successful, 42 skipped, 1 neutral, and 7 failed checks (six test jobs plus their aggregate gate). Claws and restored-requester have comparable main A/B failures; current-main run 37349110851 independently matches Incognito, ACP, Git-status and membership failures. The hosted SSH upload GatewaySessionFactsChangedDuringReadError remains unattributed despite passing replays. Auto-merge stays disabled; no merge was attempted. Full check-changed is not claimed complete.

Coverage log

Complete size-sorted READ inventory (883 files): part 1, part 2, part 3. The inventory preserves original sweep sizes and identifies the one additional file that crossed 200 lines during the earlier rebase. Protected recovery and staging files remain untouched.

@clawsweeper

clawsweeper Bot commented Oct 5, 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.

@steipete

steipete commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author
l387 production coverage, part 1/3 — all entries READ

l387 error/normalization coverage

Candidate: 6cdc95aa2f775fa438f1c46c4bf2c0125b7bb0e0; refreshed base: 6881d252b2890e67ef8df6ecc574e4d61b8d00bd. Read-only inventory covers every production file over 200 lines in the lane, including peer-owned files kept unchanged. Sizes reflect the initial sweep so removed lines do not erase coverage; ir-spans.ts is the one additional file that crossed 200 lines during the rebase. Test suites/support, fixtures, and generated code are excluded. All 883 entries are fully read; preservation reasons name the boundary that prevents a sound removal.

Lines File Outcome
1836 src/tui/tui.ts READ: Removed redundant status-timeout guard, keybinding wrappers, refresh await/catch wrapper and Ctrl-C branch; retained ownership and cleanup fences.
1808 packages/tool-call-repair/src/stream-normalizer.ts READ: KEEP bounded repair, protected text, authoritative snapshots and failure cleanup each own distinct state
1629 src/logging/redact.ts READ: CHANGE: one policy-tagging path for linear and regex matchers; remove repeated mode normalization
1596 packages/ai/src/providers/openai-chatgpt-responses.ts READ: KEEP timeout, replay, transport fallback and refusal catches record distinct outcomes; Codex behavior left untouched
1484 packages/markdown-core/src/ir.ts READ: Parser and render state preserve list/table/style source coordinates; public option defaults and malformed-token guards are meaningful.
1447 packages/agent-core/src/agent-loop.ts READ: KEEP admission failures, lifecycle settlement and tool errors map distinct recorded outcomes
1415 src/tui/embedded-backend.ts READ: Retain queue admission, lifecycle error grace, history projection and recorded terminal outcomes; apparent catches own real fallback or cleanup.
1308 src/wizard/i18n/locales/en.ts READ: KEEP: translation table contains externally visible setup/help/failure strings and interpolation keys, with no executable error handling or normalization to simplify.
1295 packages/gateway-client/src/client.ts READ: Peer PR #165340 owns file; read fully and preserve transport policy, credential settlement and compatibility contracts.
1278 src/secrets/runtime-state.ts READ: KEEP: rollback mutation lineage and last-known-good credentials preserve independent owners and atomic snapshot restoration
1257 src/wizard/i18n/locales/zh-TW.ts READ: KEEP: Traditional Chinese translation table contains byte-sensitive visible setup/help/failure strings and interpolation keys, not redundant executable handling.
1257 src/security/audit.ts READ: CHANGE: recursive visitor validates each nested value once instead of checking at caller and callee
1255 src/wizard/i18n/locales/zh-CN.ts READ: KEEP: Simplified Chinese translation table contains byte-sensitive visible setup/help/failure strings and interpolation keys, not redundant executable handling.
1249 src/flows/model-picker.ts READ: Canonical model and provider normalizers now run once per boundary; retained catalog priority/auth/runtime boundaries.
1206 src/interactive/payload.ts READ: Removed duplicate trim before hasReplyContent; retain public option and normalization/security boundaries.
1165 packages/gateway-protocol/src/schema/agents-models-skills.ts READ: Canonical agent/model/skill wire declarations and generated-client types; unions distinguish public operations and outcomes.
1145 src/trajectory/export.ts READ: KEEP: transcript identity reconciliation, redaction and branch warnings each preserve distinct export contracts
1089 src/media/web-media.ts READ: KEEP: catches translate access errors or restrict HTML trust; repeated MIME checks guard different byte and extension evidence
1077 src/security/audit-extra.sync.ts READ: CHANGE: consume normalized nonempty node command values directly; Set owns deduplication after one normalization
1067 src/status/status-message.ts READ: Removed nested string normalization; status formats and fallback/runtime identity decisions retained.
1062 packages/agent-core/src/harness/compaction/compaction.ts READ: KEEP persisted input validation and separate retention/output budgets
1058 src/tui/tui-command-handlers.ts READ: Removed duplicate empty activation validation; canonical normalizer preserves usage text; retained incarnation and send-settlement fences.
1058 src/snapshot/local-repository.ts READ: KEEP: inode checks, pending-marker commit/recovery and aggregated cleanup failures preserve ownership, durable publication and cleanup-error precedence
1058 src/node-host/invoke-system-run.ts READ: No edit: open peer PR #165225 owns this file; preserved overlap boundary.
1053 src/logging/diagnostic.ts READ: KEEP: catches record recovery outcomes; heartbeat/recovery ownership is outside cleanup scope
1023 src/wizard/setup.finalize.ts READ: Retain service result mapping, operator recovery text, lazy preparation and temporary gateway cleanup.
979 src/flows/doctor-core-checks.ts READ: Retain distinct registered check findings, lazy imports, runtime detection and dry-run repair outcomes.
956 src/flows/channel-setup.ts READ: Retain setup navigation rollback, plugin lease/cache scope, post-write receipts and recorded status warnings.
947 src/media-understanding/runner.entries.ts READ: APPLIED: merge headers in one assignment-preserving pass; inline one-use CLI predicates
945 src/system-agent/verified-inference.ts READ: KEEP: credential/artifact rechecks protect live authority; caught lookup failures deliberately invalidate verified bindings
930 src/secrets/configure.ts READ: KEEP: user-entry validation and post-prompt parsers preserve distinct messages and trust boundaries
922 src/media-understanding/runner.ts READ: APPLIED: configured image selection owns normalized ID; trim primary and fallback image references once
911 src/logging/diagnostic-stability-bundle.ts READ: CHANGE: inline sole-call bundle-path helper and consume the already normalized reason; raw-bundle validation and failure/retention catches remain intact
885 packages/memory-host-sdk/src/host/session-files.ts READ: Archive and SQLite paths retain separate authority, redaction, observer, yielding, and read-failure contracts.
879 packages/ai/src/providers/mistral.ts READ: KEEP SDK streaming identity, terminal admission and failure cleanup; schema conversion failures intentionally omit invalid tools
872 packages/llm-core/src/types.ts READ: KEEP exported provider/wire contracts and runtime-context security projections
851 src/secrets/apply.ts READ: KEEP: plan admission, multi-store commit ownership and best-effort rollback preserve original failure and user data
833 packages/gateway-protocol/src/schema/sessions.ts READ: Canonical session lifecycle, file, group and usage wire contracts; optional and null fields carry distinct public semantics.
821 packages/gateway-protocol/src/schema/plugins.ts READ: Canonical plugin consent, discovery, install and UI wire contracts; named variants support native code generation.
804 src/secrets/runtime-web-tools.ts READ: KEEP: catches classify structural versus retryable failures and record cold/stale owner outcomes; provider discovery preserves lazy boundaries
801 src/fleet/backup.runtime.ts READ: KEEP: archive catches preserve lease-loss, extraction-limit and partial-restore outcomes; repeated profile/path checks fence destructive steps
800 src/logging/diagnostic-stability.ts READ: CHANGE: remove private exporter upsert source guard already guaranteed by its sole caller; retain admission, state lookup, key fallbacks and update behavior
785 src/logging/diagnostic-support-export.ts READ: KEEP: raw config/log/snapshot inputs need separate sanitization; catches record failed artifacts and enforce update-capture boundaries
784 src/state/openclaw-state-db-cache.ts READ: Retained: catches preserve independent native cleanup and terminal admission failures
773 src/fleet/service.runtime.ts READ: KEEP: reservation fencing, rollback outcomes, runtime unavailability and health-gated rollback are substantive
773 packages/agent-core/src/agent.ts READ: CHANGED validated continuation uses the existing prompt runner with no duplicate wrapper
758 src/system-agent/operations-execution-helpers.ts READ: KEEP: catches retain audit outcomes and cross-store secret-write recovery; rechecks protect authority after awaited work
757 src/state/openclaw-agent-db.ts READ: Retained: open failure branches preserve native handle, lease, validation and registry custody
756 src/tui/gateway-chat.ts READ: Retain shipped protocol fallback catches, reconnect fencing and startup history retries.
755 src/tui/tui-event-handlers.ts READ: Active peer PR #165225; no edits. Retain session/run projection and final-failure precedence.
754 src/process/command-queue.ts READ: Timeout catches retain late failures; queue callbacks record diagnostics and preserve generation/priority ownership.
753 src/process/supervisor/adapters/child.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
753 packages/gateway-client/src/session-projection.ts READ: Durable/live/pending identity reconciliation and terminal recovery encode distinct persistence and ordering contracts.
752 src/secrets/resolve.ts READ: KEEP: provider/ref error mapping, timeout diagnosis and single-flight caches own real contracts
752 src/media/store.ts READ: KEEP: retries recover pruned directories; catches preserve size/access mappings and best-effort pruning
749 src/process/supervisor/service-child-relay-host.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
747 packages/worker-runtime/src/worker-task-pool-core.ts READ: Worker catches settle task outcomes or retain native/input custody; duplicate input admission guards preserve public error precedence across run and owned APIs.
746 src/state/openclaw-agent-db-lifecycle.ts READ: Retained: disposal, eviction and worker shutdown record distinct cleanup and clean-close outcomes
746 src/skills/runtime/refresh.ts READ: Watcher cleanup, authority rechecks, and availability outcomes must be retained.
746 packages/gateway-protocol/src/schema/cron.ts READ: Canonical scheduler input/result contracts distinguish report-only state from writable patches; no redundant runtime error layer.
744 src/proxy-capture/runtime-owner.ts READ: KEEP: deferred errors, retained admissions and promise observers preserve capture settlement and finalization ownership
743 src/state/user-profile-list.ts READ: Retained: catalog publication and repeated admission checks guard asynchronous identity changes
743 src/state/openclaw-agent-db-lease.ts READ: Retained: preflight and mutation revalidate current lease ownership and physical file generations
743 src/node-host/node-worker-launch-store.kernel.ts READ: Journal validation and replay checks enforce transaction admission, process identity, and durable cleanup authority.
736 src/talk/client-voice-session.ts READ: KEEP: durable transcript reservation/append/confirmation, run binding and mutation digest retry preserve separate commit, authority and transport-close boundaries.
735 src/process/exec-runner.ts READ: Error mapping retains process cleanup and output metadata; timeout exit-code projection is distinct from exit resolution.
735 src/fleet/containers.runtime.ts READ: KEEP: repeated profile validation surrounds secret staging; catches sanitize external command failures
734 src/process/supervisor/supervisor.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
733 src/transcripts/store-read.ts READ: KEEP: cursor parsing and byte checks guard externally supplied selectors, raw SQLite materialization and final projections separately
733 src/node-host/invoke.ts READ: No edit: open peer PR #165225 owns this file; preserved overlap boundary.
733 packages/ai/src/transports/openai-responses-stream-internal.ts READ: KEEP terminal call validation and distinct failure draining; provider event normalization remains boundary-owned
732 src/system-agent/setup-inference-turn.ts READ: APPLIED: consume the already-trimmed agent run text projection; preserve probe and authority catches
732 packages/gateway-protocol/src/schema/channels.ts READ: Talk and channel boundary schemas own event correlation constraints and distinct transport shapes; no post-owner renormalization.
728 src/transcripts/auto-start.ts READ: KEEP: lifecycle state and catches preserve retry ownership, occupancy transitions and exact-session cleanup
728 src/acp/translator.prompt-stream.ts READ: Prompt admission, cancellation, retry and recovery catches retain recorded outcomes and cleanup ownership.
727 src/talk/client-voice-confirmation.ts READ: KEEP: challenge expiry/supersession and observed persisted utterance fencing prevent stale or detached spoken grants from authorizing different actions.
726 src/context-engine/registry.ts READ: KEEP: fallback quarantine, factory failure cleanup, and finally joins each preserve distinct lifecycle or recorded-outcome contracts.
725 packages/ai/src/transports/anthropic-payload-policy.ts READ: KEEP cache marker allocation and server-compaction policy operate on raw provider payloads
724 src/state/openclaw-agent-execution.ts READ: Simplified: direct runExisting try/finally and joined close finalization replace swallowed sibling promises
724 src/node-host/node-worker-workspace.ts READ: Workspace custody, retention fencing, and transfer/reset checks guard different awaited boundaries; no redundant failure mapping.
724 src/daemon/inspect.ts READ: Inspection catches preserve partial inventory diagnostics and native cleanup failures.
723 src/state/openclaw-database-preflight.ts READ: Retained: state and agent failures become distinct readiness outcomes and cleanup errors remain recorded
721 src/state/openclaw-state-worker-owner.ts READ: Retained: retirement catches transfer physical cleanup custody and distinguish actor versus client failure
721 src/skills/loading/skill-root-discovery.ts READ: Directory error outcomes and bounded containment discovery remain owner responsibilities.
720 src/daemon/schtasks-control.ts READ: Launch fallback probes, disabled-policy restoration and restart facts are observable lifecycle outcomes.
718 src/meeting-bot/session-runtime.ts READ: Lifecycle catches roll back retained tabs, record pending cleanup and preserve transcript retirement; remaining forwarding awaits are semantically simple.
718 src/fleet/service-support.runtime.ts READ: KEEP: raw config/container inspection validation, generation ownership and post-await lease checkpoints remain separate boundaries
717 src/state/openclaw-agent-execution-native.ts READ: Retained: opening/registration catches aggregate independent native cleanup; repeated identity checks fence awaited admission and committed receipts.
714 src/skills/security/scanner.ts READ: Read failure classifiers retain missing-file versus unsafe-file behavior; cache validates identities.
713 src/node-host/node-worker-supervisor.ts READ: Catches settle admission, cancellation, and shutdown outcomes; status rereads protect changing ownership.
711 packages/memory-host-sdk/src/host/query-expansion.ts READ: Language stop-word data and Korean/CJK tokenization own distinct grammar; normalized text already passes once.
709 src/process/gateway-work-admission.ts READ: Root leases preserve detached lifetime, restart/suspend fencing, and observer errors; no redundant catch.
707 src/process/spawn-broker/host.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
707 src/daemon/schtasks-process.ts READ: Native process ownership, graceful stop, settlement and cleanup paths need retained error handling.
707 packages/model-catalog-core/src/model-catalog-normalize.ts READ: KEEP raw public catalog normalization; row API can be called independently of raw catalog parser
707 packages/markdown-core/src/reasoning-tag-parser.ts READ: Streaming partial tags and Markdown source ownership preserve private reasoning boundaries; recovery modes are used.
706 src/node-host/node-worker-child-lifecycle.ts READ: Spawn, turn, and cleanup catches retain observed outcomes and physical ownership across awaits.
705 src/tui/tui-session-actions.ts READ: Retain canonical selection and incarnation checks across awaits, history fallback and recorded failure results.
704 src/process/supervisor/service-child-group-anchor.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
703 src/secrets/egress-proxy/proxy-server.ts READ: Authentication/target catches record refusals; repeated activity and host checks fence revocation at egress; stream cleanup and per-grant TLS ownership are required.
703 src/logging/logger.ts READ: KEEP: input redaction and native logger transport isolation preserve log/output behavior
702 src/transcripts/capture.ts READ: APPLIED: configured lifecycle consumes its already-trimmed resolved account ID
701 src/wizard/setup.ts READ: KEEP: onboarding orchestration preserves consent/config merge bases, import recovery, staged model verification and irreversible prompt checkpoints; catches record actionable recovery outcomes.
700 src/media/fetch.ts READ: KEEP: catch layers separately own HTTP, transfer, retry and size errors; normalization preserves raw header output
699 src/state/openclaw-state-read.worker.ts READ: Retained: dispatch maps dynamic read commands to their owners and records source admission plus native-cleanup failures.
699 src/llm/providers/stream-wrappers/openai.ts READ: Provider-specific payload and code-mode authority adapters preserve shipped provider contracts; catches and filters retained.
698 src/flows/doctor-health.ts READ: Retain maintenance refusal mapping, warning ordering, cause propagation to finish and result persistence in finally.
697 src/media/parse-output.ts READ: KEEP: URI catches reject invalid media; normalization strips syntax in stages and is not idempotent for nested file/prefix spellings
695 packages/sdk/src/client.ts READ: Public namespace wrappers retain promise rejection behavior; event-pump catches settle streams and cleanup.
692 src/claws/packages.ts READ: Read canonical preflight, ownership rechecks, uncertain outcomes, and compensating uninstall; each catch maps codes or retains rollback evidence.
689 src/secrets/audit.ts READ: CHANGE: remove finding-push forwarder; keep provider failure attribution, pinpoint retry diagnostics and exact report contents
689 src/claws/lifecycle.ts READ: Flattened workspace inspection into two valid outcomes with a required action; removed impossible missing-action fallback.
687 src/meeting-bot/realtime-engine.ts READ: Cleanup aggregates transport failures and retries unfinished disposal; provider error catches emit required logs/events and preserve output ownership.
687 src/daemon/systemd-service-files.ts READ: Native manager parsing, fallback diagnostics, and ownership refusals are distinct boundaries.
686 src/hooks/install.ts READ: Package policy scans, path containment, transaction forwarding and failure text are distinct install boundaries.
686 src/acp/control-plane/manager.core.ts READ: Public manager validates input before queuing; actor, abort and persistence boundaries are required.
686 packages/ai/src/transports/openai-responses-websocket.ts READ: KEEP all catches preserve dispatch ambiguity, degraded state or iterator cleanup
685 src/node-host/node-worker-transfer-client.ts READ: Consolidated TLS failure construction; retained download, integrity, cleanup, and contextual transfer failures.
684 src/snapshot/git-backup-codec.ts READ: KEEP: identity/schema/value validation, stream cleanup and restore integrity protect publication boundary
684 packages/gateway-client/src/protocol-client.ts READ: CHANGE: consume admitted event sequence without repeat type validation; all socket authority and failure cleanup retained.
683 packages/gateway-protocol/src/public-schema.ts READ: Explicit public schema export surface is a compatibility boundary; removing forwarding exports would change public API.
682 src/node-host/runtime.ts READ: No edit: open peer PR #165225 owns this file; preserved overlap boundary.
682 src/logging/diagnostic-run-activity.ts READ: KEEP: session activity stores raw refs, so trimmed comparisons remain necessary; repeated provenance and generation guards preserve owner fencing and recovery cutoffs
681 src/system-agent/operations-execute.ts READ: KEEP: operation branches own distinct lazy imports, approval gates and byte-identical CLI output
679 src/system-agent/setup-inference-credentials.ts READ: KEEP: separate staging inputs require role/model checks; catches record cancelled or unavailable login outcomes; persisted credentials are reread after writing
679 src/claws/lifecycle-state.ts READ: Read planned removal and apply path; failure mappings retain partial outcomes and removal authority, with monitor/cron closure untouched.
678 src/state/user-model-accounts.ts READ: Retained: private credential schema validation occurs at reads and updates with different ownership
678 src/flows/search-setup.ts READ: Retain credential ownership, provider re-resolution across prompts and persisted-disabled-state restoration.
676 src/daemon/schtasks-install.ts READ: Installer catches preserve original process ownership, rollback artifacts and activation outcomes.
673 src/claws/update-capability-changes.ts READ: Read full capability projection; heartbeat capability comparison is concurrent heartbeat-lane closure, left untouched.
672 src/flows/doctor-health-contribution-runners.config.ts READ: Retain staged config commit receipts, write refusals, recovery authority and post-write cleanup.
672 src/claws/update-plan.ts READ: Read agent/workspace/package/MCP/cron diffs; revalidation observes live state and drives distinct manual-action diagnostics.
671 src/daemon/schtasks-runtime.ts READ: Observation-versus-control fallback and timeout diagnostics have distinct failure contracts.
669 packages/ai/src/transports/openai-responses-client.ts READ: KEEP WebSocket fallback, response admission and compaction lifecycle errors have distinct recorded outcomes
666 src/meeting-bot/node-host.ts READ: Node RPC parsing is an external boundary; catches stop partial process startup, distinguish stale output generations and preserve original failure.
665 src/video-generation/dashscope-compatible.ts READ: Polling/download catches cancel and release guarded bodies; schema normalization accepts external provider input.
664 src/claws/package-remove.ts READ: Read cleanup plan and lease-bound removal; catches preserve uncertainty, claim repair, partial results, and runtime stop boundaries.
664 packages/ai/src/transports/openai-responses-continuation.ts READ: KEEP normalized replay identities and connection ownership differ from raw payload equality
662 src/state/openclaw-state-db-async-lifecycle.ts READ: Retained: resource phases and failed-close seals preserve drainage order and prohibit reused authority
662 src/claws/schema.ts READ: Read full schemas; refinements still run after earlier non-fatal failures, so repeated case/trim checks preserve diagnostic multiplicity.
662 packages/ai/src/transports/openai-completions-stream.ts READ: KEEP raw compatible provider deltas, stream ordering and authoritative tool terminal checks
660 src/daemon/schtasks-layout.ts READ: Strict command parsing redacts native failure details and retains selector/currentness checks.
659 src/mcp/channel-bridge.ts READ: SIMPLIFIED: trust Gateway-normalized Errors and toConversation fields; remove redundant channel normalization and cursor forwarding method.
658 src/state/openclaw-state-db-maintenance.ts READ: Simplified: repeated missing-table map expressed as three version families and one supported-version tuple
655 src/meeting-bot/status-call-source.ts READ: DOM/device inputs and mutable page globals need normalization; catches retain route diagnostics, retryability and ownership rollback.
652 src/node-host/mcp.ts READ: No edit: open peer PR #165225 owns this file; preserved overlap boundary.
651 src/tui/components/chat-log.ts READ: Retain pruning side-map retirement, immutable pending/live user identities and frozen assistant segment ownership.
650 src/state/openclaw-state-lease.ts READ: Retained: catch layers distinguish acquisition, renewal, drainage, authority loss and failed heartbeat cleanup; all outcomes remain observable.
650 src/meeting-bot/chrome-transport.ts READ: Local/node startup catches dispose owned transports and roll back tabs; RPC result parsing and route capability decisions remain necessary.
650 packages/agent-core/src/types.ts READ: KEEP public agent contracts; no runtime error normalization to remove
647 src/transcripts/store.ts READ: KEEP: export checks cover disk ownership before writer admission; catches distinguish missing directories and preserve artifact recovery
647 src/media-generation/runtime-shared.ts READ: APPLIED: consume already-trimmed primary-model owner output
645 src/plugin-state/plugin-state-store.ts READ: KEEP: public sync compatibility, worker authority and import prefix settlement remain live contracts
645 src/media/playback-transcode.ts READ: KEEP: catches preserve best-effort cache/probe fallback, permit release, authority checks, staged-file cleanup and transcode outcome logging
644 src/logging/diagnostic-support-redaction.ts READ: KEEP: layered redaction policies and bounded traversal protect distinct output forms
642 src/flows/doctor-health-contributions.ts READ: Removed four pure import forwarding wrappers; retained lazy imports, ordered registration and recorded failure outcomes.
641 src/state/openclaw-agent-db-schema.ts READ: Retained: transactional ownership rechecks protect migrations; schema-1 remains a July contract (v2026.7.35) and later migrations stay required.
641 src/boards/sqlite-board-store.ts READ: KEEP: native, worker, and incognito actor branches preserve distinct admission/custody and commit-publication contracts.
640 src/canvas/widget-tool.ts READ: KEEP: validation occurs at different authored, composed, and pinned-document boundaries with distinct byte budgets and error text.
639 src/wizard/clack-navigation-prompts.ts READ: KEEP: prompt-specific renderers preserve exact ANSI, guide/footer row counts, cursor and submit/cancel behavior; shared autocomplete/footer rendering is already centralized.
638 src/secrets/runtime.ts READ: KEEP: lazy boundaries and compare-and-activate refresh retries protect live snapshot ownership
638 src/proxy-capture/runtime.ts READ: KEEP: catches convert synchronous diagnostic failures while async paths retain rejection and finalization ownership; URL redaction needs per-component checks
637 src/system-agent/setup-inference-activate.ts READ: KEEP: nested catches redact secrets and preserve cancellation/error classes; repeated route checks fence asynchronous persistence and recovery boundaries
637 src/system-agent/chat-turn-router.ts READ: KEEP: inference checks fence approval and awaited wizard boundaries; executor catch records visible operation failures and preserves inference-loss identity
633 src/wizard/setup.migration-import.ts READ: KEEP: advisory discovery failures, consent, source/target snapshot checks, staged apply and promotion recovery each own different import safety outcomes.
632 src/wizard/session.ts READ: Retain answer validation, durable cancellation boundary and terminal outcome settlement.
632 src/system-agent/chat-wizard-host.ts READ: KEEP: catches preserve successful setup despite audit failure; answer validation protects stale steps and typed client input; callback boundaries retain wizard authority
632 src/state/openclaw-state-db-readonly.ts READ: Retained: snapshot cleanup errors and read-phase mappings enforce independent lifecycle boundaries
630 src/claws/add.ts READ: Inlined the sole legacy-resume helper, reusing the already resolved agent and direct comparison instead of injected comparison and repeated lookup.
623 packages/ai/src/transports/anthropic-messages.ts READ: CHANGED reuse sanitized extracted tool text; preserve empty/media/error fallback strings
618 src/logging/redact-json.ts READ: KEEP: decoded/serialized passes and projected edits preserve escape boundaries and prevent source projections restoring independently masked text
617 src/state/openclaw-state-read.types.ts READ: Retained: discriminated request/result unions encode registered transport contracts and separate source-admission/native-cleanup receipts.
617 src/skills/loading/workspace-skill-loader.ts READ: Preparation rechecks source versions and current library authority across awaited host reads.
616 src/system-agent/greeting.ts READ: APPLIED: normalize successful planner modelRef once and reuse for cache writes; KEEP adjacent catches because facts-hash computation between them currently propagates errors and combining/reordering would change failure behavior
616 src/status/status-text.ts READ: Retain best-effort usage/runtime health and selected/active model identity contracts; no redundant failure conversions.
615 src/system-agent/setup-apply.ts READ: KEEP: route/config revalidation protects distinct persistence boundaries; post-write catches record partial outcomes
615 src/logging/redact-linear-matchers.ts READ: KEEP: bounded scanners replace quadratic/stack-overflow regexes; per-call caches and regex-pool finally cleanup protect reentrant matching semantics
615 src/daemon/systemd-scope.ts READ: Discovery failures and ownership refusals differ; unavailable manager cannot imply absence.
614 src/state/agent-deletion-journal.ts READ: Retained: journal parsing and canonical path fences protect deletion/recreation authority; runtime unknown-history and maintenance failures differ.
613 src/daemon/launchd-runtime.ts READ: Native output parsing, launch teardown retries and disabled-policy compensation must remain.
613 src/acp/control-plane/manager.turn-runner.ts READ: Failure accounting, backend retries, terminal publication and authority fencing are behavior contracts.
612 src/claws/export.ts READ: Read export and portable projection; normalization handles authored config and catches preserve diagnostics or remove owned output.
609 packages/ai/src/transports/openai-responses-replay-messages-internal.ts READ: CHANGED reuse sanitized tool text instead of sanitizing the owner result again
609 packages/ai/src/transports/anthropic-stream-reducer.ts READ: KEEP terminal admission, refusal and fallback recovery preserve distinct stream outcomes
608 src/process/supervisor/service-child-windows-job-anchor.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
607 src/media-understanding/shared.ts READ: READ ONLY: peer PR #165340 owns file; deadlines, retry classification and guarded transport catches preserve error mapping and release ownership
604 src/state/openclaw-agent-execution-incognito.ts READ: Retained: catches preserve ephemeral actor loss, unpublished-open cleanup and request-bound authority; native and actor namespaces remain distinct.
601 src/talk/agent-consult-runtime.ts READ: KEEP: post-await model/session admission, lineage inheritance and terminal-outcome mapping prevent consults from bypassing lifecycle or model locks.
599 src/skills/lifecycle/install.ts READ: Recipe failures become recorded install outcomes; readiness paths have distinct prerequisites.
599 src/realtime-transcription/websocket-session.ts READ: KEEP: catches own provider readiness, generation fencing, reconnect accounting, and diagnostic callback isolation.
599 src/memory-host-sdk/dreaming.ts READ: Public plugin config coercion, phase defaults and physical workspace grouping remain required at input boundaries.
598 src/node-host/node-worker-bundle-installer.ts READ: Retry classification, archive integrity, retained receipt validation, rollback, and final failure mapping are distinct contracts.
598 src/hooks/message-hook-mappers.ts READ: Explicit hook projections preserve field omission, media staging and reply/trace ownership; no safe collapse.
597 packages/gateway-protocol/src/validator-registry.ts READ: Lazy validator registrations bind named public schemas; numeric precheck runs before schema validation and needs unknown-input guards.
596 src/claws/update-apply.ts READ: Read staged update orchestration; catch layers identify phase, durable partial state, and ordered compensation.
594 src/secrets/runtime-owner-assignments.ts READ: KEEP: catches attribute strict failures and preserve atomic assignment/degradation outcomes
594 src/flows/doctor-core-checks.runtime.ts READ: Retain separate catalog hook validation findings for hostile getters, enumeration and malformed plugin results.
593 src/state/openclaw-state-db.ts READ: Retained: opener, transaction and deferred-publication catches preserve corruption retirement, retry eligibility and post-COMMIT outcome identity.
593 src/skills/runtime/remote.ts READ: Probe backoff, connection ownership and per-node recorded failures have runtime contracts.
593 src/daemon/runtime-paths.ts READ: Runtime probes deliberately distinguish unsupported binaries from inaccessible probes.
591 packages/tool-call-repair/src/payload.ts READ: KEEP structural scanner distinguishes prefixes, complete calls and over-limit repair candidates
590 src/daemon/systemd-install.ts READ: Publication and restore handlers retain generated environment and manager ownership.
587 src/state/openclaw-agent-execution.worker.ts READ: Retained: private admission facts, transaction/commit grants and failed-open cleanup are distinct; lazy operation registry remains dynamically consumed.
586 src/security/audit-channel.ts READ: KEEP: plugin account catches record per-account diagnostics; owner-missing catch emits findings and preserves sibling auditing.
585 src/skills/lifecycle/clawhub-install-core.ts READ: Install catch maps remote errors once and finally owns archive cleanup.
585 src/claws/migrate.ts READ: Read full migration preview/apply; source and owner rechecks bind consent across filesystem/config changes.
583 src/system-agent/setup-inference-core.ts READ: APPLIED: inline one-use failover reason mapping without changing statuses
583 src/status/summary.ts READ: Retain scoped static-model cache, status projection and heartbeat peer closure.
579 src/state/openclaw-quarantine-store.ts READ: Retained: intentional best-effort metadata reads and explicit cleanup outcomes protect quarantine semantics
579 src/node-host/runner.ts READ: Credential routing and shutdown catches preserve endpoint authority and observable failure reporting.
578 src/pairing/setup-code.ts READ: KEEP: URL and auth checks own public decoder, remote/LAN selection, cleartext downgrade, and bootstrap security contracts.
578 packages/gateway-protocol/src/schema/audit-activity.ts READ: Canonical metadata-only audit variants enforce cross-field terminal invariants and generated-client constraints.
577 src/state/user-profile-github-identity.ts READ: Retained: input and stored identity validation protect separate trust boundaries
576 src/tts/tts-synthesis-support.ts READ: KEEP: cleanup aggregation and attempt outcomes preserve failed-projection and provider fallback contracts
574 src/plugin-state/plugin-blob-store.sqlite.ts READ: KEEP: read catches distinguish pristine missing tables from corruption; quota/expiry paths protect cleanup metadata and transaction rollback.
574 packages/memory-host-sdk/src/host/session-transcript-corpus.ts READ: CHANGE: retain first-selected lineage edges and propagate cron ancestry through visited cycles; removes redundant false-cache/resolving states.
570 src/system-agent/operations-parse.ts READ: APPLIED: consume anchored nonwhitespace ID/model/plugin captures directly and inline one-use plugin spec prefixing; quoted path and free-text normalization retained
567 src/daemon/systemd-definition-mutation.ts READ: Cross-process locks, artifact identities and rollback errors protect service publication.
566 src/state/openclaw-state-lease-heartbeat.ts READ: Simplified: renewal result is unused; input accepts its real result while retaining existing failure tracking
565 src/snapshot/git-backup.ts READ: CHANGE: inline one-use resolveGitCommit into materializeGitBackupRef, preserving awaited requireGit arguments and normalization; all cleanup/error mapping remains
564 src/logging/redact-patterns.ts READ: KEEP: differing assignment grammars encode prose/source-code exceptions; programmatic matchers preserve credential and public-URL distinctions with linear scans
563 src/claws/lifecycle-delete-support.ts READ: Read removal support; staged-file restore, missing-versus-unsafe outcomes, and monitor/cron closure retained.
561 packages/ai/src/transports/openai-completions-params.ts READ: KEEP direct and managed payload differences, final-payload token budget and strict tool conversion
561 packages/ai/src/providers/agent-tools-parameter-schema.ts READ: CHANGED cache lookup and schema cleaning share one normalized option snapshot
560 packages/gateway-client/src/session-subscriptions.ts READ: Swallow-and-recheck waits settle previous lease owners; approval downgrade/recovery must retain wire ownership.
558 src/secrets/runtime-config-collectors-core.ts READ: KEEP: collector ownership/digest policy differs per capability; raw-input shape checks remain needed
556 src/system-agent/tui-backend.ts READ: KEEP: queue catch prevents poisoning; respond records error outcomes and clears stale handoffs; disposal preserves authoritative inference failure
556 packages/terminal-core/src/table.ts READ: ANSI style/link closure and weighted wrapping preserve terminal output; width guards protect caller options.
556 packages/sdk/src/run-event-replay.ts READ: Recovery catches record unavailable outcomes; epoch and revision checks prevent stale reconnect publication.
555 src/process/spawn-broker/resource-server.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
555 src/claws/reader.ts READ: Removed repeated slash normalization for workspace sources already transformed by the successful manifest schema parse.
554 src/state/openclaw-agent-db-registry-listing.ts READ: Retained: live registry witnesses and physical aliases require revalidation after asynchronous reads
553 src/media-understanding/image.ts READ: READ ONLY: peer PR #165340 owns file; runtime lease, cancellation, regional auth and reasoning-only retry boundaries retained
553 src/acp/event-ledger.ts READ: Prepared statement cache and bounded ledger retention have distinct storage responsibilities.
553 packages/markdown-core/src/reasoning-tags.ts READ: Incremental parser retains code ownership, pending tag/backtick state and bounded reparsing; no redundant error mapping or safe state removal found.
553 packages/gateway-protocol/src/connect-error-details.ts READ: CHANGE: reuse normalized code and message instead of repeated normalization; preserve all public failure text.
552 src/security/audit-extra.async.ts READ: KEEP: timeout catches preserve distinct timeout findings; default-agent failure continues known-store auditing; path normalization accepts raw config.
552 src/proxy-capture/store.kernel.ts READ: KEEP: native query failure ownership and legacy SDK storage branches are distinct; blob cleanup preserves recorded trim and ordering semantics
550 src/system-agent/config-redaction.ts READ: KEEP: layered dynamic-owner, schema and secret-path checks guard distinct redaction cases
550 src/media-understanding/attachments.cache.ts READ: KEEP: path checks cover raw path and canonical descriptor identity; catches own alias fallback and staged-file cleanup
550 packages/gateway-protocol/src/schema/worker-admission.ts READ: Build-bound worker admission and lifecycle wire declarations retain epoch, identity and terminal-outcome constraints.
549 src/process/spawn-broker/worker.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
548 src/secrets/channel-secret-basic-runtime.ts READ: KEEP: public SDK helpers retain unknown-valued channel contracts; root/account inheritance encodes separate activation and ownership policies
547 src/state/openclaw-state-worker-error-identity.ts READ: Retained: closed error identity codec validates transport fields and preserves subtype-specific codes
545 src/state/user-profiles-internal.ts READ: Retained: native row validation and avatar canonicalization handle stored rather than schema-normalized objects
545 packages/agent-core/src/harness/env/kill-tree.ts READ: KEEP process-instance authority, cross-platform cleanup and bounded escalation
544 src/security/install-policy.ts READ: KEEP: outer absolute-path rejection bypasses configurable error redaction; routing it through assertSecureCommandPath changes literal failure text under custom redactPatterns or registered secret matches.
543 src/state/openclaw-state-read-operation.ts READ: Retained: producer and cleanup errors settle separately without replay or lost cleanup
541 src/state/agent-database-startup.ts READ: Retained: inspection failures become persistent degraded outcomes and cleanup releases queued publication; source witnesses prevent stale preparation.
541 src/boards/sqlite-board-codec.ts READ: KEEP: persisted-manifest parsing validates authority and content ownership; legacy grant downgrades are named security boundaries.
540 src/context-engine/types.ts READ: KEEP: public plugin contract and lifecycle documentation; no removable runtime normalization.
539 packages/gateway-protocol/src/schema/logs-chat.ts READ: Canonical chat schemas and unknown-input error projection; trimming/bounds are required at public projection boundary.
537 src/claws/provenance.ts READ: Removed obsolete reader-injection wrappers, reused agentOwnedPaths, and specialized schema-upgrade type and required replacement to its actual caller.
535 packages/memory-host-sdk/src/host/memory-schema-storage-migration.ts READ: Schema conversion owns authority renewal, unknown-dependent refusal, regeneration debt and FK restoration; catches/finally preserve storage outcomes.
535 packages/ai/src/transports/transport-stream-shared.ts READ: KEEP error projection, callback cancellation, transport abort codes and schema admission owners
533 src/state/openclaw-state-read-request.ts READ: Retained: per-command capture drops unowned fields and byte accounting preserves existing payload admission; generic clone/JSON sizing changes behavior.
530 src/skills/workshop/apply-transition.ts READ: State changes and lifecycle notifications depend on recorded commit/rollback outcomes.
529 src/secrets/target-registry-query.ts READ: KEEP: compiled/discovered registry paths preserve dynamic plugin consumers and lazy fallback
529 src/logging/diagnostic-stuck-session-recovery.runtime.ts READ: KEEP: post-await authority rechecks, terminal-outcome guards, cleanup and recorded failed/skipped outcomes fence destructive recovery
528 src/tui/tui-formatters.ts READ: Delegated repeated array checks and trims to canonical local extraction/composition owners.
528 src/skills/workshop/store.ts READ: Catches recover authoritative commit outcomes before discarding filesystem generations.
527 src/worker/worker-connection.ts READ: Reconnect catches map admission and terminal outcomes; retry loops are durable-owner replay contracts.
527 src/flows/doctor-health-contributions-initial.ts READ: Retain registered check identities, lazy imports and legacy repair owner boundaries.
525 src/logging/subsystem.ts READ: KEEP: console/file formatting and redaction paths intentionally differ; catches preserve message output when metadata serialization or runtime inspection fails
525 src/daemon/launchd-service-files.ts READ: Captures filesystem identity for install rollback and keeps secret environment separate.
523 src/meeting-bot/participation.ts READ: Repeated current-source checks fence awaited side effects; catch paths record rejection/uncertainty and preserve durable replay claims.
522 src/state/user-profile-writes.worker.ts READ: Retained: worker transaction receipts and typed failure results are observable outcomes
521 src/media/media-facts.ts READ: KEEP: legacy media migration and staged proof preserve positional arrays; all runtime and persisted shape boundaries remain required
520 packages/ai/src/transports/openai-completions-transport.ts READ: CHANGED remove stopReason assignment repeated after shared error projector
517 src/secrets/egress-proxy/proxy-forward.ts READ: CHANGE: Removed unreachable length > MAX_BUFFERED_REQUEST_BODY_BYTES disjunct after !buffered returns; buffered proves upper bound. Retained !releaseBudget capacity refusal and all output/security/cleanup handling.
516 src/tts/tts-provider-resolution.ts READ: APPLIED: reuse raw provider map and normalize speaker fields only at the provider-output boundary
516 src/skills/lifecycle/clawhub-status.ts READ: CHANGE: use registry normalized by origin parser rather than normalize again.
516 src/boards/sqlite-board-store.kernel.ts READ: KEEP: row/manifest validation, transaction boundaries, batch writes, and post-commit publication remain distinct responsibilities.
514 src/state/openclaw-agent-worker-store.ts READ: Retained: publication, command and cleanup errors settle separately without making committed writes replayable; current checks retain captured executor ownership.
510 packages/ai/src/transports/openai-transport-shared.ts READ: KEEP raw response model attestations, reasoning ordering and authoritative usage projection
509 src/tui/tui-plugin-approvals.ts READ: Retain double-confirmation, expiry and stale approval reconciliation with visible outcome.
508 src/process/supervisor/service-child-windows-job-native.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
507 src/state/openclaw-agent-db-admission.ts READ: Retained: generator catch/throw paths unwind refused opens, retain original authority failures and join coalesced callers independently.
501 src/meeting-bot/runtime-facade.ts READ: KEEP: peer cleanup #165349 touched this file within the overlap window; readiness diagnostics and cleanup outcomes remain with that owner.
501 src/meeting-bot/browser-controller.ts READ: Browser RPC and navigation boundaries require parsing; catches map manual actions and bounded retry notes while keeping ownership semantics.
499 src/routing/resolve-route.ts READ: SIMPLIFIED: reuse normalized agent ID and canonical main-session key instead of normalizing each a second time.
498 src/web-search/runtime.ts READ: Credential-aware selection retries only after async source admission; removing catch/reselect changes ordering.
497 src/skills/runtime/resources.ts READ: Context wrappers add skill/root diagnostics; finally cleanup and authority checks retained.
497 src/daemon/service-definition-backup.ts READ: Receipt checkpoints and exact artifact comparisons preserve transactional repair outcomes.
496 src/wizard/setup.migration-stage.ts READ: Removed duplicate clone of locally owned stagedConfig; retained source isolation, commit reconciliation and rollback journal.
496 src/security/audit-plugins-trust.ts READ: CHANGE: consume normalized allow/deny using Set directly and build entryById from Object.entries; owner already trims/lowercases/filter empties, preserving Map own-key lookup.
496 src/meeting-bot/transcripts-bridge.runtime.ts READ: Catches persist/notify delivery outcomes, retry final capture and preserve shutdown cleanup; log-and-rethrow cannot be removed while preserving required log bytes.
495 src/proxy-capture/proxy-server.ts READ: KEEP: transport failures map to distinct exact HTTP responses and capture records; shutdown aggregates all failures after release
495 packages/memory-host-sdk/src/host/internal.ts READ: Missing-file handling, scan error context, source discovery and multimodal content fencing are distinct owners.
493 src/plugin-state/plugin-state-store.sqlite.ts READ: KEEP: catches attach operation-specific failure codes; import prefix settlement and Doctor corrupt-row visibility preserve durable outcomes
493 packages/ai/src/providers/google-interactions-shared.ts READ: CHANGED remove unreachable empty stopReason default; retain error guard and exact error text
491 src/state/openclaw-state-db-read-connection.ts READ: Retained: unavailable reads are returned only after admission/native snapshot cleanup; retirement errors retain retryable reader custody.
488 src/flows/channel-setup.status.ts READ: Unified duplicate sanitized label helper; preserve pre-sanitization whitespace handling and status failure outcomes.
485 src/wizard/setup.migration-promotion.ts READ: KEEP: durable phase journal, empty-target restoration and filesystem alias checks distinguish missing, rollback-safe and indeterminate published states.
484 src/state/openclaw-state-read-worker.ts READ: Retained: retained-operation state permits servicing and cleanup after result settlement; per-source sealing and native retirement cannot be collapsed.
484 packages/net-policy/src/redact-sensitive-url.ts READ: Bounded nested decoding and fallback catches are security boundaries; no unsafe normalization removal.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: XL labels Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 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: 2a7e1fb53a5aae27a844c03bf73b5e30d6915424
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/logging/redact.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/pairing/pairing-store-sqlite.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/pairing/pairing-store.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/secrets/audit.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/egress-proxy/proxy-forward.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/provider-env-vars.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/runtime-shared.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • 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-plugins-trust.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.

Carefully review these changes before merging.

@steipete

steipete commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author
l387 production coverage, part 2/3 — all entries READ
Lines File Outcome
483 src/state/openclaw-state-lease-worker-owner.ts READ: Retained: uncertain settlement and current lease authority require all existing error layers
481 src/node-host/node-worker-container-engine.ts READ: Engine identity revalidation and container cleanup failures enforce physical ownership; diagnostics differ by boundary.
481 packages/gateway-protocol/src/schema/openclaw.ts READ: Canonical setup/chat wire contracts preserve owner-recorded failure dispositions and wizard handoff semantics.
480 src/model-picker/apply-session-model-selection.ts READ: Revalidation fences awaited catalog work and authoritative session writes; error-to-outcome mappings retained.
479 src/node-host/connection.ts READ: Publication retries distinguish unsupported, rejected, transient, and retired connection outcomes.
477 src/state/openclaw-agent-db-session-migrations.ts READ: Simplified: removed single-use parser/type alias and repeated persisted chat/origin normalization
475 src/tui/tui-session-run-coordinator.ts READ: Retain run generation, gap recovery, terminal persistence barriers and bounded observation maps.
475 src/talk/realtime-session-harness.ts READ: Retain typed/legacy terminal fences, output flush generation and request owner liveness.
475 packages/gateway-protocol/src/schema/session-placement.ts READ: Discriminated placement schemas encode lifecycle ownership and cross-field move authority; shared property owners already consolidate repetition.
473 src/flows/doctor-tool-schema-runtime.ts READ: Retain auth/liveness scoped MCP inspection, failure memoization and separately recorded cleanup outcomes.
473 src/acp/server.ts READ: Startup stream limits, Gateway failure reporting and shutdown catches own cleanup or recorded outcomes.
471 src/node-host/node-worker-workspace-processes.ts READ: Accepted process cleanup and uncertain extinction remain separate from startup/result reporting.
470 src/security/audit-gateway-config.ts READ: KEEP: origin resolver returns authored raw arrays, so audit normalization is required; credential-plan and resolved-auth checks cover separate source states.
470 src/decisions/provider-host.ts READ: KEEP: catches sanitize provider contracts while preserving authority aborts and accurately recording health outcomes.
470 src/claws/cron.ts READ: Read complete gateway/provenance adapter; recorded uncertain outcomes, schema/wire transforms, and cron closure retained.
469 src/process/exec-spawn.ts READ: Scope catches retain custody and settle admitted subprocesses; shell guard is exported plugin SDK contract.
469 src/daemon/service-types.ts READ: Shared lifecycle contracts have real cross-platform callers and sanitization boundaries.
468 packages/ai/src/providers/anthropic.ts READ: KEEP refusal buffering, compaction rejection and request-wide thinking normalization
466 src/skills/library/store.ts READ: Profile authorization, schema admission and persisted query projections remain canonical owners.
463 src/acp/runtime/session-meta-doctor.ts READ: Doctor warnings and identity-checked migration backups cannot be removed without changing recovery.
462 src/daemon/launchd-lifecycle.ts READ: Failure wrapper adds restore state and operator recovery guidance rather than merely rethrowing.
461 src/skills/lifecycle/clawhub-store.ts READ: Origin parsing, lockfile diagnostics and atomic tracking rollback own external state.
460 packages/ai/src/transports/anthropic-transport-stream.ts READ: KEEP open peer PR #165340 owns this file; read-only coverage
459 src/flows/doctor-health-contributions-final.ts READ: Retain ordered registrations, heartbeat peer closure and distinct health findings.
457 src/skills/library/bundle.ts READ: Manifest validation, fsync handling and collision cleanup own artifact integrity.
456 packages/ai/src/transports/openai-responses-debug.ts READ: KEEP redacted failure projection and bounded diagnostic traversal
454 src/system-agent/setup-inference-detect.ts READ: KEEP: catches record partial detection and unavailable plugin candidates; discovered model identities remain validated
454 src/claws/workspace.ts READ: Read bounded source/write and provenance paths; nested catches preserve created-file receipts and pending ownership after failed compensation.
453 src/storage/locations.ts READ: KEEP: error conversion redacts provider credentials; cleanup preserves release failures, marker identity, and caller refusal.
453 src/skills/runtime/refresh-watch-registry.ts READ: Watcher generations and source scope own freshness and recovery; no safe error-layer removal.
453 packages/gateway-protocol/src/schema/users.ts READ: Canonical profile, account and authentication wire schemas; shared GitHub result variants already reuse their owner.
452 src/daemon/service.ts READ: Service mutation guards own runtime pins, future config and native lifecycle authority.
451 src/system-agent/inference-route.ts READ: KEEP: projections preserve distinct authored/runtime/credential identity; source/model map normalization handles raw config aliases
450 src/logging/logger-file-transport.ts READ: KEEP: swallowed append/flush failures isolate logging from application failure; generations, activeIndex and sync rescue prevent duplicate writes at exit
449 src/llm/providers/stream-wrappers/anthropic-family-tool-payload-compat.ts READ: Input getters/JSON projection catches isolate optional provider fields and required-tool failures.
447 src/state/openclaw-state-db-legacy-backfills.ts READ: Simplified: removed expired v2026.6.34 suspension-reason backfill; July+ result migrations retained
446 src/state/user-channel-identities.ts READ: Retained: schema parsing protects persisted grant/identity boundaries; policy publication rotates authority and stale unlink checks preserve the linked owner.
444 src/skills/loading/skill-root-loader.ts READ: Discovery freshness depends on watcher/link provenance and must fail closed.
443 src/tui/tui-task-suggestions.ts READ: Retain action capability recheck, separate hidden/resolving lifetimes and snapshot revision fencing.
443 src/state/openclaw-state-worker-error.ts READ: Retained: graph validation is a transport boundary; hydration preserves cyclic and shared error causes
442 src/skills/loading/workspace-skill-sync.runtime.ts READ: Synchronization failures prevent publishing cache manifests; file authority checks surround awaits.
440 packages/agent-core/src/agent-stream-response.ts READ: KEEP tool settlement, error aborts and live steering authority
438 packages/ai/src/providers/clean-for-gemini.ts READ: KEEP bounded schema walk and Gemini-specific nullable/reference contracts
435 src/pairing/pairing-store.ts READ: SIMPLIFIED: SQLite admission already guarantees nonempty trimmed codes and timestamps; reuse those fields for pending requests.
434 src/skills/discovery/status.ts READ: Distinct eligibility and install option projections; no redundant error conversion.
433 src/system-agent/agent-turn.ts READ: APPLIED: consume the already-trimmed agent run text projection
432 packages/retry/src/index.ts READ: Peer PR #165340 owns file; toRetryError duplicate identified but skipped; abort/race/retry catches retain outcomes.
432 packages/llm-core/src/validation.ts READ: KEEP schema-gated coercion, local reference scope and nullable recovery distinctions
431 src/daemon/service-audit.ts READ: Audit catches preserve diagnostic outcomes and platform-specific ownership.
430 src/secrets/runtime-web-tools.shared.ts READ: KEEP: credential selection, inactive warnings and partial fallback materialization are distinct contracts
429 src/talk/audio-codec.ts READ: Retain streaming phase/filter state and measured precomputed/interior sample paths; numerical order is observable.
429 src/state/openclaw-agent-execution-operations.ts READ: Retained: lazy handlers adapt distinct owner signatures and grant exact transaction commits; transcript error wrapper supplies a named failure category.
429 src/logging/redact-pattern-runtime.ts READ: KEEP: regex rewriting preserves exact atom/Unicode semantics; lastIndex restoration protects reentrant scans and capture indexing owns repeated-capture boundaries
429 src/claws/mcp.ts READ: Read install/reconcile/removal paths; catches distinguish transport uncertainty from rejected mutation and failed provenance.
427 packages/ai/src/transports/openai-responses-stream-terminal-internal.ts READ: KEEP final failure facts, tool identity, usage and omitted-output recovery
427 packages/ai/src/host.ts READ: KEEP host isolation, pending-work settlement and registration recovery
426 src/boards/board-store.ts READ: KEEP: materialization and grant checks preserve content ownership; explicit clone projection keeps only admitted declaration fields.
424 src/media/input-files.ts READ: READ ONLY: peer PR #165340 owns file; MIME/size admission, bounded decode, timeout cancellation and response cleanup are distinct boundaries
423 src/daemon/systemd-peer-native.ts READ: Native ABI bounds, credential checks and pointer cleanup own the D-Bus boundary.
422 src/tui/tui-run-lifecycle.ts READ: Active peer PR #165225; no edits. Retain reconnect/watchdog/terminal diagnostic ownership.
420 src/state/agent-database-admission.ts READ: Retained: pending startup decisions retain live per-agent authority and typed protocol refusals
420 packages/memory-host-sdk/src/host/types.ts READ: Public memory contracts and custom unknown-data diagnostics require validation; diagnostic and fallback-reason readers intentionally accept different shapes.
420 packages/gateway-protocol/src/schema/agent.ts READ: Canonical agent/channel-action ingress schemas preserve provenance, routing and public request fields.
419 src/node-host/node-worker-workspace-quiescence.ts READ: Catch paths retain workspace custody and recover watchdog leases; no redundant rethrow-only layer.
419 src/meeting-bot/platform-adapter.ts READ: Schemas own untrusted in-page results; field projection excludes loose-schema extras and normalizes observation provenance; exported factory/type surface is SDK-consumed.
419 src/claws/project.ts READ: Reused canonical strict-descendant containment and existing isFile predicate for symlink manifest inspection.
416 src/state/user-profile-events.ts READ: Retained: profile identity, channel authority and account-link revisions fence different contracts
416 src/process/spawn-broker/resource-host.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
416 src/daemon/service-audit-systemd.ts READ: Native effective state versus authored unit audit need separate fallback and drift reporting.
416 src/acp/control-plane/manager.runtime-handle-ensure.ts READ: Reused resolved cwd/model/thinking without re-normalizing; preserved late-handle cleanup and authority checks.
416 packages/ai/src/transports/openai-transport-params.ts READ: KEEP hostile payload reads and final model-facing tool surface authority
415 src/entry.ts READ: Startup/update/lazy import/CLI error phases are distinct; outside directory-focused edit scope.
415 src/daemon/service-env.ts READ: Environment and PATH normalization handles raw operator input; portability guards are necessary.
414 src/secrets/provider-env-vars.ts READ: CHANGE: consume already normalized alias owner facts and typed env candidate arrays directly
414 src/plugin-state/plugin-state-store.kernel.ts READ: KEEP: JSON corruption mapping, retained namespace TTL rejection, monotonic append allocation and cached SQL preserve storage contracts.
414 src/acp/runtime/session-meta-worker-mutation.ts READ: Retained transaction and incognito custody protect publication after asynchronous admission.
413 src/projects/project-clone-runtime.ts READ: KEEP: retries clean task-owned clone attempts; ref transport isolation and fixed error mapping remain necessary.
413 packages/ai/src/transports/openai-responses-replay-internal.ts READ: KEEP semantic retry rejects only owner-classified provider failures; callback errors not retried
412 src/skills/runtime/workspace-worker.ts READ: Protocol envelopes, transport retirement and host boundary checks remain necessary.
410 src/flows/bundled-health-checks.ts READ: Retain per-owner registrations, trust gates and isolated update inspection; normalized slots still preserve case so renormalization is necessary.
410 src/daemon/launchd-foreign-jobs.ts READ: Removal requires current parsed command evidence; diagnostic fallbacks cannot imply authority.
409 src/worker/embedded-agent.runtime.ts READ: Tool cleanup/transcript flush catch paths record failures and preserve remote terminal ACK ordering.
409 src/tui/tui-questions.ts READ: Retain wire schema validation, secret-answer recovery, expiry and late-event ownership.
408 src/model-catalog/pricing.ts READ: Snapshot/cache authority and external pricing policy boundaries retained; host classifier differs from network SSRF policy.
408 src/acp/translator.session-lifecycle.ts READ: Gateway failures produce method-specific logs; setup, replay and session controls have distinct contracts.
407 packages/workboard-contract/src/index.ts READ: Canonical public board state types and vocabulary; no runtime wrapper or repeated normalization opportunity.
406 src/state/openclaw-agent-db-validation-cache.ts READ: Retained: shared atomic receipts preserve cross-worker revocation and physical-file identity; canonical proof and integrity admission are distinct facts.
405 src/status/status-plugin-health.ts READ: Retain loader/runtime provenance, dedupe keys and distinct compact/detailed error reporting.
404 src/media-understanding/local-audio.ts READ: KEEP: host and executable probes require observed platform/file evidence; backend cache and command normalization have separate consumers
404 src/acp/control-plane/runtime-options.ts READ: Removed repeated manager validation and resolved-option normalization; inlined the single-use alias resolver.
403 src/state/openclaw-agent-db-session-nodes-migration.ts READ: Retained: schema-14 migration preserves July+ entry/route precedence and child foreign keys; heartbeat-outcome migration is protected peer scope.
402 src/tui/components/question-prompt.ts READ: Retain masked secret editor, paste boundary, answer draft and renderer sanitization contracts.
402 src/talk/realtime-session-lifecycle.ts READ: Retain explicit generation, cancellation, retry and pending-audio queue ownership.
402 src/media-understanding/runtime.ts READ: KEEP: public file wrappers preserve prompt and scope semantics; read helper releases cache before image normalization
401 src/worker/inference-stream.runtime.ts READ: Missing-state tolerance is replay-gap policy; cancellation catch intentionally emits terminal failure.
401 src/secrets/store/secret-store.ts READ: Catch layers map validation/database failures into stable Result codes or missing-table outcomes; repeated authority checks protect awaited worker replies and redaction registration; no sound structural reduction remains.
398 packages/memory-host-sdk/src/host/memory-schema.ts READ: CHANGE: remove redundant failure-state assignment and error temporary; FTS cleanup and recorded failure remain unchanged.
398 packages/gateway-protocol/src/schema/config.ts READ: Canonical config/update wire contracts already share apply/patch properties; status variants encode distinct recorded outcomes.
397 packages/net-policy/src/ip.ts READ: Canonical versus loose parsing and embedded address handling preserve SSRF policy and public caller semantics.
396 packages/agent-core/src/harness/session/tool-result-pairing.ts READ: KEEP repeated-id occurrence pairing and persisted result repair contracts
395 src/proxy-capture/store.sqlite.ts READ: KEEP: legacy public constructors retain shipped SDK contracts; catches close owned DB/WAL handles and aggregate finalization failures
393 src/trajectory/runtime.ts READ: APPLIED: one string guard owns prompt redaction and both source/redacted byte bounds
393 src/security/external-content.ts READ: KEEP: marker folds and source-index maps prevent spoofing and truncation boundary bypass; token scan already consolidated.
393 packages/ai/src/providers/google-stream.ts READ: KEEP signed part identities, terminal reason mapping and usage facts
392 src/state/openclaw-state-db-schema-repair.ts READ: Retained: historical schema conversion preserves canonical projections and distinct ownership errors
392 src/hooks/gmail-watcher.ts READ: Process cleanup, bind retries and shutdown continuation catches are lifecycle outcomes.
391 src/wizard/setup.plugin-config.ts READ: KEEP: manifest schema traversal distinguishes existing numeric object keys from absent arrays, excludes secret prompts and preserves typed enum/number values.
391 src/wizard/setup.inference-verification.ts READ: KEEP: candidate credential save/verify/activate phases retain owner revalidation and config compare-and-swap after interactive yields; cleanup stops progress independently.
391 packages/gateway-protocol/src/theme.ts READ: Theme input validator owns unknown-key, executable-CSS and bounded palette rejection with exact messages.
391 packages/gateway-protocol/src/schema/approvals.ts READ: Canonical security-review snapshots preserve per-status decisions, terminal reasons and sanitized presentation fields.
390 src/talk/forced-consult-coordinator.ts READ: KEEP: forced/native consult correlation, timed tombstones and pending/in-flight/delivered states prevent duplicate work and duplicate speech.
390 src/system-agent/hosted-setup.runtime.ts READ: KEEP: hosted setup delegates write ownership; catches map only missing workspace errors; memory import projection distinguishes confirmed and indeterminate counts
390 src/daemon/systemd-exec.ts READ: CHANGE: error classifier receives raw detail once, classifier owns normalization.
388 src/skills/lifecycle/upload-store.ts READ: Chunk normalization is ingress; upload queue, heartbeat and consumer guards own state.
387 src/state/user-profile-identity.read.ts READ: Simplified: removed listUserProfilesSync forwarding projection; all callers consume canonical snapshot profiles
387 src/daemon/service-state.ts READ: Service read phases retain one deadline and preserve cleanup or ownership failure precedence.
386 src/state/openclaw-state-db-table-retirements.ts READ: Retained: dependency probes are data-preservation guards, not redundant validation
386 src/skills/lifecycle/workspace-skill-write.ts READ: Mutation catches restore exact prior content and collect rollback failures; restoration read returns false.
386 src/acp/control-plane/manager.cancel-session.ts READ: Cancellation admission, recorded failure state, exact locator checks and settlement must be retained.
384 src/system-agent/overview.ts READ: KEEP: source can be invalid raw config so roster normalization/deduplication remains needed; gateway catch preserves diagnostic fallback
384 src/security/audit.deep.runtime.ts READ: KEEP: manifest and scan catches record incomplete/security outcomes; cache key normalization preserves equivalent entry inventories without hiding read failures.
384 src/claws/lifecycle-status.ts READ: Read status projection and offline compatibility; normalization bridges authored configuration and inspected live resources.
384 packages/gateway-protocol/src/schema/exec-approvals.ts READ: Canonical execution approval contracts enforce mutually exclusive native/file owners and review snapshot boundaries.
383 src/process/exec.ts READ: Public buffered runner has distinct discard, aggregate-byte, abort, and returned-error contracts; catches preserve output.
383 packages/ai/src/utils/credential-redaction.ts READ: KEEP hostile descriptor access, bounded redaction and content-preserving diagnostics
382 src/state/openclaw-state-read.validation.ts READ: Retained: request validation is the worker transport boundary including dynamically routed operations
382 src/fleet/doctor.runtime.ts READ: KEEP: catches turn runtime and filesystem failures into recorded findings; inspected external values require validation independent of create profiles
380 src/state/openclaw-state.worker.ts READ: Retained: dynamically prepared module registries preserve lazy boundaries; close finally joins retained borrow even if the update-run writer fails.
380 src/skills/loading/plugin-skills.ts READ: Filesystem errors are recorded or best-effort publication; symlink ownership retained.
379 src/snapshot/local-repository-directory-policy.ts READ: KEEP: POSIX ancestry, macOS ACL and Windows owner/DACL rules protect distinct security boundaries; catches retain operation-specific context
379 packages/ai/src/transports/openai-responses-payload-policy.ts READ: KEEP open peer PR #165225 owns this file; read-only coverage
377 src/meeting-bot/plugin-entry.ts READ: KEEP: peer cleanup #165349 touched this file within the overlap window; public callback invocation and authority semantics remain with that owner.
377 packages/mermaid-renderer/src/renderer.ts READ: Renderer failures dispose the isolated iframe; payload/color normalization protects untrusted SVG.
377 packages/markdown-core/src/render.ts READ: Marker renderer preserves annotation dominance, link origin and crossing-span nesting; repeated marker lookups also span caller callbacks.
376 src/worker/worker-command.runtime.ts READ: Managed input catches produce recorded completion; realpath binding is revalidated across awaited admission.
376 packages/normalization-core/src/json-schema.ts READ: Schema keyword rewriting and acyclic JSON checks preserve TypeBox behavior and hostile-object rejection.
374 src/meeting-bot/session-transcript-store.ts READ: Delivery wrapping adds typed failure identity used by durable retry owner; cursor overlap and epoch branches preserve transcript continuity.
374 packages/normalization-core/src/number-coercion.ts READ: Exported parsing/coercion helpers retain distinct finite, safe-integer, timestamp and timer boundaries.
373 src/skills/workshop/service.ts READ: Revision/status lifecycle captures mutable inputs and holds target ownership.
373 packages/acp-core/src/structured-auth-redaction.ts READ: Canonical auth grammar handles malformed members, folded/serialized whitespace and quote escaping; normalization and resynchronization protect redaction boundaries.
372 src/tts/tts-settings.ts READ: APPLIED: resolved settings consume normalized persona/provider IDs from config owner
372 packages/gateway-protocol/src/schema/board.ts READ: Canonical board operation/content variants preserve grant revisions, source resolution and ticket-based authority shapes.
370 src/secrets/runtime-command-secrets.ts READ: KEEP: command overrides and fallback restore inactive refs; catch retains unresolved diagnostics for CLI fallback
369 src/talk/session-runtime.ts READ: KEEP: provider adoption, close/detach phases and callback error containment fence stale audio/tool effects and preserve final transcript delivery.
369 src/talk/provider-types.ts READ: KEEP: public SDK/protocol unions encode browser control ownership and stable compatibility; unknown provider terminal payloads need boundary normalization.
369 src/skills/workshop/service-evaluation.ts READ: Hook runner records execution errors; Workshop separately validates untrusted evaluator output.
368 src/skills/workshop/service-propose.ts READ: Create/update preparation shares one record publisher; distinct target checks remain meaningful.
367 src/trajectory/runtime-store-writer.ts READ: KEEP: target checks reconcile different session identities; error state prevents replay after uncertain commits and retention preserves live authority
366 src/system-agent/plugin-artifact.ts READ: KEEP: validation crosses separate untrusted archive and retained-file boundaries; log-and-rethrow adds essential postcommit recovery instruction
366 src/claws/doctor.ts READ: Read findings and inventory; failures intentionally become reported health outcomes, while cron closure stays untouched.
366 packages/sdk/src/types.ts READ: Public SDK contracts preserve narrower projections and published compatibility names; no runtime normalization/error layer to remove.
366 packages/ai/src/providers/anthropic-model-contract.ts READ: KEEP separately shipped model/replay contracts and public normalization entrypoints
365 src/wizard/setup.shared.ts READ: Retain concurrent config merge/CAS, explicit-null ownership and consent boundaries.
365 src/daemon/launchd-plist.ts READ: Parser and renderer validate different external/native data; strict error envelope is intentional.
364 src/claws/provenance-runtime-read.ts READ: Read fact capture/publication lifecycle; catches retain per-agent/state errors, invalidation, and captured-scope authority.
363 src/daemon/service-audit-schtasks.ts READ: KEEP: native XML audit distinguishes installer defaults/released task values from operator edits; SID/path/launcher normalization preserves Windows-specific ownership evidence.
363 packages/markdown-core/src/render-aware-chunking.ts READ: Rendered-size chunking preserves graphemes, nonmonotonic renderer measurements and semantic whitespace; progress guards prevent retry loops.
362 src/talk/agent-run-control-shared.ts READ: KEEP: raw speech/provider args require conservative multilingual control classification and exact fixed status/error speech; aliases belong to public input boundary.
362 src/daemon/service-layout.ts READ: Physical identity and live mount probes cannot be replaced by lexical normalized paths.
361 src/daemon/launchd-stop.ts READ: Stop intents, transferred authority, helper outcomes and post-stop cleanup need recorded failure handling.
360 src/worker/launch-descriptor.ts READ: Zod/TypeBox checks are raw descriptor admission; downstream authority guards remain security boundaries.
360 packages/ai/src/openai-completions-messages.ts READ: CHANGED reuse sanitized tool text with existing emptiness/fallback behavior
358 src/process/spawn-broker/child.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
358 packages/gateway-protocol/src/schema/environments.ts READ: Canonical inventory schemas share summary construction and refine resource counts; no redundant catch or normalization layer.
357 packages/agent-core/src/harness/utils/truncate.ts READ: KEEP UTF-8 boundaries, surrogate repair and buffer retention semantics
356 src/talk/client-voice-mutation-digest-owner.ts READ: KEEP: bounded retry ownership retains physical in-flight work after cooperative abort, separates legitimate defer from failure, and records durable delivery only after success.
356 packages/tool-call-repair/src/grammar.ts READ: KEEP XML and JSON syntax-specific parsing and byte limits
355 src/llm/utils/oauth/anthropic.ts READ: KEEP: existing Error conversion preserves the type-aware throw contract after awaited callback assignment; removal was reverted after hosted lint rejected the narrowed value.
355 packages/normalization-core/src/error-coercion.ts READ: Catch blocks preserve hostile-proxy/cross-realm/aggregate diagnostics; canonical error helpers retain distinct contracts.
353 src/media-understanding/file-context.ts READ: KEEP: classifications distinguish policy denial, extraction failure and local self-serve eligibility
353 packages/agent-core/src/harness/compaction/utils.ts READ: KEEP open peer PR #165225 owns this file; read-only coverage
352 src/node-host/node-worker-workspace-identity.ts READ: No edit: open peer PR #165225 owns this file; preserved overlap boundary.
352 src/hooks/gmail-ops.ts READ: Setup/service catches retain shutdown settlement; repeated serve-path normalization handles empty slash-only paths.
351 src/state/session-repository-workspaces.ts READ: Retained: committed result recovery and retained artifact cleanup must remain separately recorded
351 src/state/openclaw-agent-db-schema-helpers.ts READ: Retained: legacy and current schema assertions enforce different stable migration contracts
351 src/meeting-bot/realtime-agent-engine.ts READ: Catches finish transcript/output events and transport cleanup; provider transcript trim is boundary normalization.
350 src/state/user-profiles-avatar.ts READ: Retained: revision checks after I/O prevent stale avatar publication; timeout errors remain contextual
350 packages/ai/src/transports/openai-completions-dsml.ts READ: KEEP bounded structured recovery and literal fallback for malformed calls
349 src/system-agent/setup-app-recommendations.ts READ: APPLIED: let inventory normalizer project app labels and bundle IDs once
349 packages/gateway-protocol/src/schema/audit-run.ts READ: Canonical bounded identity/receipt projections distinguish discovery from exact execution selection; no redundant error mapping.
347 src/state/openclaw-state-db-repair.ts READ: Retained: Doctor reports failures as warnings while ownership and updater refusals propagate
347 src/state/openclaw-agent-db.paths.ts READ: Simplified: private file-or-missing-parent identity union removes impossible optional states and duplicate field comparisons
347 src/model-catalog/manifest-planner.ts READ: Removed re-normalization and duplicate deduplication after provider normalizer and Set ownership.
347 packages/ai/src/transports/openai-completions-compat.ts READ: KEEP endpoint defaults and configured override distinctions
346 src/tts/openai-compatible-speech-provider.ts READ: APPLIED: inline one-use base URL forwarding helper and let canonical URL normalization own trimming
346 src/state/user-profiles.ts READ: Retained: read-before-write ensures revalidate identity under transaction; imported and stored names differ
346 src/node-host/node-worker-supervisor-recovery.ts READ: Journal/process revalidation is repeated across awaits; catch branches select cancellation recovery or return fresh receipts.
346 packages/ai/src/transports/openai-responses-compaction-replay.ts READ: KEEP persisted checkpoint shape validation and refresh-required outcome
345 src/wizard/setup.model-auth.ts READ: KEEP: skipped auth stays lazy, plugin preference/policy owns selection, and provider failures either re-prompt interactive choices or propagate explicit CLI failures.
344 src/trajectory/runtime-store.sqlite.ts READ: KEEP: public append/read entry points require their own budgets; catch records deferred optional retention without failing committed append
344 src/security/audit-extra.summary.ts READ: KEEP: reports derive exposure policy and retain per-agent and trust-boundary findings
344 src/proxy-capture/store-readonly.ts READ: KEEP: metadata is externally supplied; iterator cleanup on next/read failure preserves original errors and native database ownership
344 packages/ai/src/stream.ts READ: CHANGED shared finally records producer settlement without duplicate fulfillment/rethrow callbacks
343 src/tui/commands.ts READ: Retain shared command registry projections, alias precedence and completions.
342 packages/markdown-core/src/assistant-transcript.ts READ: Annotation owner maps visible text offsets across Markdown tokens and excludes raw-code containers; projection passes serve distinct whole-stream and token roles.
341 packages/worker-runtime/src/worker-task-pool-retirement.ts READ: Retained retirement state records native-stop failures, protects custody and joins artifact cleanup; observer catches cannot replace original outcomes.
340 src/transcripts/capture-summary.ts READ: KEEP: catches retain heuristic fallback, lane retirement and superseded-note progress; authority rechecks straddle awaited work
340 packages/ai/src/providers/google-shared.ts READ: KEEP model-family thinking policy; lifecycle catches map abort reason before shared failure projection
339 src/wizard/setup.app-recommendations.ts READ: Retain credential-free scan disclosure, persisted offer CAS, publisher identity and install checkpoint boundaries.
337 src/transcripts/store-sqlite-read.ts READ: KEEP: native row projections and bounded identity matching protect different read contracts; optional integer normalization serves public store inputs
337 src/projects/project-clone.ts READ: KEEP: double checks revalidate distinct clone and checkout leases after awaits; cleanup preserves unknown committed outcomes.
337 src/hooks/bundled/session-memory/handler.ts READ: Capture/write failures become logs; provenance reservation and incognito guards are required.
337 src/acp/event-mapper.ts READ: External tool payload coercion, recursion bounds and escaped prompt rendering are boundary validation.
336 src/state/user-github-connections.ts READ: Retained: schema validation follows mutation/serialization and secrets are registered on each local read
336 src/skills/runtime/refresh-state.ts READ: Reconciliation errors intentionally leave caches invalidated and publish changes.
336 src/routing/session-key.ts READ: KEEP: raw public inputs require normalization; opaque peer spans and shipped aliases prevent direct generic lowercasing.
336 src/hooks/gmail-setup-utils.ts READ: Command failures add command context; availability and credentials fallbacks are intentional recorded selections.
336 src/daemon/schtasks-install-files.ts READ: Rollback receipt and original process identity distinguish uncertain writes from clean restoration.
335 src/worker/worker.runtime.ts READ: Error mapping distinguishes fencing, non-started deadlines and turn failures; environment cleanup retained.
335 src/daemon/launchd-system.ts READ: Native and filesystem probes establish foreign ownership; unavailable checks fail closed.
333 src/secrets/store/secret-store-hidden-github.ts READ: Catches preserve missing-table absence and PersonalGitHubStateError conversion; raw SQLite timestamp/secret validation protects persisted state; hidden-record readers intentionally enforce separate scopes and lifetimes.
333 src/meeting-bot/realtime-local-audio-transport.ts READ: KEEP: peer cleanup #165349 touched this file within the overlap window; output-failure mapping remains with that owner.
333 src/daemon/schtasks-state-probe.ts READ: External COM data needs independent wire validation; errors retain timeout/native diagnostic kinds.
333 packages/memory-host-sdk/src/host/memory-schema-fts.ts READ: FTS schema admission and savepoint recovery preserve persisted SQL shape, derived-index ownership and canonical source identities.
332 src/skills/workshop/experience-review.ts READ: Review catch records durable failed outcome; finally invalidates skills and clears run context.
332 src/memory-host-sdk/event-store.ts READ: Schema input normalization bounds diagnostic storage and preserves per-event projection; no independent duplicate owner.
332 src/media-understanding/apply.ts READ: KEEP: registry failure memoization rethrows after per-capability outcomes; cleanup and marker decisions are required
331 src/meeting-bot/page-script-source.ts READ: Browser globals may contain prior page state; guards preserve tab/session identity and final-caption retention; leave script variants are externally supplied.
330 src/node-host/plugin-node-host.ts READ: No edit: open peer PR #165225 owns this file; preserved overlap boundary.
330 src/media-understanding/image-model-runtime.ts READ: KEEP: auth and image capability checks span credential rematerialization and leased runtime authority
330 packages/ai/src/providers/openai-responses-shared.ts READ: KEEP stream hook, refusal and encrypted replay recovery outcomes
329 src/talk/activation-name.ts READ: KEEP: leading/trailing candidates have distinct punctuation and fuzzy-match policies; normalizers accept raw configured/transcribed names and prevent ordinary dictation activation.
329 src/logging/console.ts READ: KEEP: EPIPE handling, logging isolation and suppression restoration preserve visible console behavior
328 src/wizard/clack-prompter.ts READ: KEEP: prompt cancellation/navigation arbitration restores global cursor actions after input finalization; sensitive prompts and shared progress owners have separate contracts.
326 src/worker/embedded-agent-live.runtime.ts READ: Open peer PR #165225 owns this file; inspected but not edited.
323 src/skills/lifecycle/clawhub-uninstall.ts READ: Removal stages exact files and recovers tracking/files independently after failures.
323 src/security/fix.ts READ: KEEP: catches record attempted fixes or continue unavailable optional inventory; permission checks preserve symlink/target type and platform boundaries.
323 src/daemon/service-update-authority.ts READ: Scoped native queue joins all children and keeps revoked authority failures through recovery.
322 src/trajectory/metadata.ts READ: APPLIED: trim strings once while retaining raw-string deduplication and order
322 src/system-agent/chat-engine.ts READ: KEEP: facade owns serialization/history; turn-queue rejection observer prevents queue poisoning; inference guards retain wizard cancellation and route authority
322 packages/media-core/src/mime.ts READ: Byte/extension/header arbitration and registered MIME aliases have distinct externally visible semantics.
321 src/secrets/private-plan-file.ts READ: KEEP: Windows native handle/ACL/delete-on-close and sanitized PowerShell failure contracts are substantive security boundaries
321 packages/model-catalog-core/src/remote-catalog-bundle.ts READ: KEEP public v1/v2 schemas and recursive endpoint/header stripping security boundary
320 src/state/openclaw-agent-db-readonly-scope.ts READ: Retained: cache reuse, native transactions and scope retirement have distinct cleanup behavior
320 src/fleet/cell-profile.ts READ: KEEP: profile validation happens before different external operations; env safety and errors differ by input layer
319 src/skills/lifecycle/install-download.ts READ: Download/extract catches have different user-visible result codes and cleanup.
319 src/acp/translator.agent-events.ts READ: Approval relay retries and catches record user decisions and deny superseded authority.
318 src/worker/worker-connection-frames.ts READ: Frame checks validate raw network input and payload budgets; callbacks resolve or reject pending ownership.
318 src/node-host/invoke-agent-cli-claude-params.ts READ: No edit: open peer PR #165225 owns this file; preserved overlap boundary.
318 packages/sdk/src/transport.ts READ: CHANGE: project admitted Gateway event fields directly; remove one-use envelope revalidation and impossible unknown event fallback.
317 src/system-agent/rescue-message.ts READ: KEEP: persisted unknown operation validation and one-use approval consumption are security boundaries; expiry normalization guards wall-clock bounds
316 src/secrets/provider-integrations.ts READ: KEEP: filesystem trust and manifest policy checks own executable provider admission
316 src/logging/diagnostic-memory.ts READ: KEEP: main/worker/RSS limits differ and public compatibility inputs have a named shipped SDK contract; finite checks preserve diagnostic formatting
314 src/wizard/setup.gateway-config.ts READ: Retain prompt validation, auth/store ownership and Tailscale security restrictions.
314 src/daemon/systemd-system.ts READ: Absence requires manager and disk evidence; native failures preserve ownership diagnostics.
314 packages/gateway-protocol/src/schema/update-runs.ts READ: Canonical update-ledger wire projection retains bounded diagnostics, admission facts and recorded recovery outcomes.
313 src/wizard/setup.migration-snapshot.ts READ: KEEP: source/target hashing treats symlinks, missing files and SQLite journals distinctly; lock-error mapping preserves holder diagnostics and reentrant target ownership.
313 packages/terminal-core/src/ansi-sequences.ts READ: Incremental stripping and complete-segment scanning preserve distinct incomplete-control semantics; constant-size OSC state is a sanitizer boundary.
312 src/meeting-bot/output-loopback-verifier.ts READ: Correlation thresholds and bounded reference/history buffers implement real audio proof; no redundant error or normalization layer.
312 src/logging/log-tail.ts READ: KEEP: missing-file catches preserve rotation races; prefix reads establish PEM context and finally closes the handle; parsing before filtering and after redaction serves different bytes
311 src/state/openclaw-state-db-existing-write.ts READ: Retained: caller and transaction schema admissions observe separate mutable scopes and file generations
310 src/tui/components/searchable-select-list.ts READ: Retain lifecycle invalidated search projection, ANSI segmentation and stable match/selection order.
310 packages/gateway-protocol/src/schema/worker-inference.ts READ: Worker inference validators combine JSON-safety precheck with schema checks; these enforce different ingress invariants.
309 src/node-host/node-worker-supervisor-commands.ts READ: One command owner maps typed parser, capacity, bundle, and transfer errors into byte-stable responses.
309 src/meeting-bot/status-prejoin-source.ts READ: DOM and page-state normalization plus repeated ownership checks are needed across rerenders and session adoption; catches absent.
309 src/context-engine/registry.resources.ts READ: KEEP: source claims, cleanup scopes, and drain ordering preserve factory settlement and release ownership.
309 src/boards/board-layout.ts READ: KEEP: normalization between operations preserves order semantics; explicit widget clone is a closed-field projection.
308 src/worker/node-workspace-protocol.ts READ: Parser validates raw operation-specific combinations and independent request/result byte budgets.
308 src/state/openclaw-database-verify.impl.ts READ: Retained: child exit/disconnect custody and live reconfirmation prevent stale quarantine decisions
308 src/security/safe-regex.ts READ: KEEP: parse state detects nested/ambiguous repetition and bounded testing controls user regex cost; compile catch owns invalid-regex result.
307 src/state/openclaw-state-worker-runtime.ts READ: Retained: dispatch preserves domain-specific transaction admission and dynamic registry loading
307 src/skills/lifecycle/upload-store.kernel.ts READ: CHANGE: expiry helper already validates current time, so remove duplicate caller-side validation.
307 packages/model-catalog-core/src/model-catalog-types.ts READ: KEEP exported types and raw thinking mapping validation
306 packages/gateway-protocol/src/schema/sessions-row.ts READ: Canonical session projection schema documents omission, null and compact-row semantics; no runtime normalization to remove.
306 packages/gateway-client/src/pending-request.ts READ: Nested catches retain sender cleanup and asynchronous resend settlement; no plain rethrow catch.
304 src/video-generation/runtime.ts READ: Capability validation precedes provider I/O; result validation protects external assets and exact skip diagnostics.
304 src/skills/lifecycle/clawhub.ts READ: Install wrappers map selector validation to outcomes; registry core maps request errors.
303 src/state/user-channel-identity-operations.ts READ: Retained: live authority is rebound after worker results; transported identities retain schema validation
303 src/node-host/auto-update-install.ts READ: Generation validation, executor fencing, integrity checks, and invalid-install recovery protect different update stages.
303 packages/workboard-contract/src/sessions-board.ts READ: Public durable specification parser owns key/value validation and exact errors; patch path correctly revalidates merged input.
303 packages/ai/src/transports/simple-completion-transport.ts READ: KEEP plugin dispatch aliases, credential context and native transport owner boundaries
302 src/state/openclaw-state-db-schema-additive.ts READ: Simplified: removed sole expired June suspension-repair call/import while retaining versioned additive owners
301 src/state/openclaw-state-lease-heartbeat.worker.ts READ: Retained: renewal catches record loss diagnostics, schedule bounded lock-contention recovery and fence expiry
300 src/secrets/ref-contract.ts READ: KEEP: exported grammar and grouping validate raw incoming refs; trim is not guaranteed by SecretRef type
300 packages/terminal-core/src/ansi.ts READ: ANSI compatibility, stream preservation and terminal-width APIs intentionally differ; grapheme truncation retains reset controls and executable C0 widths.
299 src/state/openclaw-state-ownership.ts READ: Retained: ownership parsing validates persisted reserved metadata and contextualizes schema errors
299 src/acp/client.ts READ: Child exit recovery, launch cleanup and terminal errors have user-visible outcomes.
299 packages/ai/src/providers/openai-completions-tool-calls.ts READ: KEEP buffered legacy wire function calls and authoritative final tool admission
298 src/skills/lifecycle/archive-install.ts READ: Native application and policy dispatch have different failure-kind contracts.
298 src/acp/control-plane/manager.runtime-controls.ts READ: Consumed runtime mode already normalized by metadata owner; retained optional-control rejection handling.
298 packages/ai/src/providers/google-interactions-request.ts READ: KEEP transport headers and wire mapping differ from GenerateContent adapter
297 src/tts/tts-payload.ts READ: KEEP: later preference reads follow provider callbacks; preserve freshness semantics and recorded synthesis fallback outcomes
297 packages/ai/src/transports/provider-compaction-replay.ts READ: KEEP compaction owner identity and pressure projection preservation
296 src/talk/agent-consult-tool.ts READ: KEEP: provider tool descriptions, policy and raw argument normalization are public contracts; redundant final trim of normalized text chunks identified for lead.
296 src/node-host/node-worker-capacity.ts READ: Admission retries and failed refresh fallback preserve capacity reservation and bounded cancellation.
295 src/talk/agent-run-control.ts READ: KEEP: exact run-owner revalidation before cancellation/steering and guarded queued admission must remain across lazy runtime loading and callback effects.
295 src/state/openclaw-state-worker-lease.ts READ: Retained: pending invocation markers exist before synchronous admission and join every accepted command
295 src/daemon/systemd-service-identity.ts READ: Broker, manager and unit identities are revalidated across awaits before native mutation.
295 src/daemon/systemd-loaded-runtime.ts READ: Native property bounds and state-generation comparisons own safe service inspection.
295 packages/agent-core/src/harness/compaction/branch-summarization.ts READ: KEEP branch budget and error-message contracts distinct from compaction summary
294 src/wizard/navigation-prompter.ts READ: Retain prompt signatures, sensitive-answer cache exclusion and scoped back/forward replay.
294 src/secrets/runtime-shared.ts READ: CHANGE: use existing boolean validator directly instead of assertion throw/catch/normalize round-trip
293 src/claws/application-plan.ts READ: Read profile extension planning; repeated optional projections preserve distinct consent bytes and diagnostic paths; heartbeat closure retained.
293 packages/gateway-protocol/src/schema/nodes.ts READ: Canonical node request/result schemas and resource refinement enforce boundary constraints once.
293 packages/ai/src/providers/tool-schema-refs.ts READ: KEEP schema pointer, inherited definitions and root reference scope semantics
292 src/tui/osc8-hyperlinks.ts READ: Retain authored link destination precedence, wrap continuation and UTF-16/ANSI boundaries.
292 src/media/local-media-access.ts READ: KEEP: repeated root checks cover caller-supplied roots and opened real paths; catches translate public codes, resolve absent parents or dispose opened handles
292 packages/acp-core/src/runtime/types.ts READ: Public adapter contracts retain third-party runtime optionality and separate streamed events from terminal result ownership.
291 packages/markdown-core/src/frontmatter.ts READ: YAML catches produce recorded issues/fallbacks and bounded freeform recovery; normalization occurs once per independent public entry point.
291 packages/ai/src/providers/google-messages.ts READ: CHANGED consume extracted sanitized tool text directly
290 src/skills/runtime/refresh-watch-targets.ts READ: Canonical/symlink roots have separate watch authority and bounded traversal contracts.
289 src/state/openclaw-state-lease-worker-storage.ts READ: Simplified: timer receives the existing renewal promise directly without a void-only async wrapper
288 src/talk/fast-context-runtime.ts READ: Retain native/legacy provider contracts, owner liveness and timeout cleanup/fallback result.
288 src/state/openclaw-state-db-startup-checkpoint.ts READ: Retained: checkpoint bootstrap retains schema ownership and restores native connection state
288 src/node-host/config.ts READ: Stored-row and caller validation have different error contracts; legacy-state checks bracket asynchronous owner reads.
288 src/hooks/gmail.ts READ: Public config/override resolution owns coercion; later path normalization has distinct slash-empty fallback behavior.

@steipete

steipete commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author
l387 production coverage, part 3/3 — all entries READ
Lines File Outcome
287 src/skills/workshop/service-query.ts READ: Reconciliation checks current pending state under commit lock; missing drafts recorded.
287 src/node-host/invoke-agent-cli-claude.ts READ: Errors feed RunResult, progress state, or artifact cleanup diagnostics; terminal UTF-8 capture retains truncation behavior.
287 src/media/store.read-scope.ts READ: KEEP: checks bind authority, directory and file identity after awaited work; catches preserve distinct cleanup diagnostics and settlement ownership
286 src/wizard/setup.post-install-migration.ts READ: KEEP: provider detection/prompt failure records optional non-outcomes, while preparation cleanup failures propagate; runtime reacquisition uses updated config.
286 src/state/openclaw-state-db-borrow.ts READ: Retained: requesting owner retirement and borrowed handle cleanup retain independent failure custody
286 src/skills/lifecycle/workspace-types.ts READ: Host lifecycle/wire contracts consumed by local and remote adapters.
286 src/node-host/node-worker-transfer-http.ts READ: TLS, body completion, response consumption, and drain errors preserve credentials and request/stream cleanup.
286 src/meeting-bot/realtime-output-owner.ts READ: Queue lifecycle preserves backpressure, clear ordering and response-generation fencing; catches report required transport outcomes.
285 packages/worker-runtime/src/worker-task-pool-owned.ts READ: Owned close/join distinction preserves custody until explicit observation; preparation and request catches settle retained operations.
285 packages/ai/src/providers/openai-tool-projection.ts READ: KEEP hostile descriptor failure recording and forced-tool reconciliation
284 src/node-host/node-stream-transport.ts READ: No edit: open peer PR #165340 owns this file; preserved overlap boundary.
284 src/claws/migrate-validation.ts READ: Read authored roster/effective settings; checks enforce portable migration and secret boundary, with heartbeat closure retained.
284 src/acp/control-plane/manager.types.ts READ: Public input and lifecycle types remain named owner contracts.
284 src/acp/control-plane/manager.turn-stream.ts READ: Readiness, event delivery, cancellation and backend result are independently owned terminal boundaries.
284 packages/gateway-protocol/src/schema/worker-protocol-primitives.ts READ: Shared worker schema constructors already own repetition; serialization catch records budget rejection for invalid/cyclic unknown input.
283 src/claws/package-update.ts READ: Read provenance compare-and-swap and compensation; checks bind current owners and catches preserve artifact uncertainty.
282 src/state/user-profiles.worker.ts READ: Simplified: profile listing returns the canonical snapshot directly without projecting and rewrapping its profiles
282 src/daemon/systemd-lifecycle.ts READ: Action owner already shares lifecycle logic; legacy and confirmed-unit removals have distinct contracts.
281 src/state/openclaw-state-db-audit-migration.ts READ: Retained: audit schema recognition and sequence high-water preservation protect July+ storage contracts
281 src/skills/library/service.kernel.ts READ: Database kernels revalidate profile ownership and revision within transactions; projections retain wire contracts.
281 src/logging/diagnostic-profile.ts READ: KEEP: profiler catches record unavailable outcomes and cleanup uncertainty; authority checks fence awaited work
281 src/acp/runtime/session-meta-write.ts READ: Reused canonical storeSessionKey without another normalization; retained two-owner write admission and custody.
280 src/system-agent/assistant-prompts.ts READ: KEEP: prompt bytes are behavior; narrow JSON parsing is model-output boundary; command/reply strings require normalization
280 packages/markdown-core/src/html-scanner.ts READ: Shared scanner owns rendering/visibility malformed-input policies and script raw-text states; ASCII case folding is grammar admission, not renormalization.
279 src/snapshot/manifest.ts READ: KEEP: manifest parser validates untrusted artifact bytes; file-copy catches close handles and unlink only owned staged targets
279 src/skills/loading/session.ts READ: Synchronous session/extension SDK loader deliberately returns per-file diagnostics and legacy API defaults.
279 src/secrets/target-registry-data.ts READ: KEEP: plugin/channel dynamic registrations and loader fallback preserve complete target inventory; no registration removal
279 src/node-host/node-worker-prepared-workspace.ts READ: Prepared identity checks fence distinct async stages; rollback and retirement errors retain custody.
279 src/daemon/systemd-unit.ts READ: KEEP: systemd logical-line/argv escaping, CR/LF refusal and preserved policy projection are distinct native parsing contracts; apparent revalidation retains precise diagnostics.
279 packages/gateway-client/src/session-projection-final-identity.ts READ: Persisted identity and display-content fallback intentionally differ; inference retains same-run ordering proof.
279 packages/ai/src/providers/anthropic-tool-projection.ts READ: KEEP schema conversion failure records and wire-name ambiguity rejection
278 src/skills/lifecycle/source-install.ts READ: Metadata fallback, discovery rejection and git preparation expose distinct outcomes.
278 packages/model-catalog-core/src/model-catalog-pricing.ts READ: KEEP raw source price contracts and unavailable versus invalid catalog distinctions
277 src/status/status-plugin-health.runtime.ts READ: Retain plain health-field projection, loaded-provider filtering and failure-to-no-signal status behavior.
277 src/meeting-bot/runtime-facade-types.ts READ: Type contracts cover multiple platform adapters and preserve public SDK surfaces; no implementation/error/normalization code.
277 src/media/read-capability.ts READ: KEEP: host, registered-workspace and explicit sandbox readers enforce distinct ownership and denied-read boundaries
277 src/hooks/internal-hooks.ts READ: Registration and dispatch are dynamic consumers; handler catches isolate logged failures.
276 src/state/openclaw-state-db-schema-v13-widerow.ts READ: Retained: July+ migrations preserve canonical JSON and record invalid imported plugin state
276 packages/memory-host-sdk/src/host/memory-recall-metadata.ts READ: Stored provenance and project-key eligibility are security boundaries; keyset batching prevents foreign-row starvation.
275 src/claws/lifecycle-config-removal.ts READ: Read deletion authority/monitor closure; active heartbeat coordination and recent state-owner changes left untouched.
274 src/skills/runtime/remote-skills.ts READ: Host frontmatter validation and collision naming guard remote skill provenance; failures are logged drops.
274 src/secrets/store/secret-store-write.ts READ: Validation runs once for either direct or inherited/repair kind; host normalization is not repeated by assertSecretStoreWriteShape; catch layers preserve rollback false and delete idempotence; CAS and transaction/commit admission remain necessary.
274 src/node-host/node-worker-turn-store.kernel.ts READ: Turn receipts validate persisted state and exact physical owners; normalization is not duplicated.
274 packages/ai/src/transports/openai-responses-params-internal.ts READ: KEEP payload construction and caller-edit sanitization preserve distinct trust boundaries
273 src/transcripts/store-sqlite.ts READ: KEEP: JSON validation handles persisted external rows; dedupe compares native SQLite string encoding and all utterance fields
272 src/tts/directives.ts READ: KEEP: streaming tag state handles chunk boundaries; provider directive loop preserves ordering and plugin callbacks
272 src/state/openclaw-agent-schema-inspection-worker.ts READ: Retained: request/response validation and child-exit cleanup are process-boundary contracts
272 src/projects/project-registry.ts READ: KEEP: captured database/checkout custody and cancellation handoff are required across read, rollback, and finalization.
272 src/process/command-queue.capacity-groups.ts READ: Validation is the group-admission boundary; capacity derives from active task IDs without duplicate state.
271 src/state/openclaw-agent-db-resources.ts READ: Retained: synchronous and asynchronous disposers have different custody and revocation ordering
271 src/skills/workshop/experience-review-scheduler.ts READ: Idle generations, system activity and source eligibility avoid stale or duplicate review dispatch.
271 src/plugin-state/plugin-state-store.retention.ts READ: KEEP: pre-insert versus post-write quotas are different policies; transaction-local counters invalidate on clock rollback and expiry.
269 src/meeting-bot/browser-session-control.ts READ: Nested catches deliberately distinguish inspect/close and outer browser failures; owner checks protect reused tabs and transcript provenance.
269 src/daemon/launchd-install.ts READ: KEEP: install snapshots, publication assertions and rollback restore exact prior loaded/enabled state; removal catches distinguish disappeared plist from permission failure.
269 src/chat/canvas-render.ts READ: Replaced private string-field coercer with canonical readNonBlankString; removed trim on regex-constrained attribute key.
268 src/worker/worker-rpc-live-event-client.ts READ: Failure handling degrades previews while preserving terminal events and sequence resynchronization.
268 src/state/user-profile-writes.ts READ: Retained: mutation catch/finally paths settle durable receipts, authority fences and catalog publications
268 packages/gateway-protocol/src/gateway-error-details.ts READ: Structured and legacy failure readers remain public wire compatibility boundaries, with exact code/message semantics.
267 src/media/media-probe.ts READ: KEEP: catches implement best-effort metadata and ffprobe protocol fallback; normalization validates untrusted ffprobe output
267 src/canvas/wrap.ts READ: KEEP: generated bridge captures native primitives before widget code and maps error/host-init outcomes across isolated frames.
266 src/meeting-bot/browser-audio-capture-source.ts READ: Captures untrusted browser media state; catches stop owned capture and record error, preserving mute restoration and source ownership.
265 src/state/agent-deletion-journal.read.ts READ: Retained: unreadable journal details retain known deleted identities and distinguish maintenance from runtime outcomes
265 src/node-host/invoke-system-run-allowlist.ts READ: Approval rewriting guards protect opaque transports and command-plan binding; no safe error-layer deletion.
265 src/meeting-bot/browser-plugin.ts READ: One canonical descriptor builds multiple meeting plugins; default normalization occurs at plugin boundaries and entry overrides are used.
265 packages/gateway-protocol/src/schema/snapshot.ts READ: Canonical hello/health snapshot contract retains optional fields needed before async producers populate state.
265 packages/ai/src/transports/openai-responses-contracts.ts READ: KEEP exported provider failure and retry classifications
265 packages/ai/src/transports/openai-completions-replay.ts READ: KEEP provider-owned reasoning and signature replay compatibility
264 src/skills/runtime/session-snapshot.ts READ: Pending rebuild coalescing preserves live-waiter authority and retries invalidated source generations.
264 src/routing/route-binding-index.ts READ: KEEP: channel/account indexes share a config generation; source-order merge avoids sorting a hot-path binding list.
263 src/logging/diagnostic-argument-churn-activity.ts READ: KEEP: owner checks, sequence ordering, continuity leases and policy-wait tokens distinguish semantic stalls from valid waiting and merged session refs
262 src/state/openclaw-state-worker-contract.ts READ: Retained: typed worker operation registrations are live domain contracts, not dead export inventory
262 src/skills/discovery/chat-commands.ts READ: CHANGE: append uses the lowercase command name guaranteed by the command-spec sanitizer.
262 src/daemon/program-args.ts READ: KEEP: entrypoint fallback preserves package-manager symlinks across upgrades; wrapper executable validation, runtime choice and explicit plaintext flags own distinct install contracts.
261 src/state/openclaw-state-lease-worker.ts READ: Retained: host grant waits require fresh native expiry checks before publishing lease authority
261 src/daemon/hosted-stop.ts READ: KEEP: frozen supervisor route and current PID/start/cgroup/invocation checks prove exact stop authority; executor cleanup and uncertain outcomes prevent resurrecting ambiguous generations.
260 src/wizard/setup.migration-finalize.ts READ: KEEP: deferred activation retries preserve completed items, record warnings for incomplete apply, dispose preparation, and acknowledge only completed durable promotion.
260 src/meeting-bot/runtime-probes.ts READ: Bounded audio/caption probes preserve real observed progress and timeouts; optional hooks are SDK surfaces with platform-specific consumers.
260 src/daemon/service-process-membership.ts READ: KEEP: defensive native launchd/ps/cgroup parsing is the process-containment security boundary; unreadable or contradictory observations must remain unknown.
260 src/acp/runtime/session-meta-migration-embedded.ts READ: Migration receipts, backed-up source checks and warnings retain current SQLite upgrade recovery.
260 src/acp/control-plane/manager.runtime-options-commands.ts READ: Persistence now consumes canonical options returned by merge/reconcile owners without normalizing again.
259 src/system-agent/system-agent.ts READ: KEEP: one-shot/interactive paths retain distinct authority and lifecycle scopes; errors preserve inference causes and exit behavior
259 src/proxy-capture/ca.ts READ: KEEP: catches turn unusable certificate pairs into regeneration and preserve successful publication across cleanup failures; queue and file lock cover different concurrency
258 src/secrets/runtime-degraded-state.ts READ: KEEP: WeakSet error authority and cloned owner metadata protect failure attribution and live availability
257 src/tts/tts-synthesis.ts READ: KEEP: separate public and Talk capability gates; persistence catch records visible failed outcome
257 src/skills/library/selection.ts READ: Pins and identity are captured across async reads; synchronous SDK compatibility is documented.
257 src/image-generation/image-assets.ts READ: Public image conversion helpers validate independent external entry points; canonical base64 differs from Unicode trim.
257 src/claws/mcp-update.ts READ: Read full apply and rollback; distinct config-uncertainty flags survive rejected writes and compensation; no redundant catch found.
256 src/daemon/systemd-user-transport.ts READ: KEEP: cached reachability is not admission; joined discovery retries retain each caller budget/authority, and candidate failures preserve timeout/access-denied classification.
255 src/secrets/runtime-fast-path.ts READ: KEEP: fast path is used by Gateway startup and preserves auth-store observations and revision watermark
255 src/node-host/claude-skill-session.ts READ: MCP proxy catches settle callers, retire invocation authority, or clean temporary resources.
255 src/llm/providers/stream-wrappers/google-thinking-payload.ts READ: Provider model families require distinct enum/budget mappings and retain public deprecated helper contracts.
255 packages/ai/src/transports/openai-responses-stream-slots-internal.ts READ: KEEP streamed output identity authority and bounded deferred text collapse
255 packages/ai/src/providers/anthropic-usage.ts READ: KEEP omitted and invalid usage buckets differ from full prompt snapshots
254 src/secrets/configure-plan.ts READ: KEEP: source-path presence distinguishes authored and derived targets; provider diff preserves ownership
254 src/fleet/registry.kernel.ts READ: KEEP: persisted runtime validation, operation lease authority and busy-diagnostic fallback preserve database and mutation contracts
254 src/decisions/validation.ts READ: KEEP: finite JSON validation rejects getters/proxies/cycles and bounds input before semantic validation.
254 packages/session-url-contract/src/focus.ts READ: Public route build/parse helpers retain URL decoding failure outcomes and exact canonical route shapes.
254 packages/ai/src/transports/anthropic-compaction-replay.ts READ: KEEP replay suppression tombstones, route identity and encrypted checkpoint boundaries
253 src/state/openclaw-state-db-task-delivery-recovery.ts READ: Retained: recovery checks preserve exact orphan bytes and artifact durability before any row removal
253 src/skills/workshop/store-sqlite-event.ts READ: Persisted event parsing owns bounded replay and retains payload compatibility with published Workshop records.
251 src/status/summary.runtime.ts READ: Retain configured/persisted model identity distinctions and no-plugin-discovery status boundary.
251 src/logging/diagnostic-run-activity-recovery.ts READ: KEEP: event cutoffs and marker ownership prevent asynchronous starts reviving retired activity
251 packages/llm-core/src/utils/event-stream.ts READ: KEEP producer/consumer settlement and queue retention semantics
251 packages/gateway-protocol/src/schema/sessions-catalog.ts READ: Canonical catalog protocol reuses locator/descriptor properties; public paging and terminal/import semantics differ intentionally.
250 src/wizard/setup.memory-import.ts READ: KEEP: advisory planning, pre-apply authority, partial/indeterminate copy outcomes and plugin cleanup are separately recorded rather than swallowed.
250 src/skills/discovery/chat-command-invocation.ts READ: CHANGE: canonical dash-normalized lookup subsumes redundant exact normalized comparisons.
250 src/flows/doctor-health-contribution-runners.state.ts READ: Retain repair-owner adapters and warnings; loading wrapper alone does not justify another file change.
249 src/system-agent/assistant.ts READ: APPLIED: consume the already-trimmed agent run text projection
249 packages/agent-core/src/internal-hooks.ts READ: KEEP private authority/acknowledgement facts and weak lifetime ownership
248 packages/worker-runtime/src/worker-task-server.ts READ: Worker server serializes execution/resource cleanup and records wire failures; cancellation guards and finally blocks preserve lifetime boundaries.
247 src/logging/diagnostic-session-state.ts READ: KEEP: alias merge, generation guards and bounded pruning protect independent observation lifecycles
246 src/worker/transcript-message.ts READ: Projection excludes unsupported fields and preserves redaction and authoritative provider replay budgets.
246 src/talk/realtime-voice-lazy-lifecycle.ts READ: KEEP: per-generation lazy loading and dispose-once tracking preserve reentrant close, final transcript settlement and primary startup error precedence.
246 src/skills/workshop/reconcile-transition.ts READ: Recovery catch intentionally converts unverified or failed reconciliation to false, keeping durable facts.
246 src/meeting-bot/node-invoke-policy.ts READ: Normalization and allowlisted projection form the dangerous node-command security boundary; do not remove repeated validation versus node host.
245 src/worker/node-supervisor-protocol.ts READ: Raw descriptor/control parsing retains exact failure text and turn/bundle identity checks.
245 src/tui/components/tool-execution.ts READ: Retain literal Code Mode rendering, preview budgets and typed tool activity projection.
245 src/node-host/node-worker-launch-observation.ts READ: Output, process-exit, and container-cleanup failures become separate durable/retained outcomes.
245 src/llm/providers/stream-wrappers/proxy.ts READ: Proxy cache and attribution policy adapters retain provider-specific precedence and explicit cache controls.
244 src/skills/runtime/tool-dispatch.ts READ: Builds real explicit, inherited, sandbox and sender tool policies; no redundant error layer.
244 src/node-host/auto-update.ts READ: Discovery and activation checks revalidate current policy and launcher authority after awaits.
244 packages/llm-core/src/model-contracts/anthropic.ts READ: KEEP exported model-family predicates retain aliases and normalization semantics
243 src/skills/workshop/tool-policy-diagnostic.ts READ: Diagnostic maps exclusions through the actual tool-policy owner; path normalization starts with raw config.
243 src/acp/control-plane/manager.runtime-resume-state.ts READ: Retry and reset catches intentionally preserve visible skipped-outcome diagnostics.
242 src/system-agent/setup-inference-transition.ts READ: KEEP: catches coordinate credential rollback and config undo; aggregate recovery failures retain both original and recovery causes
242 src/process/spawn-broker/execa-worker.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
242 src/logging/redact-json-tokens.ts READ: KEEP: JSON parse admission must distinguish mixed historical text before token scanning; encoding/origin metadata preserves structured versus raw masking
242 packages/ai/src/internal/retry-after.ts READ: KEEP HTTP date validation, getter-free timing extraction and standards-required obsolete date syntax
241 src/system-agent/setup-inference-auth-options.ts READ: KEEP: ordering/projection policies differ for guided/manual/install/enable inputs; caller-visible choice normalization covers metadata not guaranteed normalized by resolver
241 src/state/openclaw-state-db-current-reader.ts READ: Retained: schema admission and pinned snapshots bracket independent current-authority reads
241 src/hooks/discovery.ts READ: Unreadable/oversize/escaping metadata has intentional warning/skip outcomes; pinned file descriptors always close.
241 src/daemon/service-audit-launchd.ts READ: KEEP: binary/XML definition audit separates known released templates from custom policy; repeated shape checks gate installer attribution and preserve operator edits.
241 src/daemon/launchd-restart-handoff.ts READ: KEEP: shell handoff waits for process extinction and launchd teardown, retains restart retries/log text, and reports asynchronous spawn acceptance before caller exit.
241 packages/ai/src/env-api-keys.ts READ: KEEP browser-safe builtins, real Bun environment fallback and provider credential order
240 src/system-agent/setup-model-selection.ts READ: KEEP: configured and effective selection are distinct; runtime pin checks verify final owner resolution; lazy module capture is reused by updater
240 src/state/agent-deletion-discovery.ts READ: Retained: canonical path identity and retained deletion evidence prevent alias-based resurrection or removal
240 src/logging/diagnostic-session-recovery-coordinator.ts READ: KEEP: sync and async completion paths preserve immediate state settlement; catch maps recorded failures and finally releases in-flight ownership
240 src/hooks/update.ts READ: Each catch records per-pack outcome; transaction and lease ownership survive asynchronous install.
240 packages/memory-host-sdk/src/host/markdown-chunks.ts READ: Weighted code-point chunking and curated entry ownership preserve persisted index boundaries.
239 src/plugin-state/plugin-blob-store.ts READ: KEEP: SDK ingress owns key/value/size/namespace validation before worker transfer and user metadata serialization
239 src/mcp/channel-shared.ts READ: SIMPLIFIED: inline the one-caller channel-normalization wrapper into the canonical conversation mapper.
239 packages/gateway-protocol/src/schema/devices.ts READ: Canonical pairing/token contracts preserve token-delivery correlations and shipped native-client lifecycle compatibility.
238 src/state/openclaw-agent-execution-domain.ts READ: Retained: dynamically imported factories require runtime contract validation and current publication authority
238 src/skills/runtime/env-overrides.ts READ: Sanitization distinguishes managed values and sensitive-key exceptions; no safe collapse.
238 packages/ai/src/transcript-transform.ts READ: KEEP async result relocation, replay security and missing-result repair
237 src/state/github-personal-publication-lifecycle.ts READ: Retained: deletion rereads exact receipt identities and original lifecycle revisions under commit admission
237 src/skills/discovery/command-specs.ts READ: CHANGE: sanitized names remain canonical through unique-name allocation.
236 src/process/terminal-pty-node.ts READ: Startup failures retain process/IPC/output joins; repeated current checks fence awaited native launch.
236 src/process/supervisor/service-child-group-ownership.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
236 src/meeting-bot/plugin-shell.ts READ: Shared shell builds multiple plugin adapters; forwarding factory options encode platform metadata or lazy CLI lifecycle; public type surface remains.
235 src/process/supervisor/service-child-relay.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
235 src/memory/memory-artifact-provenance.ts READ: Canonical workspace, hash and reservation comparisons are provenance/rollback boundaries.
235 src/image-generation/openai-compatible-image-provider.ts READ: Public provider adapter has multiple consumers and distinct multipart/auth/body ownership; release finally retained.
235 packages/normalization-core/src/agent-run-terminal-outcome.ts READ: Lifecycle, wait and terminal APIs carry distinct status precedence; canonical normalization supports raw callers.
235 packages/gateway-protocol/src/schema/protocol-schema-selection.ts READ: Dynamic schema registry derives sorted names with explicit exclusions; registrations and exclusion guard are required generated-protocol inputs.
235 packages/gateway-protocol/src/schema/frames.ts READ: Canonical transport envelope and handshake schemas define public wire/security boundaries; no redundant runtime error handling.
234 src/state/session-repository-workspaces.kernel.ts READ: Retained: write owner validates raw workspace inputs and optimistic revisions; values are not prevalidated
234 src/plugin-state/plugin-state-store.mutations.ts READ: KEEP: live lease predicate, expiry cleanup, conditional insertion and retained move checks protect authoritative transaction decisions.
234 src/daemon/systemd-peer.ts READ: KEEP: broker/peer identity and exact unit binding are security admission boundaries; optional establishment fallback and retained-query fail-closed behavior differ intentionally.
234 src/claws/openclaw-profile.ts READ: Read profile loader and legacy dynamic authority conversion; supported post-July contracts and parse/unsafe-file error mappings retained.
233 src/secrets/runtime-config-collectors-memory.ts READ: KEEP: raw roster includes legacy object shapes; per-owner inherited credentials need distinct attribution
233 src/media-understanding/types.ts READ: KEEP: public SDK decision optional fields and opaque agent-owned model handle preserve shipped contracts
233 src/acp/translator.session-updates.ts READ: Inlined single-use enqueue wrapper and dropped unreachable rejection handler on fulfilled queue tails.
233 src/acp/translator.presentation.ts READ: Gateway presentation fields need normalization at this external data boundary.
232 src/system-agent/setup-inference-credential-access.ts READ: KEEP: catch maps missing-secret outcome and rollback restores committed credentials; post-await generation checks retain security authority
232 src/acp/runtime/session-meta-write.native.ts READ: Removed impossible absent-store branches using the store resolver contract; retained two-owner entry/publication ordering.
231 src/state/openclaw-state-settlement-read.ts READ: Retained: accepted mutation recovery and cleanup join have separate outcomes and cannot be collapsed
231 src/skills/lifecycle/upload-store.sqlite.ts READ: Expiry validation distinguishes invalid clocks from deletion-eligible expired records; lease checks stay transactional.
231 src/claws/project-build.ts READ: Read artifact build/readback/publish; catches clean task-owned staging or convert exact publication errors.
231 packages/agent-core/src/harness/messages.ts READ: KEEP persisted timestamp conversion and trusted runtime-context carrier projection
230 src/tui/tui-submit.ts READ: Retain separate synchronous/asynchronous failure boundary, pasted-command dispatch and captured submit admission.
230 src/skills/workshop/store.worker.ts READ: Registry is dynamically consumed; worker admission and proposal-target lease validation cannot be removed.
230 src/secrets/path-utils.ts READ: KEEP: mutation/get paths intentionally differ in creation, array compaction and error messages
230 src/meeting-bot/session-durable-transcripts.ts READ: Catches retain retry scheduling and final-capture diagnostics; source trim is transcript-provider boundary, bridge import stays lazy.
230 packages/ai/src/providers/tool-result-text.ts READ: KEEP canonical Unicode sanitization, secret redaction and media placeholder owner
229 src/storage/filesystem.ts READ: KEEP: pin-current assertions and nested finally cleanup protect root replacement, no-clobber writes, and durable parent sync.
229 src/state/openclaw-state-worker-registry.ts READ: Retained: dynamic operation registry retains canonical domain owners and lazy imports
229 src/state/openclaw-state-maintenance-context.ts READ: Retained: nested resource custody and live-source access require distinct captured owner assertions
228 src/node-host/node-worker-prepared-workspace-store.kernel.ts READ: Persisted prepared state transitions and identity checks are authoritative transaction boundaries.
226 src/state/openclaw-state-db-open.ts READ: Retained: filesystem identity and schema checks bracket native opening and close all failed acquisitions
226 src/skills/workshop/store-record.ts READ: Schemas validate persisted untrusted metadata; Result parsers preserve public contracts.
226 src/media-understanding/resolve.ts READ: APPLIED: prompt normalization runs once; scope owner alone normalizes chat type
226 packages/ai/src/providers/openai-reasoning-effort.ts READ: KEEP provider-native effort spelling and model-family compatibility boundaries
225 src/worker/worker-connection-admission.ts READ: Handshake parser and identity matching validate different boundaries; failures fence current generation.
225 src/state/agent-creation-claim.ts READ: Retained: failed close retains exact creation custody and independently aggregates operation and cleanup errors
225 src/plugin-state/plugin-store-validation.ts READ: KEEP: JSON graph/property validation and namespace option consistency are external SDK boundaries
224 src/process/exec-result.ts READ: Nested error checks preserve canonical cleanup classification across realm/module copies and hostile causes.
224 src/flows/channel-setup.prompts.ts READ: Retain admin owner confirmation, per-account policy remapping and normalized account selection.
224 src/claws/migrate-package.ts READ: Read package generation/cleanup; catches clean only unchanged owned bytes and retain original mutation errors.
224 packages/gateway-client/src/session-projection-message-identity.ts READ: Public unknown-input readers and native/imported/optimistic identity distinctions prevent cross-row reconciliation.
223 src/secrets/target-registry-pattern.ts READ: KEEP: matching/expansion/materialization validate different external inputs and wildcard contracts
223 src/node-host/auto-update-compatibility.ts READ: Candidate preflight and cleanup failures are both retained; file absence and invalid schema have different update outcomes.
223 packages/model-catalog-core/src/provider-model-id-normalization.ts READ: KEEP public raw id entrypoints and manifest/built-in policy ordering
222 src/talk/talk-session-controller.ts READ: KEEP: shared turn state rejects stale callbacks and duplicate output starts; diagnostic observer failures intentionally cannot interrupt delivery.
222 src/skills/workshop/proposal-bundle.ts READ: Tree hashing and candidate validation act on different input sets; preserve per-file and total bounds.
222 src/secrets/channel-contract-api.ts READ: KEEP: bundled/public artifact precedence, filesystem admission and official fallback are maintained boundaries
222 src/process/windows-command.ts READ: Normalization occurs at raw invocation/PATH boundaries; extension and quoting checks prevent shell fallback.
222 src/process/terminal-pty.ts READ: Native backend selection and Windows wrapper resolution own actual platform contracts; keep lazy imports.
222 src/plugin-state/plugin-state-worker-client.ts READ: KEEP: host admission and post-await observation checks fence authority; catches restore typed worker error contracts
222 src/node-host/desktop-stream-command.ts READ: JSON parsing, credential file validation, RFB policy, and stream cleanup are real external boundaries.
222 packages/gateway-protocol/src/schema/questions.ts READ: Canonical question request/result schemas distinguish unnormalized input from owner projections and preserve codegen status constraints.
221 src/meeting-bot/plugin-config.ts READ: This is the raw configuration normalization owner; fallback audio-command construction preserves cross-platform config parsing.
220 src/tts/tts-streaming-resources.ts READ: KEEP: catch layers preserve transport cancellation ordering and aggregated release outcomes
220 src/pairing/pairing-store-sqlite.ts READ: SIMPLIFIED: use resolveAllowFromAccountId owner default directly; retain malformed persisted-row admission.
220 src/canvas/widget-script-syntax.ts READ: KEEP: parser state and SyntaxError mapping preserve HTML/SVG offsets and actionable byte-identical diagnostics.
219 src/worker/worker-rpc-inference-client.ts READ: Catches record operation terminal outcomes and replay interruptions; stream identity checks remain necessary.
219 src/process/exec-termination.ts READ: Open peer PR #165340 owns this file; inspected but not edited.
219 packages/acp-core/src/runtime/session-identity.ts READ: Runtime/persisted identity normalization owns untrusted backend fields and preserves resolved IDs across pending observations.
218 src/secrets/runtime-gateway-auth-surfaces.ts READ: KEEP: diagnostics consume credential planner decisions while retaining distinct reasons and stable field order
218 src/provider-runtime/operation-retry.ts READ: Error classification selects bounded retry and preserves abort authority; no no-op catch.
218 src/plugin-state/plugin-state.worker.ts READ: KEEP: read/write/open failures retain distinct operation/code messages; transaction and commit admission fences must surround mutations.
218 src/model-catalog/remote-overlay.ts READ: Optional read/parse errors become absence while admission fences publication; retain first-winner snapshot lifecycle.
218 src/canvas/documents.ts READ: KEEP: guarded path normalization, malformed-manifest pruning, and best-effort old-document cleanup own different failure semantics.
218 src/acp/runtime/session-meta-control.ts READ: Retained current authority and physical database identity are required for every control effect.
217 src/tui/tui-types.ts READ: Retain shared TUI state and event contracts used across Gateway, embedded and system-agent backends.
217 src/state/user-preferences.store.ts READ: Retained: serialized value comparisons, preference limits and merge precedence preserve stored-user contracts
217 src/state/openclaw-database-preflight-agent-scheduler.ts READ: Retained: scheduler records ordered inspection outcomes and drains workers before propagating failures
217 src/plugin-state/plugin-state-store.journal.ts READ: KEEP: cursor parse fallback recovers from evicted/corrupt cursor via retained tail; row allocation validates fresh sequence and key bounds inside transaction.
217 src/acp/client-helpers.ts READ: Permission input and spawned child environment are security boundaries with required validation.
216 src/talk/agent-talkback-runtime.ts READ: KEEP: metadata-identity batching, byte/count bounds, serial consult settlement and abort/error projection preserve ordering and audible failure fallback.
216 src/process/linux-oom-score.ts READ: Failure paths restore process OOM score and preserve child handle; shell environment policy is security-sensitive.
216 src/logging/redact-pem.ts READ: KEEP: streaming delimiter state and two-history prefix composition preserve incomplete PEM masking across log-tail boundaries
216 src/logging/diagnostic-heap-profile.ts READ: KEEP: raw V8 profile validation protects bounded export; capture owner clamps schema-admitted values to stricter sampling and collection-duration bounds
216 src/daemon/service-reconciliation.ts READ: KEEP: locked inspection, operator-policy preservation, backup/compensation and authority-specific warning/error outcomes distinguish restored, unchanged and recovery-pending state.
216 packages/memory-host-sdk/src/host/batch-runner.ts READ: Request grouping, split-on-error and normalized public builder outputs preserve provider retry/poll contracts.
215 src/security/dm-policy-shared.ts READ: KEEP: private repeated normalization also copies allowlists before arbitrary isSenderAllowed callbacks; removing it would expose returned canonical lists to mutation.
215 src/node-host/node-worker-launch-transport.ts READ: Transport selection preserves process-owner negotiation and cleanup of container launch failures.
215 src/mcp/tools-stdio-server.ts READ: KEEP: shutdown aggregates physical serving/registration cleanup failures and drains accepted work before reconnect.
215 packages/memory-host-sdk/src/host/config-utils.ts READ: Public host config readers retain agent ownership, private-memory defaults and legacy data-owner compatibility.
214 src/node-host/invoke-system-run-plan.ts READ: Removed three trims of previewText already trimmed by resolveSystemRunCommandRequest; kept binding and cwd checks.
214 src/media/media-reference.ts READ: KEEP: repeated prefix normalization is not idempotent for nested MEDIA directives; containment paths remain distinct
214 src/acp/approval-classifier.ts READ: Tool identity and path normalization form the approval security boundary.
213 src/tui/tui-backend.ts READ: Retain concrete Gateway/embedded backend contract and mixed-version optional capabilities.
213 src/tts/tts-core.ts READ: KEEP: nested timeout catch preserves timeout mapping after cleanup and lazy model ownership
213 src/talk/turn-context-tracker.ts READ: KEEP: mutable handle ownership, deferred audio admission, completed-turn pruning and ignored-context TTL preserve audio/context correlation.
213 src/process/terminal-pty-bun.ts READ: Flush guards permit callback reentrancy and preserve paused tail output before exit.
212 src/transcripts/status.ts READ: KEEP: aliases and capture identities are different sources; normalization maps configured intent to runtime facts without turning uncertain matches into authority
212 src/skills/workshop/proposal-draft.ts READ: CHANGE: remove leftover catch from retired Result wrapper; owned synchronous calls throw Errors.
212 src/node-host/pty-command.ts READ: Input/parameter parse failures and native PTY exit races require separate handling; cwd may change before spawn.
212 src/daemon/service-audit-preservation.ts READ: KEEP: executable/heap/environment comparisons preserve operator-authored arguments with platform-specific normalization; diagnostics redact all arbitrary environment values.
212 src/acp/session-new-ordering.ts READ: Correlated wire claims and independent queue release preserve SDK ordering under overlap.
211 src/tui/theme/theme.ts READ: Retain environment/theme normalization, contrast calculations and observable palette constants.
211 src/meeting-bot/session-cleanup-tracker.ts READ: Swallowed setup rejection is deliberate drain-before-stop ownership; catches aggregate independent teardown failures and retry unsettled resources.
211 src/index.ts READ: Legacy executable and library entry contracts remain public; outside directory-focused edit scope.
211 src/daemon/systemd-command-query.ts READ: KEEP: shared deadline, custody checks and busctl legacy format fallback distinguish native missing-unit results from transport/access failures without expanding authority.
211 packages/ai/src/providers/azure-openai-responses.ts READ: KEEP URL and credential validation precede SDK egress; Azure endpoint fallback public contract
210 src/trajectory/runtime-retention.sqlite.ts READ: KEEP: native aggregate inputs need validation; revision recheck fences writes after read planning and bounded retention preserves complete runs
210 src/daemon/launchd-update-jobs.ts READ: KEEP: label parsing, metadata proof and current-Gateway exclusion prevent stale updater cleanup from selecting unrelated or active service jobs.
210 src/acp/control-plane/manager.close-session.ts READ: Close recovery records runtime notices and fences exact control bindings.
209 src/talk/provider-internal.ts READ: Retain private provider capability boundary and public projection isolation.
208 src/transcripts/store-sqlite-write.ts READ: KEEP: write-time revision and selector checks protect concurrent state; export manifest and pending-file updates have different failure contracts
208 src/transcripts/library.ts READ: KEEP: normalized filter dates establish cursor scope; iterator finalization and incremental/final byte bounds protect export materialization
208 src/meeting-bot/platform-adapter-contract.ts READ: Shared browser platform contract is used by plugins and SDK exports; no executable normalization/error layer.
208 src/claws/cron-update.ts READ: Read scheduler apply/undo; catches retain ambiguous external outcomes and ordered rollback messages; cron closure left untouched.
207 src/skills/loading/config.ts READ: Raw configuration, degraded secrets and prepared binary facts have independent runtime boundaries.
207 src/model-catalog/remote-refresh.ts READ: Download catches record error outcome and guarded release; writer owner handles current publication.
207 src/claws/tool-policy-runtime.ts READ: Read fact-bound consent policy; catches record consent verification failures and cannot be removed.
206 src/skills/workshop/types.ts READ: Types derive protocol contracts and add actual run authority or persisted provenance fields.
206 src/proxy-capture/runtime-response-body.ts READ: KEEP: catches preserve transport success across diagnostic failures; cancellation cannot await a live tee branch and cleanup has separate settlement
206 src/process/exec-output.ts READ: Output helpers accept multiple native/text callers; retention and UTF-8 repair enforce separate bounds.
206 src/mcp/channel-tools.ts READ: SIMPLIFIED: defer read/poll/wait numeric defaults to bridge owner instead of repeating defaults in handlers.
206 src/decisions/runtime.ts READ: KEEP: caller contract validation and post-await authority fencing cannot be removed based on TypeScript inputs.
205 src/state/openclaw-state-db-schema-v12-foldin.ts READ: Retained: schema-v12 singleton conversion preserves July+ persisted storage contracts
205 src/state/agent-deletion-cleanup.ts READ: Retained: expired deletion callbacks lose authority before native cleanup; failed closes remain retry-owned
205 src/media/image-ops.ts READ: KEEP: catches map backend availability while preserving operation fields or retain original errors after bounded BMP fallback
205 src/claws/provenance-adopted.ts READ: Removed single-implementation install-reader injection now that the canonical reader lives in a leaf kernel module.
205 packages/worker-runtime/src/worker-task-pool-resources.ts READ: Resource receipt decoding and worker-exit coordination own distinct failure/cleanup outcomes; catch paths settle resources and preserve errors.
204 src/talk/client-voice-session-store.ts READ: KEEP: persisted record schema owns tolerant historical arrays and strict unresolved hash limits; native SQL preparation order and ownership errors are intentional.
204 src/session-cards/progress-card-store.ts READ: Prepared write/tombstone/revision branches implement distinct persisted states and lazy schema admission.
204 src/daemon/systemd-runtime.ts READ: Runtime error conversion records inspection diagnostics; native states govern maintenance.
203 src/transcripts/summary-model.ts READ: KEEP: nested catches own per-model fallback and overall heuristic fallback; primary model reference intentionally remains raw upstream so trimming remains necessary
203 src/storage/encryption.ts READ: KEEP: streaming size/header validation, authenticated final segments, and key zeroization are cryptographic boundaries.
203 packages/tool-call-repair/src/promote.ts READ: KEEP promotion checks tool authorization, protected ranges and exact retained block mapping
203 packages/markdown-core/src/ir-spans.ts READ: KEEP: span clipping and merging own distinct coordinate transforms; copying preserves private autolink provenance. Newly above 200 lines after the rebase; fully read at closeout.
202 src/skills/library/store-access.ts READ: Access closures revalidate profile dependencies and caller authority across worker/file awaits.
202 src/acp/translator.disconnects.ts READ: Generation-aware recovery preserves pending prompts through reconnect and records expiration failures.
202 src/acp/control-plane/manager.runtime-handle-cache.ts READ: Handle identity and status probes gate lifecycle reuse; catches record eviction failures.
202 packages/ai/src/transports/openai-responses-compaction-window.ts READ: KEEP canonical persisted payload validation, bounded JSON and byte-limit failures
201 src/process/supervisor/adapters/pty.ts READ: Native process/descriptor lifecycle catches retain cleanup, custody, ordered delivery, and observable failure outcomes.
201 packages/ai/src/providers/openai-tool-schema-compat.ts READ: KEEP schema repair preserves constraints and rejects incompatible strict schemas
198 src/system-agent/inference-fallback.ts READ: APPLIED: roster owner already normalizes and deduplicates agent IDs

@steipete
steipete enabled auto-merge (squash) October 5, 2026 13:54
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 5, 2026
@clawsweeper

clawsweeper Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 5, 2026, 1:02 PM ET / 17:02 UTC (Revision 4).

ClawSweeper review

What this changes

The branch consolidates runtime error handling and normalization, fixes cron ancestry classification through cycles, and removes a historical Doctor repair.

Merge readiness

⛔ Blocked before merge - 5 items remain

The prior supported-upgrade finding remains unresolved. This maintainer-authored PR contains useful work that current main and the related merged cleanups do not supersede.

Priority: P2
Reviewed head: 2a7e1fb53a5aae27a844c03bf73b5e30d6915424

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful simplification and improved failure attribution remain limited by an unresolved supported-state compatibility defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Its pinned Linux comparison supports inherited Claws failure attribution, and focused tests supplement the corpus and runtime cleanup; neither establishes upgrade compatibility for the removed supported-state Doctor conversion.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Its pinned Linux comparison supports inherited Claws failure attribution, and focused tests supplement the corpus and runtime cleanup; neither establishes upgrade compatibility for the removed supported-state Doctor conversion.
Evidence reviewed 10 items Introduced change survives the verified merge: The test merge records base 0257a7d followed by pinned head 2a7e1fb. Comparing its result with that base confirms removal of the suspension-reason helper and Doctor invocation; this is PR-owned behavior rather than endpoint drift.
Publication date defines migration support: The retention contract explicitly includes formats written by releases published on or after July 1, including older-numbered extended-stable releases. Version numbering alone does not justify retirement.
Supported released writer: GitHub reports v2026.6.34 published at 2026-08-08T07:22:14Z. Its annotated tag resolves to commit 5c38f99.
Findings 1 actionable finding [P2] Retain the repair for the August-published legacy writer
Security None None.

How this fits together

Runtime helpers prepare provider requests, session metadata, diagnostics, and stored state for OpenClaw consumers. Doctor separately converts supported historical database rows into the canonical shapes those consumers expect.

flowchart LR
  A[Configuration and requests] --> B[Validation and normalization owners]
  B --> C[Runtime consumers]
  C --> D[Provider and Gateway results]
  E[Historical database rows] --> F[Doctor repairs]
  F --> G[Canonical session state]
  G --> C
Loading

Before merge

  • Retain the repair for the August-published legacy writer (P2) - The prior finding remains unresolved. v2026.6.34 was published August 8, and its lifecycle stores delivery.suspendedReason = "retry-limit" in SQLite payload JSON. The documented migration window explicitly includes older-numbered releases published after July 1. Removing this repair invocation and helper leaves supported rows unconverted after Doctor, while runtime consumes canonical permanent_failure reasons. Restore the transform, invocation, and deleted Doctor regression.
  • Resolve merge risk (P1) - Supported-state upgrade compatibility remains unverified: current-schema Doctor passes do not demonstrate preservation and canonicalization of rows written by the August-published release.
  • Complete next step (P2) - Restore the supported suspension-reason transform, Doctor invocation, and deleted regression; correct the retirement rationale in the PR body.
  • 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.

Findings

  • [P2] Retain the repair for the August-published legacy writer — src/state/openclaw-state-db-schema-additive.ts:292-294
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, database schema: src/claws/legacy-resume.ts, serialized state: src/acp/runtime/session-meta-write.native.ts, unknown-data-model-change: packages/memory-host-sdk/src/host/session-transcript-corpus.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Preserve the supported Doctor repair (recommended)
    Restore the existing transform, repair-scope invocation, and regression, then verify supported persisted-state upgrades.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore repairLegacySubagentSuspensionReasons, its Doctor repair-scope invocation, and the deleted historical-row regression; retain the other runtime simplifications and verify rows written by v2026.6.34.

Technical review

Best possible solution:

Keep supported historical canonicalization in Doctor until its actual shipped writers leave the retention window, while runtime continues consuming canonical state.

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

Yes, from source: seed a subagent row with delivery.suspendedReason set to retry-limit and run Doctor repair; the branch no longer converts it. The deleted regression defines this check, but this read-only review did not execute it.

Is this the best way to solve the issue?

No: consolidating normalization at existing owners is appropriate, but retiring this transform contradicts the verified released writer and publication-date retention contract.

Full review comments:

  • [P2] Retain the repair for the August-published legacy writer — src/state/openclaw-state-db-schema-additive.ts:292-294
    The prior finding remains unresolved. v2026.6.34 was published August 8, and its lifecycle stores delivery.suspendedReason = "retry-limit" in SQLite payload JSON. The documented migration window explicitly includes older-numbered releases published after July 1. Removing this repair invocation and helper leaves supported rows unconverted after Doctor, while runtime consumes canonical permanent_failure reasons. Restore the transform, invocation, and deleted Doctor regression.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A bounded historical-state compatibility defect blocks this otherwise useful runtime cleanup.
  • merge-risk: 🚨 compatibility: The verified merge removes a Doctor conversion for a format written by a release inside the documented support window.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Its pinned Linux comparison supports inherited Claws failure attribution, and focused tests supplement the corpus and runtime cleanup; neither establishes upgrade compatibility for the removed supported-state Doctor conversion.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/state/openclaw-state-db-legacy-backfills.test.ts --maxWorkers=1.
  • [P1] git diff --check.
  • [P1] Verify supported published-driver × candidate Doctor upgrade behavior using historical retry-limit rows, preserving unrelated state and confirming repeated repair is stable.

What I checked:

Likely related people:

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

  • Restore the supported suspension-reason repair and its existing Doctor regression.
  • Verify historical-row conversion and repeat-run stability through Doctor, including the supported published-driver upgrade path.

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 (3 earlier review cycles)
  • reviewed 2026-10-05T14:01:23.520Z sha 2be902a6f0e107a02024db2f18388f549511d988 :: blocked before merge. :: [P2] Retain the repair for the August-published legacy writer
  • reviewed 2026-10-05T14:28:53.363Z sha 6cdc95a :: blocked before merge. :: [P2] Retain the repair for the August-published legacy writer
  • reviewed 2026-10-05T15:16:05.849Z sha 6cdc95a :: blocked before merge. :: [P2] Retain the repair for the August-published legacy writer

@steipete
steipete force-pushed the deslop/l387-error-normalize-rest-20261005 branch from 2be902a to 6cdc95a Compare October 5, 2026 14:20
@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Claws lifecycle CI blocker

Exact-head CI at 2be902a6f0e107a02024db2f18388f549511d988 failed src/claws/lifecycle.e2e.test.ts → reports and removes a Claw-created agent through plan-first lifecycle commands: removal returned status: "partial", agentRemoved: false, and monitor_cleanup_failed with file lock timeout for …/openclaw.sqlite.cron-authority.

The failing test starts a serving Gateway before removal (test:348). The CLI starts the deletion journal before the monitor-quiesce RPC (lifecycle-config-removal.ts:180); that local transaction enters withCronReceiptAuthorityMutation (agent-lifecycle-registry.ts:355). The authority owner acquires process-held .cron-authority custody (receipt-authority-owner.ts:126), conflicting with the serving Gateway's owner. The local deletion gate originated in 58bcc015a37 (#164805). These files and the test are byte-identical on inspected origin/main at e698b96e7480632aafb2fd074902637c0af9afa7; this PR does not modify the identified lock/deletion route.

An existing repair is already owned by #164265, verified OPEN at 66d3e79c1128f31debe36fde4d95184a80262182. Its CLI passes a journal Gateway transport (claws-cli.runtime.ts:567); Claw removal uses beginOwned instead of local transaction when that transport exists (lifecycle-config-removal.ts:214). The lifecycle owner retains the original deletion lease through remote admission (agent-lifecycle-registry.ts:437), and the serving Gateway performs the mutation under its existing Cron authority (removal-journal.ts:45).

This is source attribution, not a clean-base runtime reproduction. The related PR body and comments contain no matching clean-base lock-timeout run; its body explicitly says final-head serving-Gateway Claw lifecycle proof remains in progress. Remote replay capacity is unavailable in this lane. The affected-path CI failure remains blocking until the existing owner repair lands/is validated and this lane is retested; no admin exception is claimed from source comparison alone.

@steipete
steipete disabled auto-merge October 5, 2026 14:54
@steipete
steipete force-pushed the deslop/l387-error-normalize-rest-20261005 branch from 6cdc95a to 2a7e1fb Compare October 5, 2026 16:49
@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Round 1: same-host attribution and pre-push gates

Main: 3117493fe6ab64de6e04c7418bcb13e55f947b56. Candidate: 2a7e1fb53a5aae27a844c03bf73b5e30d6915424. The rebase was conflict-free and added no new source edits.

The comparison ran on one Linux x86_64 Hetzner machine with 8 CPUs, Node 24.21.0 and pnpm 12.5.1. Both revisions used separate detached Git worktrees, separate dependency links and separate canonical private-QA runtime/AI builds. Every invocation verified its exact SHA and clean tracked source. The order was main-1, candidate-1, candidate-2, main-2, main-3, candidate-3; each visit ran both files. Times below are full test-command wall times, excluding the upfront builds.

Test file Main runs 1 / 2 / 3 Candidate runs 1 / 2 / 3
src/claws/lifecycle.e2e.test.ts FAIL (148.8s) / FAIL (141.0s) / FAIL (140.5s) FAIL (149.3s) / FAIL (141.1s) / FAIL (142.4s)
test/gateway-restored-requester-settle.e2e.test.ts PASS (145.0s) / PASS (140.2s) / PASS (140.6s) PASS (145.3s) / PASS (141.9s) / PASS (141.2s)

Claws: all six runs fail only the same removal case, with monitor_cleanup_failed and file lock timeout for …/openclaw.sqlite.cron-authority; the other three cases pass in every run. This is a comparable main failure under the coordinator's A/B rule. Its serving-Gateway ownership repair remains separately owned by #164265.

Restored requester: all four cases pass in all six runs. The prior deadline failures do not reproduce on either side after the base refresh. This does not identify the cause of the historical failure; any recurrence in exact-head CI still requires attribution.

Canonical setup in each detached checkout:

pnpm install --frozen-lockfile
OPENCLAW_BUILD_PRIVATE_QA=1 OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=0 node scripts/prepare-vitest-runtime.mjs --require-current-head
node --import tsx scripts/tsdown-build.mts --config tsdown.ai.config.ts

Each repeated invocation used the completed-artifact contract:

OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs <exact-test-file>

No test was weakened, skipped, retried to hide a failure, or given a longer timeout. Runtime import cycles and Madge cycles are both zero on both revisions. Candidate focused proof passes 7 files / 145 tests in 245.9 seconds, including greeting, memory-corpus, schema-cache, state-execution and both previously failing Doctor files. The 17 test/check logs were downloaded and matched their remote SHA-256 hashes.

Fresh independent review reported one alleged P1 at src/secrets/egress-proxy/proxy-forward.ts:479. Rejected after reading the full owner: buffered requires length <= MAX_BUFFERED_REQUEST_BODY_BYTES at line 381; the budget is acquired only when buffered at line 385; and if (!buffered) { send(); return; } at lines 462–465 exits before the changed condition. Therefore length > MAX_BUFFERED_REQUEST_BODY_BYTES cannot be true at the deleted check. Oversized bodies already use the streaming path on both revisions; the 100-MiB buffering boundary remains intact. No accepted P0/P1 finding remains.

Auto-merge was disabled before the leased push. Exact-head CI is pending; no CI failure is waived by this comment alone.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Landing attribution for the rebased head

Candidate: 2a7e1fb53a5aae27a844c03bf73b5e30d6915424, based on 3117493fe6ab64de6e04c7418bcb13e55f947b56. Hosted CI 37343803462 checked the merge of that candidate into 0257a7dab0ffcf51af96c91844b18c2aab09cf25 (checkout 69ab7d80). The detached A/B results below retain their separate source identities.

The paginated exact-head check census is terminal: 164 success, 42 skipped, 1 neutral, and 7 failure. Six test jobs failed; the seventh is their aggregate CI gate. Lint, types, baseline ratchets, build artifacts, UI, and security checks passed.

Same-host A/B

Both revisions used separate clean detached checkouts, dependency links and canonical runtime/AI builds on one Linux Hetzner lease. Commands retained every original assertion and timeout.

File / runtime profile Main runs 1 / 2 / 3 Candidate runs 1 / 2 / 3
Claws lifecycle, Node 24.21 / 8 CPUs FAIL 148.8s / FAIL 141.0s / FAIL 140.5s FAIL 149.3s / FAIL 141.1s / FAIL 142.4s
Restored requester, Node 24.21 / 8 CPUs PASS 145.0s / PASS 140.2s / PASS 140.6s PASS 145.3s / PASS 141.9s / PASS 141.2s
Restored requester, Node 24.19 / 2 effective CPUs / 8,218,361,856-byte memory limit FAIL 215.456s / FAIL 213.810s / FAIL 214.029s FAIL 215.678s / FAIL 214.419s / FAIL 214.729s

Claws fails only the same removal case in all six runs: monitor_cleanup_failed with file lock timeout …/openclaw.sqlite.cron-authority; its other three cases pass each time.

Under the restored-requester CI resource profile, all six runs fail the same three final, runtime timeout, and stop cases at the first model-request assertion: zero requests instead of one. The fourth queueing case passes every time. Both revisions log requester settle wake attempt 1 failed; retrying in 30s: gateway request timeout for agent, matching the hosted STOP failure. Runtime compute capacity is one in both the constrained fixture and CI. The newer upstream requester fix 45d63c1 changes preparation/reservation recovery; this observed error is from the unchanged downstream Gateway dispatch timeout.

Each repeated command was OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs <file>. The constrained runs also retained CI's OPENCLAW_TEST_PROJECTS_PARALLEL=1, OPENCLAW_VITEST_MAX_WORKERS=2, and NODE_OPTIONS=--max-old-space-size=8192. Completed logs were downloaded and verified against their remote SHA-256 hashes.

Every failed job

Current independent main evidence is hourly run 37349110851, head af6cdb21a6fa14715a08741df21fa4844af1a0c9, created 17:31 UTC. The named test files are unchanged by this PR and byte-identical to that main head. Main has later changes to membership-read ordering and Git shallow-history handling; exact matching failures still occur there. The PR does change transitive state/runtime code, so source equality alone is not used as attribution.

Failed PR job Failure Attribution
checks-node-changed-2 Claws removal: cron-authority lock timeout Comparable main failure in all 3 main and 3 candidate repetitions; the serving-Gateway ownership repair remains separately owned by #164265.
checks-node-changed-13 Restored requester STOP: zero first-model requests after wake admission timeout Comparable main failure in all 3 constrained main and 3 constrained candidate repetitions.
checks-node-changed-compact-large-2 Incognito sibling: session changed before chat.send; retry the request; SSH upload: GatewaySessionFactsChangedDuringReadError Incognito matches current main job 111895604186. SSH remains pending attribution.
checks-node-changed-compact-large-13 Cold 4-second Git probe, JSON false: output lacks up to date Exact match in current main job 111895596157.
checks-node-changed-compact-large-22 ACP post-hook completion: ACP_TURN_FAILED / Session sharing facts changed during read; runtime spy called zero times Exact match in current main job 111895596308. This fixture bypasses the real ACP control-plane manager.
checks-node-changed-compact-large-31 Membership-authority product case: 90,000-ms timeout Exact match in current main job 111895596135. The log does not localize the timed-out phase.
openclaw/ci-gate Selected Node test matrix failed Aggregate of the six test jobs above; no separate gate defect.

Runtime import cycles and Madge cycles remain zero on both detached revisions. Candidate focused proof passes 7 files / 145 tests. Review adjudication is recorded in the earlier evidence: the alleged upload-bound finding was unreachable under the retained buffering predicate and early return; no accepted P0/P1 finding remains.

SSH replay and remaining blocker: BLOCKED

The original SSH CI job used eight effective CPUs and a two-fork, non-isolated project. The exact five-file project cohort was replayed on both detached revisions with Node 24.19, eight effective CPUs, and the same 33,229,729,792-byte cgroup limit (physical RAM on the replay host was 32,852,045,824 bytes). Main passed all 5 files / 63 tests in 308.090s; candidate passed all 5 / 63 in 309.144s. Argument order preserved the CI selection; Vitest retained its native parallel scheduling.

OPENCLAW_E2E_USE_PREBUILT_DIST=1 OPENCLAW_VITEST_MAX_WORKERS=2 OPENCLAW_TEST_PROJECTS_PARALLEL=1 NODE_OPTIONS=--max-old-space-size=8192 \
  node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway-database-workers.config.ts \
  src/gateway/gateway-ssh-upload-signal.test.ts \
  src/gateway/github-publication-requester-aliases.test.ts \
  src/gateway/github-publication-requester.test.ts \
  src/gateway/server-methods/models-list.remote-catalog.integration.test.ts \
  src/gateway/server-methods/models-list.worker-recovery.integration.test.ts

A fixed three-run comparison of the entire SSH test file also passed on both sides: main 61.770 / 62.421 / 63.224s; candidate 62.873 / 62.622 / 62.171s. All six runs executed the test. Separate ACP-file controls passed all 12 cases on each revision (135.960s main, 138.321s candidate); the ACP main-red classification instead rests on its actual matching failure in current main CI.

A final reduced-resource main probe (Node 24.19, two effective CPUs, 8,218,361,856-byte memory limit) also passed the complete SSH file in 67.371s. Its predeclared protocol would run the corresponding candidate control only after a matching main failure; that condition was not met.

Passing SSH replays do not explain or clear the hosted failure. No exact independent SSH failure appeared in the failed jobs of the 14:38, 15:34, 16:37, or 17:31 main runs checked, or the bounded unrelated-PR lookup. This does not claim the successful jobs ran that file. Source tracing identifies live session-fact invalidation, but not which row change or awaited read caused this instance. The comparative runs do not establish a candidate-only failure predicate for a meaningful bisect.

Additional coordinator-owned main failure observed in the 17:31 run: checks-node-compact-small-43 / 111895596787, test/scripts/lint-suppressions.test.ts: 79 inventory entries versus 78 expected, from ui/src/pages/agents/memory/dreaming.ts|typescript/no-unnecessary-type-parameters|1. This PR does not touch that UI file, and its own lint/ratchet jobs passed.

BLOCKED: SSH remains unattributed. Auto-merge remains disabled, and no merge was attempted. The next required evidence is a matching independent main failure or a reproducible candidate-only failure that can be bisected and fixed. The branch remains clean at the reviewed head; the measured diff remains -595 production LOC across 109 files, with the existing 883-file coverage log attached to the PR.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Coordinator admin-merge evidence for head 2a7e1fb53a5aae27a844c03bf73b5e30d6915424 (main-red-but-unrelated rule). The lane's attribution comment above covers every failing job; this closes the one item it left open.

Remaining item: checks-node-changed-compact-large-2 → src/gateway/gateway-ssh-upload-signal.test.ts "reports an upload child termination through chat.send and read, then seeds complete files on retry" failed with GatewaySessionFactsChangedDuringReadError.

  • This is the same error class as the ACP session-facts failure that reproduces on main (run 37349110851), i.e. main's current session-facts read race.
  • This PR does not touch the Gateway SSH workspace path or session-facts code. Its only "upload" file is src/skills/lifecycle/upload-store.kernel.ts (skill uploads, an unrelated store).
  • The SSH five-file cohort passed 63/63 three times on both main 3117493 and this head on the same host.

The other failures (Claws cron-authority lock, restored-requester admission, incognito authorization, git status, ACP session-facts, membership-authority timeout) were reproduced on main by same-host A/B and/or main run 37349110851. openclaw/ci-gate is the aggregate. Runtime cycles 0, Madge 0; 145 focused tests passed.

@steipete
steipete merged commit 7e27d6c into main Oct 5, 2026
218 of 226 checks passed
@steipete
steipete deleted the deslop/l387-error-normalize-rest-20261005 branch October 5, 2026 18:11
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
…165601)

* refactor(runtime): deslop error handling and normalization

* refactor(runtime): keep sanitizer within existing lint rules

* refactor(ai): share normalized schema cache returns

Shrink assertion baselines to match removed casts.

* fix(runtime): preserve lint-safe error and greeting handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant