Skip to content

refactor(agents): deslop runners, harness and recovery - #157294

Merged
steipete merged 3 commits into
mainfrom
deslop/l35-runner-owners
Sep 25, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/l35-runner-owners

Conversation

@steipete

@steipete steipete commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Agent runners, harness adapters, failover classification and main-session recovery repeat setup and projection logic, leaving multiple places to maintain the same decisions.

User Impact

No user-visible behavior change is intended. CLI/config, model routing, transcript bytes, retry ordering, custody and live-authority contracts are preserved. The shipped SDK testing signatures, including the retired-file helpers, are retained. No config, schema, protocol or dependency changes.

Why This Change Was Made

The original runner sweep is extended into the coordinator-assigned harness, failover and recovery owners. Existing owners now serve these duplicated paths:

  • CLI reply-backend attachment and terminal results; embedded auth installation, timeout bounds, stream decoration and per-index tool-call repair state.
  • Harness auto-selection hints, lazy support probing and deterministic ranking; structured-input defaults and answer batching; direct Codex relay adaptation and ordered metadata projection.
  • Failover classification and error metadata; canonical record/string normalization and active auth-copy policy.
  • Recovery live-owner lookup, foreground-claim removal, assistant tool-call parsing and tombstone dispatch.
  • Shared Markdown fencing, tool-media facts and lazy middleware acquisition.

Authority checks after awaits, disposal custody, prompt/tool descriptions and transcript ordering remain intact. No tests were changed or removed. The assertion baseline update only removes allowances for deleted assertions. The sweep leaves tools, sandbox, subagents and sessions owners untouched.

Fixes Found Along the Way

No separate product bug or test flake was identified during the source sweep. Review restored a billing guard before validation: compact HTTP429 text can reach the JSON error classifier, so that check is required. A zero-line-savings reply-fact projection was also dropped after a real helper probe showed that it changed empty serialized reasons from undefined to an empty string; the original normalization is retained.

Evidence

The requested non-test measurement is:

git diff --shortstat "$(git merge-base origin/main HEAD)" -- . \
  ':(exclude)**/*.test.*' ':(exclude)**/test/**' ':(exclude)docs/**'
# 83 files changed, 1137 insertions(+), 2319 deletions(-)

That removes 1,182 net non-test lines, including six assertion-baseline lines; production TypeScript removes 1,176 net lines.

Validation ran on sequential Blacksmith Testbox leases, with final compatibility proof on tbx_01m3aqghdrtyw44jpjw26pbgph through scripts/crabbox-wrapper.mjs run --provider blacksmith-testbox --id … --keep --timing-json -- OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 …. The remote payload verifies the exact bytes of all 83 changed files before running checks, with a frozen-lockfile install first.

Proof Result
pnpm install --frozen-lockfile PASS
Targeted node scripts/run-oxlint.mjs PASS; no warnings/errors; 123.48 s
node scripts/check-changed.mjs PASS; 2,136.90 s
pnpm plugin-sdk:check-exports PASS; 0.18 s
pnpm plugin-sdk:surface:check PASS; 4.12 s
pnpm build PASS; 504.37 s
node scripts/run-vitest.mjs — 604 focused/cross-shard core test files PASS; 2,592.70 s
Scoped scripts/test-projects.mts — 78 plugin consumer test files PASS; 433.19 s
node scripts/run-vitest.mjs --config test/vitest/vitest.e2e.config.ts — 12 E2E files PASS; 953.33 s
19 compaction/foreground-resource/lifecycle files, five runs PASS ×5; 101.78 / 56.83 / 57.76 / 54.60 / 59.37 s
Independent Codex autoreview, P0–P2 Scoped-clean; five full-diff passes plus one restoration pass; no actionable findings
Exact-head GitHub CI PASS on 220b558a29993dbb3743e699bbdb87248e88e89c; CI run, aggregate gate

The first lease workflow was cancelled during E2E artifact preparation after the checks, build, core and plugin phases had passed. Its workflow was a workflow_dispatch lease run on the base, not this PR’s CI. Blacksmith confirmed it was stopped. The unfinished E2E and repeated lifecycle phases resumed on replacement lease tbx_01m3ak03znfns1anstqgph8316, with source hashes and frozen install checked again. No completed test phase was retried for a greener result. Two SSH launches on the replacement failed before executing the proof (mm_send_fd: Message too long); a smaller command envelope retained the same aggregate verification of all 83 file hashes and launched successfully. Lease workflows: initial, replacement.

node scripts/watch-pr-ci.mjs 157294 220b558a29993dbb3743e699bbdb87248e88e89c --repo openclaw/openclaw --attach-timeout 900 --timeout 3600 --interval 120 exited 0 with GREEN. The exact-head CI workflow and aggregate gate succeeded; the watcher excluded seven superseded check records. All task-owned Testbox leases are stopped. The PR remains open and ready for coordinator review, with no merge or auto-merge requested.

The previous ClawSweeper SDK-signature finding is addressed by the verified restoration. Its asynchronous full-review refresh remains pending; independent Codex autoreview and the required aggregate CI gate are green.

The test inventory includes module/export consumer searches across src/, extensions/, packages/, ui/, apps/, scripts/ and test/, including test/scripts/plugin-sdk-surface-report.test.ts. E2E coverage includes the native hook relay through a real Gateway and pinned Codex CLI against a synthetic local Responses server. No external live-provider result is claimed. No tests were added or changed, so this PR adds no ongoing test cost.

Review identified the two retired-file testing methods as shipped SDK members; both methods and the nativeHookRelayTesting export through openclaw/plugin-sdk/agent-harness-runtime were verified in v2026.9.6. Their original signatures and throwing behavior are restored. The restoration costs seven lines and keeps the production reduction above the campaign threshold. Follow-up changed checks, SDK gates, build, 25 core native-hook/SDK files (194.41 s), 12 plugin consumer files (125.94 s), and five lifecycle runs all passed on tbx_01m3aqghdrtyw44jpjw26pbgph (lease workflow). The table records the final changed/SDK/build/lifecycle results. The broader 604-file core, 78-file plugin and 12-file E2E proofs preceded only this seven-line restoration; all other source bytes are unchanged.

A previous-base changed check found an unchanged 1,032-line failover test above its 1,000-line limit. Main had already fixed that in #157406; rebasing onto 0603d46c1b7616efb6fe99225498487aea3e9470 picked up the owner fix and the current changed gate passes. No budget, timeout, assertion or ignore was weakened. Review remains valid after the rebase: both reviewed patches are unchanged, and the newly incorporated harness registry cleanup was inspected for interaction.

This checkout has no plugin-sdk:api:check command; its declared gates are plugin-sdk:check-exports, plugin-sdk:surface:check, and test/scripts/plugin-sdk-surface-report.test.ts.

The earlier array-details review finding was corrected: asOptionalObjectRecord accepts arrays. An isolated real-SQLite recorder round trip preserved heterogeneous-array, empty-array and object details. The consolidated tool-call repair map is allocated per stream and cleared when the stream settles; it does not change a persisted data model and requires no migration.

Codex contracts were inspected directly at upstream commit 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157: native hook metadata/permission decisions, structured question and MCP form schemas, model-list ownership, turn outcomes, retry categories and compaction.

Production-file coverage: 196 modules over 200 lines

l35 runners, harness, failover and recovery coverage

Rebased baseline: 0603d46c1b7616efb6fe99225498487aea3e9470. The original runner sweep covered all 142 production modules over 200 lines; the extension sweep read every harness, failover and recovery production module, largest first. This combined inventory has 196 modules over 200 lines, sorted by pre-extension-sweep size. Test corpora, fixtures and test harnesses are excluded. All smaller production modules were also read.

Lines Production module Coverage and result
2279 src/agents/cli-runner/prepare.ts READ — Simplified auth-resolution error construction and removed the one-use invalidation forwarder; admission, tool, auth, prompt, and context-engine phases retain distinct contracts.
1839 src/agents/embedded-agent-runner/runs.ts READ — Consolidated index clearing, abandonment lookup, and rejection envelopes; retained shipped injection compatibility and exact-owner cleanup.
1609 src/agents/embedded-agent-runner/tool-result-truncation.ts READ — Collapsed recovery wrapper; projection freezing, TTL restoration, aggregate allocation, and canonical recovery retain distinct byte and lifecycle contracts.
1013 src/agents/embedded-agent-runner/extra-params.ts READ — Prior cleanup retained; provider wrappers, alias precedence, request-scoped overrides, and transport policy have distinct behavior.
931 src/agents/embedded-agent-runner/replay-history.ts READ — Persisted malformed and legacy transcript repair preserves usage, signed thinking, pairing, and model-switch bytes; no safe common flow established.
755 src/agents/embedded-agent-runner/run/attempt-session-prepare.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
754 src/agents/harness/native-hook-relay-permissions.ts READ — removed fingerprint test forwarders; retained exact invocation deduplication, input/content grants, and post-await authority checks.
749 src/agents/embedded-agent-runner/model.static-catalog.ts READ — Manifest and provider-discovery catalogs retain distinct ownership and trust contracts; caches are generation-scoped.
747 src/agents/embedded-agent-runner/run/attempt-llm-boundary.ts READ — Preserve transcript bytes, identity-first matching, ordering, and canonical persistence ownership.
745 src/agents/embedded-agent-runner/compact.queued.ts READ — Queue admission, native ownership and background transfer retain distinct lifecycle contracts.
744 src/agents/harness/gateway-question.ts READ — secret input consumes the canonical gateway-question parameter contract directly; retained all claim/registration/answer receipt fences.
742 src/agents/embedded-agent-runner/run-orchestrator.ts READ — Kept explicit candidate projections under house lint; resource custody and generation cleanup remain distinct owners.
741 src/agents/main-session-recovery/main-session-recovery-state.ts READ — foreground token release now uses the same projection as lifecycle settlement; observation, reservation, generation, tombstone and admission transitions retained.
732 src/agents/harness/selection.ts READ — Retained run/settled-finalization authority handoffs, immutable route selection and post-await model policy validation; these phases have different permissions.
730 src/agents/embedded-agent-runner/run/terminal-resolution.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
725 src/agents/harness/host-capability.ts READ — Reused canonical ASCII-control validation; closure-bound tools, approvals, media, retained authority and post-await guards remain distinct contracts.
723 src/agents/embedded-agent-runner/run/images.ts READ — Merged image path matching and removed loading forwarder; preserved hydration/order/security.
719 src/agents/cli-runner/execute.ts READ — Queue admission, fork-successor persistence, credential binding, environment construction, and cleanup ordering are distinct execution contracts.
715 src/agents/embedded-agent-runner/model.configured-overrides.ts READ — Configured, discovered, alias, and fallback metadata have deliberately different precedence.
713 src/agents/embedded-agent-runner/run/run-attempt-dispatch.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
713 src/agents/embedded-agent-runner/compaction-session-execution.ts READ — Removed compaction hook adapter call; retained replay, cancellation, token accounting and transcript commit ordering.
711 src/agents/embedded-agent-runner/run-entry.ts READ — Fallback custody, terminal acceptance, escalation, and settlement have distinct contracts; no safe larger removal.
704 src/agents/embedded-agent-runner/context-engine-maintenance.ts READ — Coalescing, task settlement and shared-engine resource custody are intentional separate responsibilities.
693 src/agents/embedded-agent-runner/run-loop.ts READ — Retry, recovery, and terminal stages already delegate to their owners; collapsing parameter flows would introduce a broad context abstraction.
693 src/agents/cli-runner/execute-tool-tracking.ts READ — Bounded correlation, ambiguity groups, delivery evidence, and capture-drain fencing enforce distinct accounting and authority invariants.
692 src/agents/embedded-agent-runner/run/auth-controller.ts READ — Consolidated credential installation; retained the existing failover guard and AWS/profile semantics.
685 src/agents/cli-runner/execute-plugin.ts READ — Consolidated reply-operation attachment; retained native policy translation, approval revalidation, watchdog accounting, and iterator closure.
679 src/agents/harness/native-hook-relay.ts READ — direct canonical test helpers replace forwarders; retained the shipped retired-file helper signatures; direct single Codex adapter replaces provider lookup.
679 src/agents/embedded-agent-runner/run/attempt-stream-settle.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
675 src/agents/embedded-agent-runner/run/settled-turn-finalization.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
671 src/agents/cli-runner/cli-run-settlement.ts READ — Terminal auth settlement, delivered failures, session-binding state, and normal results have distinct observable projections.
665 src/agents/embedded-agent-runner/run/attempt.tool-call-argument-repair.ts READ — Unified per-index repair state and canonical JSON/record helpers; preserved parser grammar.
664 src/agents/failover/user-copy.ts READ — Replaced inert auth-copy descriptor fields with the active direct-copy entries and recovery reasons; removed repeated billing-auth validation. Copy strings and reason selection remain unchanged.
659 src/agents/main-session-recovery/main-session-restart-recovery-store.ts READ — shared live-owner lookup and one tombstone execution path; custody, post-await cancellation checks, delivery replay and transcript checkpoint branches retained.
653 src/agents/harness/types.ts READ — SDK contracts retain explicit 2026.9/2026-10-12 compatibility dates; capability facets distinguish actual operations and closure-bound authority. No safe retirement.
648 src/agents/embedded-agent-runner/compact.queued-execution.ts READ — Removed compaction hook adapter call; retained synchronous commit fences and successor settlement.
632 src/agents/embedded-agent-runner/prepared-compaction-runtime.ts READ — Kept distinct prompt-context types after compilation rejected widening; skill rollback and tool runtime custody remain intact.
630 src/agents/main-session-recovery/main-session-restart-dispatch.ts READ — reuse canonical subsystem logger; admitted reservation rollback, ambiguous RPC reconciliation and dispatch start custody retained. Both existing sanitation passes remain because the composed sanitizer has no explicit idempotence contract.
615 src/agents/harness/structured-input-schema.ts READ — shared buildField now owns absent/default handling for all five scalar/choice decoders.
613 src/agents/embedded-agent-runner/run/attempt-finalize.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
611 src/agents/embedded-agent-runner/thinking.ts READ — Prior cleanup retained; Promise rejection, event failure, and consumer-close paths have distinct retry and settlement requirements.
610 src/agents/embedded-agent-runner/compact.ts READ — Native CLI, direct compaction and auth-aware fallback preserve separate routes and cleanup custody.
602 src/agents/embedded-agent-runner/run/compaction-runtime.ts READ — Preserve canonical window pressure, writer fences, and compaction/truncation/continuation order.
601 src/agents/embedded-agent-runner/google-prompt-cache.ts READ — Combined duplicate credential-header parsing and sentinelization; reused canonical SHA-256 helper.
596 src/agents/embedded-agent-runner/run/attempt-stream-prepare.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
595 src/agents/embedded-agent-runner/run/attempt-prompt-build.ts READ — Preserve transcript bytes, identity-first matching, ordering, and canonical persistence ownership.
594 src/agents/embedded-agent-runner/run/attempt-prompt-helpers.ts READ — Preserve generation-owned prompt inputs, context bounds, and deterministic provider/prompt ordering.
591 src/agents/embedded-agent-runner/run/attempt.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
587 src/agents/embedded-agent-runner/run/llm-idle-timeout.ts READ — Unified idle/first-event locality classification and timeout bound resolution.
585 src/agents/embedded-agent-runner/run/runtime-preparation.ts READ — Preserve distinct auth ownership, profile rotation, error precedence, and credential-scoped prepared state.
577 src/agents/cli-runner/bundle-mcp.ts READ — Unified hash serialization through sha256Hex and removed the duplicate recursive sort while preserving fingerprint bytes.
562 src/agents/cli-runner/execute-process.ts READ — Consolidated reply-operation attachment; retained distinct parser, supervisor, cancellation, and failure-classification paths.
558 src/agents/embedded-agent-runner/run/attempt-recovery.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
555 src/agents/harness/compaction.ts READ — Retained route-locked auth convergence and native compaction capability ownership; pre/post selection checks fence different decisions.
550 src/agents/cli-runner/session-history.ts READ — Reset/compaction selection, account boundaries, durable-note selection, and Unicode-safe prompt budgets are separate retained contracts.
550 src/agents/cli-runner/model-call-diagnostics.ts READ — Removed the duplicate assistant-text predicate; retained bounded content capture, fallback reserve, and byte/item accounting.
547 src/agents/harness/execution-environment.ts READ — Retained consent, sandbox, sender/group/native-tool policy precedence and exact session-incarnation restrictions.
545 src/agents/cli-runner/helpers.ts READ — Prompt, argument, image, and queue adapters remain distinct; the reliability re-export has callers outside this subtree.
538 src/agents/cli-runner/cli-run-transcript.ts READ — Admission, fallback transcript-writer fencing, visibility projection, and context-engine turn finalization retain distinct ownership contracts.
537 src/agents/embedded-agent-runner/model.ts READ — Prepared lookup, dynamic discovery, static fallback, and authority checks have distinct ordering.
534 src/agents/embedded-agent-runner/tool-result-context-guard.ts READ — Transcript and provider projections, engine hooks, and tool-limit hooks have distinct custody and failure behavior.
524 src/agents/embedded-agent-runner/run/payloads.ts READ — Preserve canonical/streamed answer reconciliation, delivery projections, and user-visible error copy.
522 src/agents/embedded-agent-runner/delivery-evidence.ts READ — Replaced local normalization helpers; retained aggregate, visible, committed, and current-source distinctions.
514 src/agents/embedded-agent-runner/run/assistant-failure.ts READ — Preserve distinct auth ownership, profile rotation, error precedence, and credential-scoped prepared state.
511 src/agents/harness/context-engine-turn-outbox.ts READ — Retained durable admitted/accepted/ready/blocked state transitions, enqueue order and cross-session fairness; no storage/schema changes.
510 src/agents/embedded-agent-runner/run/attempt-setup.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
506 src/agents/embedded-agent-runner/run/attempt-prompt-phase.ts READ — Preserve generation-owned prompt inputs, context bounds, and deterministic provider/prompt ordering.
498 src/agents/main-session-recovery/main-session-restart-recovery-resume-policy.ts READ — canonical object coercion, shared pending assistant content validation and collapsed equivalent reply states; precise legacy abort contract, Code Mode checkpoint order and restart-safe decisions retained.
495 src/agents/embedded-agent-runner/run/attempt.model-diagnostic-lifecycle.ts READ — Made the timing type private after its external wrapper disappeared; retained completion guards and nonblocking dispatch.
494 src/agents/main-session-recovery/main-session-restart-recovery-checkpoint.ts READ — one assistant tool-call parser serves correlation and sibling-work rejection; source-turn boundaries, aliases, transcript ordering and atomic append/settlement retained.
490 src/agents/embedded-agent-runner/model.registry-resolution.ts READ — Suppression, explicit resolution, dynamic runtime preference, and fallback differ in authority.
489 src/agents/embedded-agent-runner/run/session-bootstrap.ts READ — Preserve transcript bytes, identity-first matching, ordering, and canonical persistence ownership.
487 src/agents/harness/lifecycle.ts READ — Retained diagnostics and normalization for dated legacy harness result contracts; finalization and ordinary attempts have different validation and completion outcomes.
487 src/agents/embedded-agent-runner/run/types.ts READ — Preserve public harness types and documented plugin compatibility contracts.
482 src/agents/embedded-agent-runner/run/attempt-stream.ts READ — Cut over Xai decoding to canonical decoder and preserved stream wrapper ordering.
480 src/agents/harness/tool-result-middleware.ts READ — Removed duplicate resolved-handler cache; lazy promise loader owns acquisition/retry while validation and delivery-receipt fallback remain intact.
479 src/agents/harness/model-catalog.ts READ — Catalog acquisition, route-donor precedence, failed-provider retention, generation revalidation, and native readiness are distinct owner contracts; retained unchanged.
474 src/agents/main-session-recovery/main-session-restart-recovery-marking.ts READ — shared live-owner lookup and direct finite-number helper; synchronous commit authority revalidation and yielded continuation custody retained.
472 src/agents/embedded-agent-runner/run/lane-controller.ts READ — Preserve independent lane custody, evolving deadlines, and abort-error normalization.
468 src/agents/embedded-agent-runner/run/attempt-tool-call-replay-sanitization.ts READ — Shared signed-replay detection and final projection, and canonical result-ID normalization.
461 src/agents/embedded-agent-runner/run/attempt-system-prompt-prepare.ts READ — Preserve generation-owned prompt inputs, context bounds, and deterministic provider/prompt ordering.
453 src/agents/embedded-agent-runner/run/attempt-tool-prepare.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
451 src/agents/embedded-agent-runner/run/overflow-context-recovery.ts READ — Preserve canonical window pressure, writer fences, and compaction/truncation/continuation order.
443 src/agents/failover/classification-rules.ts READ — Removed the single-caller error-type classification adapter and duplicate provider-normalization wrappers. HTTP status precedence and provider billing overrides remain unchanged.
436 src/agents/cli-runner/execute-events.ts READ — Prior pass already consolidated event ownership; start/result activity and terminal diagnostic ordering must remain distinct.
434 src/agents/embedded-agent-runner/run/attempt-result.ts READ — Preserve current-attempt usage precedence, compaction accounting, and cumulative replay boundaries.
429 src/agents/embedded-agent-runner/run/attempt-history.ts READ — Preserve transcript bytes, identity-first matching, ordering, and canonical persistence ownership.
428 src/agents/harness/runtime-plugin-load-plan.ts READ — Replaced the local trim/drop-empty/stable-dedupe implementation with normalization-core's canonical helper; preserved activation, allowlist, provider-owner, and sorting behavior.
426 src/agents/embedded-agent-runner/run/attempt-settle.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
421 src/agents/failover/classify-core.ts READ — Absorbed the single-caller legacy pattern adapter, reused narrowed classification facts, and removed HTML/auth checks already settled by the ordered caller. Predicate order remains unchanged.
418 src/agents/embedded-agent-runner/run/attempt-queue-message.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
417 src/agents/harness/context-engine-lifecycle.ts READ — Retained transcript read fencing, plugin result validation, per-message failure isolation and optional afterTurn/ingest contracts.
411 src/agents/embedded-agent-runner/run/incomplete-turn-recovery.ts READ — Removed repeated compatible-input projections; preserved replay and visibility gates.
407 src/agents/embedded-agent-runner/direct-compaction-preparation.ts READ — Removed unused constant SQLite-transcript flag; retained ordered auth and sandbox preparation.
406 src/agents/embedded-agent-runner/run-state.ts READ — Retained singleton field initialization compatibility because mixed or reloaded runtime chunks can share the state.
402 src/agents/harness/native-hook-relay-bridge.ts READ — transport auth, record publication, renewal, and cleanup are distinct required lifecycle phases; no sound further collapse identified.
399 src/agents/embedded-agent-runner/prompt-cache-observability.ts READ — Replaced local SHA-256 implementation with canonical helper; fingerprint bounds and request tracking remain necessary.
398 src/agents/embedded-agent-runner/run/params.ts READ — Preserve public harness types and documented plugin compatibility contracts.
394 src/agents/embedded-agent-runner/run/failover-retry-controller.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
390 src/agents/embedded-agent-runner/run/incomplete-turn-resolution.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
389 src/agents/embedded-agent-runner/run/preemptive-compaction.ts READ — Preserve canonical window pressure, writer fences, and compaction/truncation/continuation order.
384 src/agents/embedded-agent-runner/compaction-runtime-context.ts READ — Model alias precedence, runtime ownership and prompt context projection have separate public contracts.
379 src/agents/embedded-agent-runner/compaction-successor.ts READ — Structured successor and legacy shipped-engine resolution preserve exact store binding and writer fences; no safe deletion.
378 src/agents/embedded-agent-runner/run/prompt-failure.ts READ — Preserve distinct auth ownership, profile rotation, error precedence, and credential-scoped prepared state.
378 src/agents/embedded-agent-runner/run/attempt.model-diagnostic-observation.ts READ — Observer methods absorb one-use forwarding helpers without changing recorded fields.
372 src/agents/main-session-recovery/main-session-restart-recovery-runtime.ts READ — retries own distinct startup, exact-target and owner-release admissions and cancellation lifetimes; no sound further consolidation.
372 src/agents/embedded-agent-runner/run/attempt-prompt-support.ts READ — Preserve explicit tool authority projection, separate construction/execution policy, and stable refresh collections.
358 src/agents/embedded-agent-runner/types.ts READ — Public and shared result fields encode distinct contracts; no proven dead surface.
357 src/agents/embedded-agent-runner/compaction-hooks.ts READ — Removed duplicate hook-runner type and forwarding adapter; use canonical HookRunner methods.
356 src/agents/embedded-agent-runner/run/terminal-preparation.ts READ — Removed duplicate missing-payload fallback; preserved terminal metadata and timeout recovery.
354 src/agents/failover/message-patterns.ts READ — Retained explicit provider/auth/billing/transport regex contracts and public SDK predicates; patterns distinguish token budgets from throttling and deterministic payload rejection.
353 src/agents/embedded-agent-runner/run/model-setup.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
352 src/agents/main-session-recovery/main-session-recovery-store.ts READ — exact-key-first then token-bound alias recovery differs intentionally per command; no safe removal of write-admission or identity fences.
344 src/agents/embedded-agent-runner/run/tool-media-payloads.ts READ — Canonical URL normalization and common standalone payload assembly; preserved trust/voice policy.
339 src/agents/embedded-agent-runner/model.manifest-alias.ts READ — Endpoint eligibility and first-match API selection cannot safely share a selected model when duplicate rows exist.
337 src/agents/embedded-agent-runner/run/attempt-prompt-submit.ts READ — Preserve generation-owned prompt inputs, context bounds, and deterministic provider/prompt ordering.
334 src/agents/harness/native-hook-relay-types.ts READ — removed adapter metadata callback after moving invocation normalization directly onto its sole owner; other types encode SDK/custody contracts.
334 src/agents/harness/native-hook-relay-events.ts READ — pre/post/finalize paths enforce different authority and projection contracts; retained those boundaries.
334 src/agents/cli-runner/execute-node-claude.ts READ — Consolidated reply-operation attachment, repeated timeout envelopes, and RunExit projection while preserving cancellation and stderr timing.
334 src/agents/cli-runner/cli-live-session-registry.ts READ — Registry keys, generations, exact handle ownership, retained cleanup, and capacity admission enforce independent lifecycle invariants.
332 src/agents/harness/support.ts READ — Canonicalized auto-selection hint/probe/filter/order with execution selection; one lazily prepared support context and each eligible harness probed once.
330 src/agents/harness/tool-result-facts.ts READ — Telemetry delegates media extraction, trust filtering and URL deduplication to the existing media fact owner; delivery/TTS evidence stays separate.
326 src/agents/embedded-agent-runner/run/attempt-normalization.ts READ — Preserve current-attempt usage precedence, compaction accounting, and cumulative replay boundaries.
324 src/agents/harness/user-input-bridge.ts READ — prompt strings and normalization preserve exact option ordering and secret/multi-question presentation; no sound reduction identified.
322 src/agents/embedded-agent-runner/result-fallback-classifier.ts READ — Replay vetoes, visible output, deliberate silence, provider errors, and harness classifications remain distinct.
321 src/agents/cli-runner/cli-native-tool-approval.ts READ — Native approval semantics, complete command display, mutable operand binding, and post-approval validation are required security boundaries.
318 src/agents/embedded-agent-runner/run/history-image-prune.ts READ — Shared text pruning and canonical record normalization; preserved sparse and legacy handling.
317 src/agents/harness/structured-input.ts READ — bounded form/URL compilation has distinct schema, synthetic-field, and navigation contracts; retained validation.
317 src/agents/cli-runner/bundle-mcp-codex.ts READ — SDK-facing configuration projection and native-policy admission have live public callers; reviewed the sibling Codex override contract.
312 src/agents/embedded-agent-runner/run/tool-error-warning.ts READ — Preserve canonical/streamed answer reconciliation, delivery projections, and user-visible error copy.
311 src/agents/embedded-agent-runner/run/attempt-tool-call-stream-normalization.ts READ — Shared duplicate-attempt handling and removed unreachable private state fallback.
302 src/agents/embedded-agent-runner/run/setup.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
299 src/agents/embedded-agent-runner/run/attempt-tool-construction-plan.ts READ — Preserve explicit tool authority projection, separate construction/execution policy, and stable refresh collections.
299 src/agents/embedded-agent-runner/run/attempt-session-runtime-prepare.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
297 src/agents/embedded-agent-runner/cli-backend-dispatch.ts READ — Dispatch gates preserve subscription routing, restricted tools, transcript custody, and detached-session behavior.
297 src/agents/cli-runner/types.ts READ — Already composes shared run-context types; remaining private transport and lifecycle distinctions describe meaningful contracts.
287 src/agents/embedded-agent-runner/stream-resolution.ts READ — Native, custom, provider, and boundary-aware streams intentionally differ in authentication and cache wrapping.
287 src/agents/embedded-agent-runner/run/attempt-prompt-preflight.ts READ — Unified measured recovery facts and truncation/no-op result construction.
287 src/agents/embedded-agent-runner/compaction-runtime-preparation.ts READ — Shared auth/harness convergence already has one owner; cannot merge distinct selection contracts.
282 src/agents/harness/context-engine-turn-attempt.ts READ — Retained exact transcript-boundary admission, accepted-turn validation and durable advancement before maintenance.
282 src/agents/embedded-agent-runner/run/incomplete-turn-classification.ts READ — Removed repeated compatible-input projections; preserved replay and visibility gates.
278 src/agents/embedded-agent-runner/run-entry-terminal.ts READ — Channel versus command terminal metadata deliberately differ; terminal receipt and reply owners retained.
276 src/agents/embedded-agent-runner/run/attempt-bundle-tools.ts READ — Preserve explicit tool authority projection, separate construction/execution policy, and stable refresh collections.
276 src/agents/embedded-agent-runner/openrouter-model-capabilities.ts READ — Existing persisted catalog and miss-refresh behavior retained; storage-owner migration is beyond this behavior-neutral scope.
274 src/agents/embedded-agent-runner/message-visibility.ts READ — Visible, silent, intermediate, and committed terminal output are independent product contracts.
271 src/agents/harness/selection-decision.ts READ — Reused support owner's auto-selection, removed the one-call list wrapper and duplicate selected/unselected return; removed an unnecessary support cast.
271 src/agents/harness/native-session/binding-leases.ts READ — acquisition, renewal, nested reuse, release, and retained cleanup assert distinct owner phases; no custody checks removed.
268 src/agents/embedded-agent-runner/model.provider-hooks.ts READ — Prior cleanup retained; lightweight target and full runtime hooks intentionally differ; cost normalization preserves extra metadata and identity.
266 src/agents/harness/context-engine-logical-turn.ts READ — Retained selection pinning, degradation rules and deferred resource custody; disposal ordering is latency-sensitive.
265 src/agents/embedded-agent-runner/run/auth-profile-success.ts READ — Preserve distinct auth ownership, profile rotation, error precedence, and credential-scoped prepared state.
264 src/agents/embedded-agent-runner/run/attempt.model-diagnostic-events.ts READ — Made the timing type private after its external wrapper disappeared; retained completion guards and nonblocking dispatch.
261 src/agents/embedded-agent-runner/run/session-prompt-state.ts READ — Preserve transcript bytes, identity-first matching, ordering, and canonical persistence ownership.
261 src/agents/embedded-agent-runner/run/attempt-history-prepare.ts READ — Preserve transcript bytes, identity-first matching, ordering, and canonical persistence ownership.
256 src/agents/embedded-agent-runner/run/attempt-client-tools.ts READ — Preserve explicit tool authority projection, separate construction/execution policy, and stable refresh collections.
253 src/agents/main-session-recovery/main-session-recovery-lifecycle.ts READ — foreground token release delegates to canonical clear owner; terminal projection preserves other owners and same-ID newer generations.
253 src/agents/cli-runner/mcp-grant-context.ts READ — Narrow authority projection and normalization are intentional; spreading broader run state would weaken the boundary.
252 src/agents/embedded-agent-runner/run/auth-plan.ts READ — Collapsed repeated store loading/options; preserved provider pin and harness routing.
249 src/agents/embedded-agent-runner/run/attempt-tool-catalog.ts READ — Preserve explicit tool authority projection, separate construction/execution policy, and stable refresh collections.
245 src/agents/harness/lifecycle-hook-helpers.ts READ — Retained independent hook semantics and bounded retry budget; no sound further merge without broadening hook contracts.
245 src/agents/embedded-agent-runner/transcript-rewrite.ts READ — Exact suffix replay, id relocation and replay-checkpoint invalidation are required persisted-state contracts.
245 src/agents/embedded-agent-runner/run/attempt-async-tasks.ts READ — Preserve independent lane custody, evolving deadlines, and abort-error normalization.
242 src/agents/embedded-agent-runner/cli-backend-dispatch-transcript.ts READ — Canonical object coercion replaces local casts and details reader; append order, abort flush, and transcript content preserved.
241 src/agents/embedded-agent-runner/run/failover-policy.ts READ — Preserve distinct auth ownership, profile rotation, error precedence, and credential-scoped prepared state.
239 src/agents/embedded-agent-runner/run/helpers.ts READ — Preserve error/usage policy; a small resolveActiveErrorContext forwarding wrapper remains.
238 src/agents/harness/structured-input-execution.ts READ — one answer/cancellation/projection path serves secret and ordinary batches; secret batch size stays one and ordinary stays three.
238 src/agents/embedded-agent-runner/model.inline-provider.ts READ — Accepted API list differs from configuration vocabulary by pi-messages; unifying would change behavior.
236 src/agents/harness/tool-surface-bridge.ts READ — Retained prepared versus native projection, deferred-call support, catalog cleanup and prompt tool policy contracts.
236 src/agents/embedded-agent-runner/model.configured-fallback.ts READ — Fallback sizing, transport, and reasoning differ from discovered override behavior.
234 src/agents/harness/structured-input-boundary.ts READ — bounded descriptor snapshot protects untrusted/accessor payloads; retained independent depth, key, array, and character limits.
233 src/agents/harness/prompt-compaction-hook-helpers.ts READ — Retained exact prompt assembly order, whole bounded additions and independent before/after compaction payload contracts.
228 src/agents/harness/runtime-plugin.ts READ — Missing registration diagnostics distinguish disabled, unverified, degraded, and loaded-but-unregistered owners; retained authority and exact-root checks.
228 src/agents/harness/native-hook-relay-store.kernel.ts READ — write, renewal, deletion, and prune have different conditional-write ownership contracts; no SQL/schema changes.
228 src/agents/embedded-agent-runner/run/attempt-transcript-lifecycle.ts READ — Preserve nested FIFO writes, primary/drain error precedence, and actual-drain-owned context disposal.
227 src/agents/embedded-agent-runner/sandbox-skills.ts READ — Shared workspace-to-container mapping parameters across four skill path fields.
225 src/agents/embedded-agent-runner/run/provider-review-run.ts READ — Preserve single-attempt review custody, exact-input validation, live authority, and target-bound refusal state.
224 src/agents/failover/assistant-request-failure-copy.ts READ — Retained bounded, sanitized user-facing copy and recorded-error classification; raw/provider/schema branches protect distinct copy and privacy contracts.
224 src/agents/cli-runner/run-diagnostics.ts READ — Run and harness traces intentionally have different identities, terminal states, and error projections.
223 src/agents/embedded-agent-runner/run/deferred-lifecycle-owner.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.
222 src/agents/harness/native-hook-relay-client.ts READ — stale-owner retry, registration deadline, response bounds, and settled transport behavior remain required.
222 src/agents/embedded-agent-runner/history.ts READ — Amortized eviction and ambiguous account/peer session parsing protect prompt stability and account isolation.
219 src/agents/cli-runner/history-boundary.ts READ — Account-coverage checkpoints, transcript watermarks, and synchronous write-fence checks protect separate authority invariants.
218 src/agents/embedded-agent-runner/run/attempt-context-engine-helpers.ts READ — Removed timestamp forwarder; preserved cache observation and post-compaction usage boundaries.
217 src/agents/embedded-agent-runner/session-prompt-state.ts READ — Bounded projection cache preserves exact transcript hashes and deterministic project ordering.
215 src/agents/harness/native-hook-relay-utils.ts READ — full payload admission and bounded diagnostic snapshot intentionally have different limits; preserved UTF-16 charging.
215 src/agents/cli-runner/cli-run-recovery.ts READ — Fork-before-fresh recovery sequencing, delivery stop conditions, and monotonic budgets retain distinct behavior.
213 src/agents/cli-runner/execute-logging.ts READ — Allowlisted secret-presence reporting and prompt/image argument redaction remain distinct from execution logging.
210 src/agents/failover/error.ts READ — Derived constructor metadata from the canonical error class rather than redeclaring it. Retained error graph traversal, serialization recognition, property order, and timeout/abort distinction.
210 src/agents/embedded-agent-runner/run/attempt-tool-call-name-resolution.ts READ — Removed redundant admitted-set checks and duplicate candidate storage.
208 src/agents/harness/tool-authority.runtime.ts READ — Retained live source/worker/operation fences and exact question authority binding; checks guard different publication boundaries.
208 src/agents/embedded-agent-runner/run/pre-persisted-user-turn.ts READ — Preserve transcript bytes, identity-first matching, ordering, and canonical persistence ownership.
206 src/agents/main-session-recovery/main-session-restart-recovery-failure.ts READ — channel notices and transactional transcript-only tombstones have different custody contracts; bounded stale-row retry retained.
206 src/agents/embedded-agent-runner/run/provider-review-continuation.ts READ — Preserve single-attempt review custody, exact-input validation, live authority, and target-bound refusal state.
205 src/agents/harness/native-session/binding-lifecycle.ts READ — mutation/exclusive/deletion phases are canonical owner and cannot share failure semantics safely.
204 src/agents/embedded-agent-runner/run/attempt-execution-phase.ts READ — Preserve exact run/session admission, authority rechecks, and resource handoffs.
203 src/agents/harness/native-session/binding-generation.ts READ — host lineage read, predecessor adoption, and stale reclaim retain exact generation fencing.
201 src/agents/embedded-agent-runner/run/attempt-session-settle.ts READ — Preserve distinct cancellation, retry, delivery, and terminal settlement contracts.

No configuration, protocol, database schema or dependency changes. No bugs or flaky tests identified in source inspection. Public SDK contracts retained except two unused throwing retired-file testing members, with no in-repo or documented consumers.

@clawsweeper

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

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. 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 Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 8:10 PM ET / September 25, 2026, 00:10 UTC (Revision 5).

ClawSweeper review

What this changes

The branch consolidates repeated logic across agent runners, harness selection, failover, and restart recovery while retaining the Plugin SDK's relay testing signatures.

Merge readiness

⛔ Blocked before merge - 2 items remain

Current main still contains the duplicated harness-selection path, so this PR remains useful. The latest head restores the shipped SDK signatures flagged in the prior review; the inspected changes establish no new blocking defect.

Priority: P3
Reviewed head: 220b558a29993dbb3743e699bbdb87248e88e89c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Substantial scoped validation and the SDK restoration support a good patch rating, while the broad refactor warrants normal maintainer review.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The PR body reports real Gateway and pinned Codex CLI E2E coverage for the changed harness path, plus focused runtime checks; the maintainer-author proof gate does not apply. The introduced diff changes no stored-data format or migration contract.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR body reports real Gateway and pinned Codex CLI E2E coverage for the changed harness path, plus focused runtime checks; the maintainer-author proof gate does not apply. The introduced diff changes no stored-data format or migration contract.
Evidence reviewed 9 items Current main still has the separate selection logic: Current main retains the inline candidate ranking that the PR moves into the shared harness-selection owner.
Shared selection at the PR head: Both auto-selection callers now use the shared selection function, which retains negative provider hints and lazily creates the support context.
Prior SDK finding resolved: The two retired-file testing methods retain their original signatures and throwing behavior at the current head; the same methods appear in v2026.9.6.
Findings None None.
Security None None.

How this fits together

OpenClaw's agent runtime turns model requests and tool results into transcript updates and replies. Harness selection chooses an execution path, while restart recovery resumes eligible interrupted sessions.

flowchart LR
  A[Agent request] --> B[Harness selection]
  B --> C[Agent runner]
  C --> D[Model and tools]
  D --> E[Transcript and reply]
  E --> F[Restart recovery]
  F --> G[Resume or settle]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/agents/embedded-agent-runner/run/attempt.tool-call-argument-repair.ts, serialized state: src/agents/embedded-agent-runner/run/attempt.tool-call-argument-repair.ts, unknown-data-model-change: src/agents/embedded-agent-runner/run/attempt.tool-call-argument-repair.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one owner for each consolidated decision while preserving shipped SDK signatures and the current run and recovery authority fences.

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

Not applicable: this PR addresses repeated implementation logic rather than a reported product failure. Current main still contains the separate selection path.

Is this the best way to solve the issue?

Yes: reusing the existing owners is a maintainable way to remove the duplication, and the latest head preserves the shipped SDK testing contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR body reports real Gateway and pinned Codex CLI E2E coverage for the changed harness path, plus focused runtime checks; the maintainer-author proof gate does not apply. The introduced diff changes no stored-data format or migration contract.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is an internal cleanup with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR body reports real Gateway and pinned Codex CLI E2E coverage for the changed harness path, plus focused runtime checks; the maintainer-author proof gate does not apply. The introduced diff changes no stored-data format or migration contract.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 341e533 adds src/agents/harness/selection-decision.ts:165 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 341e533e7ba3; files: src/agents/harness/selection-decision.ts)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (4 earlier review cycles)
  • reviewed 2026-09-24T12:50:50.332Z sha c2e7517 :: blocked before merge. :: [P2] Preserve array-valued CLI tool-result details
  • reviewed 2026-09-24T13:40:10.730Z sha c2e7517 :: blocked before merge. :: none
  • reviewed 2026-09-24T13:50:13.154Z sha c2e7517 :: blocked before merge. :: none
  • reviewed 2026-09-24T22:02:55.815Z sha bc62383 :: blocked before merge. :: [P2] Preserve the shipped SDK testing signatures

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

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

  • Current SHA: 220b558a29993dbb3743e699bbdb87248e88e89c
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/embedded-agent-runner/run/auth-controller.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/embedded-agent-runner/run/auth-plan.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/embedded-agent-runner/run/auth-store.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/embedded-agent-runner/sandbox-skills.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

Carefully review these changes before merging.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The array-details finding conflates two different coercers. At this exact head, asOptionalObjectRecord explicitly accepts arrays: its only checks are truthiness and typeof value === "object". asOptionalRecord is the separate helper that rejects arrays.

I verified the production recorder entrypoint against real isolated SQLite storage, without mocks: noteToolEvent → appendTranscriptMessage → loadTranscriptEvents. A heterogeneous array, an empty array, and an object all read back unchanged. The probe exited 0, so the claimed narrowing is not present and no repair or schema migration is warranted. The PR body now includes this proof.

The consolidated tool-call repair map is per-stream in-memory bookkeeping, not a persisted data-model change. Please reassess the finding and its dependent merge-risk/migration items. This request is review-only; do not merge.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 24, 2026
Consolidate runner helpers while preserving auth, transcript, lifecycle, and public SDK contracts.
@steipete
steipete force-pushed the deslop/l35-runner-owners branch from c2e7517 to bc62383 Compare September 24, 2026 21:51
@steipete steipete changed the title refactor(agents): deslop embedded and CLI runners refactor(agents): deslop runners, harness and recovery Sep 24, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@clawsweeper clawsweeper Bot removed the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Sep 25, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 25, 2026
@steipete
steipete merged commit 2819676 into main Sep 25, 2026
247 of 248 checks passed
@steipete
steipete deleted the deslop/l35-runner-owners branch September 25, 2026 00:43
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits)
  fix(ci): prevent Security Review checkout retry collisions (#157652)
  fix(ci): recover interrupted Security Review response bodies (#157651)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '05edd36e124dc376f63475256f45e82ec437412c': (30 commits)
  refactor(matrix): reuse bounded direct-room cache insertion (#157775)
  fix: preserve channel-owner revocation across recovery (#157709)
  fix(ci): stop blocking CI during release validation (#157757)
  refactor(tlon): remove unreachable DM summary branches (#157789)
  chore: speed up worktree recovery tests with Bun (#157674)
  fix(sessions): release PR caches when pending viewers leave (#157776)
  refactor(twitch): reuse setup account selection (#157787)
  test: skip empty task ledger resets in cron fixtures (#157767)
  perf: reduce gateway and state test startup (#157711)
  fix: preserve maintenance leases during slow heartbeat renewal (#157696)
  fix(channels): match non-TTY setup advice to registered flags (#157551)
  fix: keep failed update report uploads in the CLI (#156633)
  fix: preserve rejected settings reason when opening config (#157731)
  test(update): load real filesystem dependencies in swap fixture
  fix(ci): prevent Security Review checkout retry collisions (#157652)
  fix(ci): recover interrupted Security Review response bodies (#157651)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  docs(gateway): show how we build OpenClaw on Team (#157675)
  refactor: verify IRC surrogate chunking over loopback (#157580)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* fix(ui): keep Stop available while drafts cannot send

* chore: integrate main fixes for Stop UI validation

* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits)
  fix(ci): prevent Security Review checkout retry collisions (#157652)
  fix(ci): recover interrupted Security Review response bodies (#157651)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* refactor(agents): deslop embedded and CLI runners

Consolidate runner helpers while preserving auth, transcript, lifecycle, and public SDK contracts.

* refactor(agents): deslop runners, harness and recovery

* refactor(agents): preserve shipped relay testing signatures
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* fix(ui): keep Stop available while drafts cannot send

* chore: integrate main fixes for Stop UI validation

* commit '5dae23c843013fce2e0bb80037d232bbabfc70e5': (41 commits)
  fix(ci): prevent Security Review checkout retry collisions (openclaw#157652)
  fix(ci): recover interrupted Security Review response bodies (openclaw#157651)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (openclaw#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131)
  refactor(msteams): share stored service URL validation (openclaw#157706)
  fix(codex): honor configured tool PATH in native commands (openclaw#157290)
  refactor(msteams): share approval kind labels (openclaw#157705)
  fix(sessions): keep session results current during cold reads (openclaw#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535)
  refactor(i18n): reuse native branch candidate extraction (openclaw#157636)
  fix(update): preserve recovery files after ownership refusal (openclaw#148890)
  fix(test): prevent late announcements from contaminating registry tests (openclaw#157681)
  fix(e2e): scan full onboarding logs for prompts (openclaw#157624)
  refactor(session-tools): derive contracts from schemas (openclaw#156365)
  refactor(channels): derive config contracts from schemas (openclaw#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689)
  refactor: reuse prepared fixtures in slow core tests (openclaw#157685)
  refactor(codex): reuse marketplace reference selection (openclaw#157621)
  chore(ui): refresh control ui locales (openclaw#157710)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  docs(gateway): show how we build OpenClaw on Team (#157675)
  refactor: verify IRC surrogate chunking over loopback (#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits)
  fix(subagents): stop completion transcript retry loops (openclaw#157571)
  perf(sessions): remove duplicate foreground history reference scans (openclaw#157572)
  improve(typesafe): defer startup work until the first decision (openclaw#157380)
  fix(update): restore npm-pack helper typechecking (openclaw#157659)
  fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471)
  refactor(infra): share process error handler registries (openclaw#157632)
  chore(ui): refresh control ui locales (openclaw#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592)
  perf(plugins): reuse declared tool membership during resolution (openclaw#156205)
  fix(ui): pasted text previews fail before sending (openclaw#157390)
  fix(agents): wait for database resources during deletion (openclaw#157631)
  improve: move operator profile database reads off the Gateway thread (openclaw#155800)
  fix: explain rejected settings without losing edits (openclaw#157549)
  fix: keep Gateway responsive while recording trajectory events (openclaw#157598)
  fix(auth): show SIWC email and selected model account identity (openclaw#157629)
  docs: explain Codex app approval precedence (openclaw#155089)
  refactor(wizard): share select prompt requests (openclaw#157607)
  fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590)
  fix(doctor): explain update lint supervisor refusals (openclaw#156547)
  fix(ui): GitHub folder links lose repository context (openclaw#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (openclaw#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131)
  refactor(msteams): share stored service URL validation (openclaw#157706)
  fix(codex): honor configured tool PATH in native commands (openclaw#157290)
  refactor(msteams): share approval kind labels (openclaw#157705)
  fix(sessions): keep session results current during cold reads (openclaw#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535)
  refactor(i18n): reuse native branch candidate extraction (openclaw#157636)
  fix(update): preserve recovery files after ownership refusal (openclaw#148890)
  fix(test): prevent late announcements from contaminating registry tests (openclaw#157681)
  fix(e2e): scan full onboarding logs for prompts (openclaw#157624)
  refactor(session-tools): derive contracts from schemas (openclaw#156365)
  refactor(channels): derive config contracts from schemas (openclaw#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689)
  refactor: reuse prepared fixtures in slow core tests (openclaw#157685)
  refactor(codex): reuse marketplace reference selection (openclaw#157621)
  chore(ui): refresh control ui locales (openclaw#157710)
  docs(gateway): show how we build OpenClaw on Team (openclaw#157675)
  refactor: verify IRC surrogate chunking over loopback (openclaw#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
amittell added a commit to amittell/openclaw that referenced this pull request Oct 9, 2026
Brings the branch onto current main; GitHub reported it CONFLICTING.

One conflict, in auth-controller.ts: openclaw#157294 (2819676) inlined
resolveApiKeyForCandidate into applyApiKeyInfo. The credential-resolution
deadline now wraps that inlined getApiKeyForModelCore call; the label still
names the model whose provider is being resolved.

The 700 s budget still holds against main's owner constants:
OAUTH_REFRESH_LOCK_OPTIONS 20 retries x 10 s and OAUTH_REFRESH_CALL_TIMEOUT_MS
120 s, so 2 x 320 s + 60 s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant