Skip to content

test(agents): trim and fold low-value regression suites - #198916

Merged
vincentkoc merged 8 commits into
mainfrom
test/loc-reduction-w2-recut-1-20261114
Nov 18, 2026
Merged

vincentkoc merged 8 commits into
mainfrom
test/loc-reduction-w2-recut-1-20261114

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Local validation complete — 52 files / 955 tests passed; fresh four-pass review clean. Awaiting exact-head hosted review and required CI before squash landing.

Related: #198737

What Problem This Solves

Large agent test fixtures and broad case matrices hide the regression guards that matter. This pilot removes low-value wiring, call-count, cache/performance, and repeated journey tests while folding consequential guards into existing sibling suites.

User Impact

No production runtime change. Authorization, privacy, data-loss, race, cleanup and otherwise-uncovered visible-regression guards remain. Value, rather than uniqueness alone, determines which incidental tests to remove.

Changes

  • 11 DELETE, 52 TRIM, 32 KEEP across the original 95-file audit. Exact per-file decisions, kept cases and destinations are below.
  • 14,908 net lines removed across 115 paths, compared with main 703c82d20c5cbff62ba3c53eb35045006c9b1d02: test source +8,121/-22,946 (14,825 fewer); owned test metadata/reference maintenance +11/-94 (83 fewer); production runtime delta 0.
  • Removed unreachable guest/failurePhase branches and unused folded imports/bindings. Typed fixtures keep their actual runtime values and assertions.
  • Restored prepared-model-catalog-worker.directory.integration.test.ts and prepared-model-runtime.scoped-refresh.test.ts byte-for-byte from main because they gained coverage. Their database-worker and protected-runtime inventory entries remain.
  • Restored the same-backend reattach pending-answer authority case in runs.steering-handoff.test.ts using its existing slim harness. The pending claim resumes after reattaching the exact same backend and must reject without message dispatch.
  • Main's edits to the deleted live-input donor only add explicit failed terminal disposition in cleanup; equivalent cleanup is updated in the retained attempt-session-boundary.test.ts. No main-added assertion was removed.
  • Owned metadata/reference changes: config/ci-test-timings.json, config/test-mock-exports-baseline.txt, config/test-timeout-race-baseline.txt, CI watch/protected inventory/runtime selection, native test build-consumer list, database-worker list, scripts/perf/README.md, and the affected runtime-selector test. Unrelated main entries remain.

Validation

Candidate f29de569ed9285c5edbb91cf33c36cbc5127d0ed, tree 70d4b31c877788ce2f728339cbc027a0669e39c4; captured main 703c82d20c5cbff62ba3c53eb35045006c9b1d02.

  • Native oxlint: all 50 surviving changed TS/MTS/MJS files passed at the preceding candidate; the only subsequent change, the OAuth keeper wait repair, passed its focused lint again.
  • Four canonical test typecheck graphs passed at the preceding candidate; the only subsequent change reran agents-root successfully: agents-root, agents-other, agents-tools, root-tooling. Native compiler file lists cover all 57 requested TS/MTS files (original 49, restored keepers and changed helpers/metadata). The plain-JS database-worker inventory is covered by lint and runtime inventory verification, not misreported as TypeScript checked.
  • git diff --check passed. Frozen dependency install passed in the task-owned managed worktree.
  • Fresh native independent review: four passes complete, scoped-clean, zero P0–P2 findings, exit0 on this exact head. It expressly verifies the restored same-backend claim guard. Runtime proof was pending during review and is reported separately.
  • Current full scoped runtime result: 52 files / 955 tests passed, 0 failed/skipped/unhandled errors; wrapper exit 0 in 481.22s. Original49 files plus the two restored keeper suites and ci-proof-test-inventory.test.ts (52 total), native run-vitest, one worker, no build-skip/prebuilt flags.
  • The first round-1 attempt completed with951passed/4failed because its compiled worker came from the older schema42 baseline while current source creates schema43 databases. The supported current-head native runtime rebuild passed; the compiled schema ceiling is43. The final test-only change reused that input-equivalent runtime (build stamp192f1674); no production or dependency inputs changed. The final wrapper ran its required native prerequisite without build-skip flags. No assertion, timeout, runtime source, or schema constant was changed to address that environment mismatch.
  • Earlier native Codex timing failure was not treated as fixed or inherited: the first current-head run passed all three native-sharing rows. Historical AWS declaration prerequisite failure is not claimed as validated by this scoped proof.
  • CI on the preceding192f1674 head identified four folded wall-clock timeout races in the OAuth keeper. All four now await their existing completion promises with withinTest(..., signal); the test budget, barriers, release ordering and assertions are unchanged. The exact timeout-race ratchet passes, without increasing its baseline.
  • Required hosted CI and a fresh exact-head ClawSweeper re-review remain pending. No skipped checks are counted as passes.
Original49 scoped files (the full run also includes the 2 restored keepers and inventory test)
src/agents/embedded-agent-runner/compaction-runtime-context.test.ts
src/agents/embedded-agent-runner/google-prompt-cache.test.ts
src/agents/embedded-agent-runner/model.generation-scope.test.ts
src/agents/embedded-agent-runner/model.static-catalog.test.ts
src/agents/embedded-agent-runner/prompt-cache-observability.test.ts
src/agents/embedded-agent-runner/run-entry.cyber-failover.test.ts
src/agents/embedded-agent-runner/run-entry.test.ts
src/agents/embedded-agent-runner/run/assistant-failure.test.ts
src/agents/embedded-agent-runner/run/attempt-prompt-submit.foreground.test.ts
src/agents/embedded-agent-runner/run/attempt-prompt-tool-policy.test.ts
src/agents/embedded-agent-runner/run/attempt-session-boundary.orphan.test.ts
src/agents/embedded-agent-runner/run/attempt-session-boundary.test.ts
src/agents/embedded-agent-runner/run/attempt.abort-race.test.ts
src/agents/embedded-agent-runner/run/attempt.exec-review-transcript.test.ts
src/agents/embedded-agent-runner/run/attempt.model-diagnostic-accounting.test.ts
src/agents/embedded-agent-runner/run/attempt.test.ts
src/agents/embedded-agent-runner/run/images.test.ts
src/agents/embedded-agent-runner/run/lane-controller.test.ts
src/agents/embedded-agent-runner/run/message-tool-terminal.tool-authored.test.ts
src/agents/embedded-agent-runner/run/payloads.errors.test.ts
src/agents/embedded-agent-runner/run/settled-turn-finalization.test.ts
src/agents/embedded-agent-runner/run/terminal-preparation.test.ts
src/agents/embedded-agent-runner/runs.steering-handoff.test.ts
src/agents/embedded-agent-runner/runs.test.ts
src/agents/embedded-agent-runner/tool-result-context-guard.test.ts
src/agents/harness/host-capability.workspace-readiness.test.ts
src/agents/model-fallback.overflow-recovery.test.ts
src/agents/model-fallback.personal-cooldown.test.ts
src/agents/model-fallback.sticky-rate-limit.test.ts
src/agents/model-fallback.terminal-boundary.test.ts
src/agents/model-fallback.timeout-cooldown.e2e.test.ts
src/agents/prepared-model-catalog-worker.custody.integration.test.ts
src/agents/prepared-model-catalog-worker.integration.test.ts
src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts
src/agents/prepared-model-catalog-worker.registration-facts.integration.test.ts
src/agents/prepared-model-catalog-worker.retirement.integration.test.ts
src/agents/prepared-model-runtime.auth-recovery.test.ts
src/agents/prepared-model-runtime.cancelled-admission.test.ts
src/agents/prepared-model-runtime.catalog-owner.test.ts
src/agents/prepared-model-runtime.catalog-projection.test.ts
src/agents/prepared-model-runtime.catalog-retention.test.ts
src/agents/prepared-model-runtime.configured.test.ts
src/agents/prepared-model-runtime.descriptor-reuse.test.ts
src/agents/prepared-model-runtime.metadata-handoff.test.ts
src/agents/prepared-model-runtime.native-demand.test.ts
src/agents/prepared-model-runtime.published-resources.test.ts
src/agents/prepared-model-runtime.test.ts
src/agents/workspace-sandbox.test.ts
test/scripts/ci-test-runtime-trials.test.ts

Per-file evidence

The base: line citations refer to the original audited donor snapshot (22614d5b0e81fc68cbbbf6bdcdd34301a3e02658); keeper files refer to this candidate. Exact-main restorations use captured main above.

# Original file Verdict Kept cases / value decision Destination / evidence
1 src/agents/embedded-agent-runner/compaction-successor.lifetime.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/compaction-successor.lifetime.test.ts
2 src/agents/embedded-agent-runner/context-engine-maintenance.ownership.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/context-engine-maintenance.ownership.test.ts
3 src/agents/embedded-agent-runner/context-engine-maintenance.preparation.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/context-engine-maintenance.preparation.test.ts
4 src/agents/embedded-agent-runner/context-engine-maintenance.resources.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/context-engine-maintenance.resources.test.ts
5 src/agents/embedded-agent-runner/google-prompt-cache.failures.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “propagates the caller abort reason without persisting failure or streaming” (base:138); “keeps unregistered %s sentinel failures outside optional cache handling” (base:159); “propagates writer-claim rebound while recording cache failure” (base:207); “does not swallow primary stream failures after cache degradation” (base:370) src/agents/embedded-agent-runner/google-prompt-cache.test.ts
6 src/agents/embedded-agent-runner/model.configured-catalog-index.test.ts TRIM Captured policy indexes and credential/route executable-ID materialization. Source cases: “retains old policy indexes through projections while new snapshots use new policies” (base:160); “preserves the selected executable ID during %s materialization” (base:212) src/agents/embedded-agent-runner/model.generation-scope.test.ts
7 src/agents/embedded-agent-runner/model.configured-overrides.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/model.configured-overrides.test.ts
8 src/agents/embedded-agent-runner/model.static-catalog.prepared.test.ts DELETE Prepared-row/hook reuse and discovery wiring removed; owner-context admission remains in the sibling. src/agents/embedded-agent-runner/model.static-catalog.test.ts
9 src/agents/embedded-agent-runner/model.static-catalog.snapshot-cache.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “pins lifecycle lookups to the supplied plugin generation” (base:220); “refreshes a retained no-snapshot resolver at the plugin metadata lifecycle boundary” (base:261) src/agents/embedded-agent-runner/model.static-catalog.test.ts
10 src/agents/embedded-agent-runner/prompt-cache-observability.history.test.ts TRIM Extension-key added/changed/removed diagnostics exclude private values. Source cases: “names added, changed, and removed extension keys without exposing values” (base:597) src/agents/embedded-agent-runner/prompt-cache-observability.test.ts
11 src/agents/embedded-agent-runner/run-entry.accounting.test.ts TRIM Provider-billed zero, unknown-before-known cost, and throw-before-result accounting. Source cases: “does not invent usage for an attempt that throws before returning” (base:192) src/agents/embedded-agent-runner/run-entry.test.ts
12 src/agents/embedded-agent-runner/run-entry.cyber-failover.runner.test.ts TRIM Provider error after delivered Daybreak retry; denied retry preserves primary auth. Source cases: “propagates a recognized provider error thrown after the Daybreak retry delivered” (base:140); “keeps primary auth usable after a denied Daybreak retry with default config” (base:159) src/agents/embedded-agent-runner/run-entry.cyber-failover.test.ts
13 src/agents/embedded-agent-runner/run-entry.fallback-transcript.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run-entry.fallback-transcript.test.ts
14 src/agents/embedded-agent-runner/run-entry.model-hook.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run-entry.model-hook.test.ts
15 src/agents/embedded-agent-runner/run/assistant-failure.failover.test.ts TRIM Canonical-user loss and content-policy stop retries; billing survives bookkeeping failure; provider Error remains visible to voice. Source cases: “Model prompt projection lost its canonical user turn” (base:129); “keeps provider Error failures visible to realtime voice” (base:345) src/agents/embedded-agent-runner/run/assistant-failure.test.ts
16 src/agents/embedded-agent-runner/run/attempt-prompt-submit.foreground.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/attempt-prompt-submit.foreground.test.ts
17 src/agents/embedded-agent-runner/run/attempt-prompt-submit.projections.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/attempt-prompt-submit.projections.test.ts
18 src/agents/embedded-agent-runner/run/attempt-prompt-submit.runtime-replay.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “keeps an unanswered user across an error-row retry: %s (unsupported projection: %s)” (base:36); “transient override” (base:213) src/agents/embedded-agent-runner/run/attempt-prompt-submit.foreground.test.ts
19 src/agents/embedded-agent-runner/run/attempt-session-boundary.live-input.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “delivers live input steered into the run after the boundary sampled it” (base:288); “includes accepted steering that was pending during boundary preparation” (base:360). Main 703 cleanup-only terminal-disposition edits are carried into this keeper; no new assertions in the deleted donor. src/agents/embedded-agent-runner/run/attempt-session-boundary.test.ts
20 src/agents/embedded-agent-runner/run/attempt-session-boundary.media.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “keeps historical and runtime video on their own turns across queued text and carriers” (base:51) src/agents/embedded-agent-runner/run/attempt-session-boundary.test.ts
21 src/agents/embedded-agent-runner/run/attempt.cwd-split.test.ts DELETE Explicit approved deletion; selected workspace owns cwd, plus host-capability readiness guards remain. src/agents/workspace-sandbox.test.ts
22 src/agents/embedded-agent-runner/run/attempt.llm-boundary.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/attempt.llm-boundary.test.ts
23 src/agents/embedded-agent-runner/run/attempt.model-diagnostic-events.iterator.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “shares unopened return and closes the acquired source without awaiting its value” (base:65) src/agents/embedded-agent-runner/run/attempt.model-diagnostic-accounting.test.ts
24 src/agents/embedded-agent-runner/run/attempt.prompt-helpers.test.ts TRIM Explicit empty toolsAllow; process scope and locked/unlocked model/auth policy. Source cases: “ ” (base:52); “preserves an explicit empty per-turn tool allowlist” (base:80); “preserves process scope and model policy (locked=%s)” (base:134) src/agents/embedded-agent-runner/run/attempt-prompt-tool-policy.test.ts
src/agents/embedded-agent-runner/compaction-runtime-context.test.ts
25 src/agents/embedded-agent-runner/run/attempt.skills-policy.test.ts TRIM Draft-review bytes/read denial, Code Mode skills.list denial, catalog-hidden read denied while workshop executes. Source cases: “gates catalog-hidden tools during review while skill_workshop stays callable” (base:273) src/agents/embedded-agent-runner/run/attempt.exec-review-transcript.test.ts
26 src/agents/embedded-agent-runner/run/attempt.spawn-workspace.orphan.test.ts DELETE Repeated internal continuation keeper preserves failed-dispatch input and reopened branch; discard metadata/call-shape rows. src/agents/embedded-agent-runner/run/attempt-session-boundary.orphan.test.ts
27 src/agents/embedded-agent-runner/run/attempt.stop-reason-recovery.test.ts TRIM stream/sensitive and throw/refusal_policy become visible recovery text. Source cases: “converts $mode errors with stop reason $stopReason” (base:139) src/agents/embedded-agent-runner/run/attempt.test.ts
28 src/agents/embedded-agent-runner/run/attempt.tool-search-catalog-abort.test.ts TRIM Direct spawn and raw catalog wait never enter denied preparer/action; pending LSP timeout keeps canonical terminal cleanup. Source cases: “direct spawn” (base:93) src/agents/embedded-agent-runner/run/attempt.exec-review-transcript.test.ts
src/agents/embedded-agent-runner/run/attempt.abort-race.test.ts
29 src/agents/embedded-agent-runner/run/auth-controller.binding.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/auth-controller.binding.test.ts
30 src/agents/embedded-agent-runner/run/images.media-refs.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “hydrates sandbox-staged paths while retaining the inbound media identity” (base:231); “rejects encoded traversal claim-check facts (sandbox=%s)” (base:253); “hydrates a path-less transcript image from the staged sandbox twin” (base:282); “keeps a recorded inline image when only its managed staged copy is suppressed” (base:320) src/agents/embedded-agent-runner/run/images.test.ts
31 src/agents/embedded-agent-runner/run/images.replay.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “keeps omitted images omitted and resized inline images included on later requests” (base:66); “keeps persisted facts and asks the active turn to resend an unreadable image” (base:151); “prefers persisted fact-index layout when runtime order is also present” (base:227) src/agents/embedded-agent-runner/run/images.test.ts
32 src/agents/embedded-agent-runner/run/lane-controller.lifecycle.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/lane-controller.lifecycle.test.ts
33 src/agents/embedded-agent-runner/run/lane-controller.queue-liveness.test.ts TRIM Placement TTL custody, source cancellation, local/remote lifecycle rotation, recycled run claim ownership. Source cases: “retains context past the TTL while worker placement admission is pending” (base:243); “source owner” (base:333); “rejects %s execution when its lifecycle rotates during placement admission” (base:427) src/agents/embedded-agent-runner/run/lane-controller.test.ts
34 src/agents/embedded-agent-runner/run/llm-idle-timeout.progress.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/llm-idle-timeout.progress.test.ts
35 src/agents/embedded-agent-runner/run/message-tool-terminal.loop.test.ts DELETE Explicit approved deletion; sibling completion ordering and committed terminal delivery remain, alongside payloads.errors. src/agents/embedded-agent-runner/run/message-tool-terminal.tool-authored.test.ts
36 src/agents/embedded-agent-runner/run/message-tool-terminal.test-support.ts TRIM Keep createTerminalTestModel, terminalResponse, terminalToolCall; remove unused terminalMessageAgent. src/agents/embedded-agent-runner/run/message-tool-terminal.test-support.ts
37 src/agents/embedded-agent-runner/run/message-tool-terminal.tool-authored.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/message-tool-terminal.tool-authored.test.ts
38 src/agents/embedded-agent-runner/run/payloads.errors.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/payloads.errors.test.ts
39 src/agents/embedded-agent-runner/run/settled-turn-finalization.borrowed.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/settled-turn-finalization.borrowed.test.ts
40 src/agents/embedded-agent-runner/run/settled-turn-finalization.delivery.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “preserves a tool-authored source projection and its owned media while custody is pending” (base:178); “preserves a preceding input's answer while current delivery remains pending” (base:206) src/agents/embedded-agent-runner/run/settled-turn-finalization.test.ts
41 src/agents/embedded-agent-runner/run/settled-turn-finalization.incomplete.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/settled-turn-finalization.incomplete.test.ts
42 src/agents/embedded-agent-runner/run/settled-turn-finalization.silence.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “settles %s/%s/%s followed by NO_REPLY without replaying tools” (base:40) src/agents/embedded-agent-runner/run/settled-turn-finalization.test.ts
43 src/agents/embedded-agent-runner/run/settled-turn-finalization.stale-error.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/settled-turn-finalization.stale-error.test.ts
44 src/agents/embedded-agent-runner/run/settled-turn-finalization.transport.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/embedded-agent-runner/run/settled-turn-finalization.transport.test.ts
45 src/agents/embedded-agent-runner/run/terminal-preparation.run-stats.test.ts DELETE Remove counters, estimated-cost telemetry and receipt formatting; no authorization or charging behavior removed. src/agents/embedded-agent-runner/run/terminal-preparation.test.ts
46 src/agents/embedded-agent-runner/run/terminal-preparation.yield.test.ts TRIM Paused payload continuation versus diagnostic; typed cron denial versus fetched prose. Source cases: “Agent run aborted” (base:67); “SYSTEM_RUN_DENIED: approval required” (base:175) src/agents/embedded-agent-runner/run/terminal-preparation.test.ts
47 src/agents/embedded-agent-runner/runs.generation.test.ts TRIM Sessionless alias owner, rootless compaction lifecycle, rejected prior-lifecycle registration, replacement during stale abort. Source cases: “evicts and aborts a sessionless file owner hidden by an alias-only effect” (base:235); “aborts a rootless compacting run when its gateway lifecycle rotates” (base:355); “rejects prior-lifecycle registration with a replacement: %s” (base:370); “preserves a replacement installed during stale abort: %s” (base:440) src/agents/embedded-agent-runner/runs.test.ts
48 src/agents/embedded-agent-runner/runs.lifecycle-targets.test.ts TRIM Exact transcript alias target, ambient turn cannot replace admission, detached producer cleanup after cancellation failure. Source cases: “retires exact transcript ownership behind an alias without clearing a replacement” (base:40); “requires exact admission even with an ambient turn: %s” (base:130); “continues detached cleanup after cancellation fails (producer settles=%s)” (base:224) src/agents/embedded-agent-runner/runs.test.ts
49 src/agents/embedded-agent-runner/runs.liveness.test.ts TRIM Stale-window steerability, probe replacement recheck, closed-admission non-revival. Source cases: “keeps runtime waits steerable after the stale window” (base:126); “rechecks ownership after a probe replaces the handle” (base:266); “does not let a probe revive closed admission” (base:279) src/agents/embedded-agent-runner/runs.test.ts
50 src/agents/embedded-agent-runner/runs.steering.test.ts TRIM Cross-store captured answer; waiter identity through replacement; claim-stage backend replacement and same-backend reattach revoke a pending answer claim. Source cases: “claims only the captured owner's answer when stores share a session ID” (base:70); “rejects backend replacement during question %s” (base:106; claim and reattach rows retained); “keeps handle and session waiters distinct through replacements” (base:157) src/agents/embedded-agent-runner/runs.steering-handoff.test.ts
51 src/agents/embedded-agent-runner/tool-result-context-guard.image.test.ts TRIM No-image-fit explanation and mixed-block/image-order/private-detail preservation. Source cases: “explains when no sanitized image fits the context window” (base:65); “preserves mixed text, unknown blocks, CJK content, image order, and original privacy” (base:83) src/agents/embedded-agent-runner/tool-result-context-guard.test.ts
52 src/agents/model-fallback.chain-stop.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “preserves an idle-breaker result without reporting fallback success or trying another model” (base:160); “sanitizes compact stop diagnostics without exposing error details” (base:281) src/agents/model-fallback.terminal-boundary.test.ts
53 src/agents/model-fallback.context-overflow.test.ts TRIM Retain context-overflow recovery, blocked guidance, replay-invalid/delivered results and explicit empty fallback override; drop remaining low-value permutations/wiring. Source cases: “prefers sufficient effective context caps after surfaced %s recovery” (base:72); “preserves the blocked guidance after every candidate rejects the oversized request” (base:119); “empty override” (base:132) src/agents/model-fallback.overflow-recovery.test.ts
54 src/agents/model-fallback.probe.test.ts TRIM Far-future quota probe; caller abort/terminal suspension; failed later harness restores suspension. Source cases: “re-probes a single-provider primary blocked by a far-future subscription_limit (#90702)” (base:167); “caller abort” (base:315); “restores deferred suspension when a later harness precheck fails” (base:377) src/agents/model-fallback.personal-cooldown.test.ts
55 src/agents/model-fallback.run-embedded.attempts.test-support.ts TRIM Keep primary failure/error then fallback-success mock builders; remove prompt and unused matrix helpers. src/agents/model-fallback.run-embedded.attempts.test-support.ts
56 src/agents/model-fallback.run-embedded.e2e.test.ts TRIM Deployment denial, committed side-effect timeout, transcript idempotency conflict, pinned rate limit. Source cases: “does not rotate credentials or run a second model after a confirmed deployment denial” (base:199); “keeps a pinned model on its rate-limit surface instead of escalating to fallback” (base:303) src/agents/model-fallback.timeout-cooldown.e2e.test.ts
57 src/agents/model-fallback.shared-rate-limit.integration.test.ts DELETE Remove broad scripted saturation journey; narrower strict/pinned/gate guards folded here. src/agents/model-fallback.sticky-rate-limit.test.ts
58 src/agents/model-fallback.shared-rate-limit.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “waits in the earliest shared gate when both models are saturated and preserves strict requests” (base:156); “reads saturation for the pinned starting account before possible recovery accounts” (base:178); “blocks later turns on a generic timed 429 (%s)” (base:207) src/agents/model-fallback.sticky-rate-limit.test.ts
59 src/agents/prepared-model-catalog-worker.authority.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-catalog-worker.authority.test.ts
60 src/agents/prepared-model-catalog-worker.chat-metadata.integration.test.ts DELETE Remove 64-agent proxy/read/build-count and scaling journey; no new redundancy claim. src/agents/prepared-model-catalog-worker.integration.test.ts
61 src/agents/prepared-model-catalog-worker.config.integration.test.ts TRIM Two workspaces: refreshed synthetic auth, missing/foreign credential zero egress. src/agents/prepared-model-catalog-worker.registration-facts.integration.test.ts
62 src/agents/prepared-model-catalog-worker.directory.integration.test.ts KEEP Restore the complete suite exactly from captured main; main added logger-identity coverage during catalog discovery. All directory credential-isolation cases remain. Exact keeper: src/agents/prepared-model-catalog-worker.directory.integration.test.ts at 5cb4520c7e1d2d4ef519508c2c5dd091e446d789; database-worker selector restored.
63 src/agents/prepared-model-catalog-worker.directory.test.ts TRIM Foreign and ambiguous registered owners refuse with no provider invocation. src/agents/prepared-model-catalog-worker.registration-facts.integration.test.ts
64 src/agents/prepared-model-catalog-worker.metadata.integration.test.ts DELETE Built/source artifact selection remains in the custody test; discard loader-wiring/object-identity matrices. src/agents/prepared-model-catalog-worker.custody.integration.test.ts
65 src/agents/prepared-model-catalog-worker.native-renewal.integration.test.ts TRIM Late native result cannot replace newer provider rows; unknown native provider invents no auth; scoped refresh retains other agent auth. Source cases: “preserves native and provider renewals and explicitly refreshes scoped warm catalogs” (base:36) src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts
66 src/agents/prepared-model-catalog-worker.native.integration.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “keeps stalled native admission terminal after parent auth failure” (base:295); “does not count host sleep toward the native admission stall” (base:333) src/agents/prepared-model-catalog-worker.custody.integration.test.ts
67 src/agents/prepared-model-catalog-worker.pool.integration.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-catalog-worker.pool.integration.test.ts
68 src/agents/prepared-model-catalog-worker.reuse.integration.test.ts DELETE Remove 100k-row payload, heap/capture and inspector call-count tests; per-agent credential guards remain in registration/oauth siblings. src/agents/prepared-model-catalog-worker.registration-facts.integration.test.ts
69 src/agents/prepared-model-catalog-worker.scope.integration.test.ts TRIM Unrelated catalog preserves CLI auth; credential-only synthetic auth; held models.list supersession aborts and joins. Source cases: “retains refreshed CLI auth while acquiring an unrelated provider catalog” (base:152); “captures runtime synthetic auth for credential-only providers before full refresh” (base:220) src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts
src/agents/prepared-model-catalog-worker.retirement.integration.test.ts
70 src/agents/prepared-model-catalog-worker.secrets.test.ts TRIM Config/profile/resolved-env/pending credentials across real serialized worker; pending zero egress; writable plan excludes secrets. Source cases: “preserves %s credential %s (%j) through discovery and the writable plan” (base:219) src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts
71 src/agents/prepared-model-catalog.resources.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-catalog.resources.test.ts
72 src/agents/prepared-model-catalog.scoped-thinking.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-catalog.scoped-thinking.test.ts
73 src/agents/prepared-model-runtime.batch.test.ts TRIM Startup-degraded pending auth, cancellation before callback, auth replay during first capture, ownership move. Source cases: “keeps auth admission pending when startup degrades during an adopted refresh” (base:163); “does not start plugin callbacks after cancellation at an event-loop boundary” (base:281); “replays an auth change once the first owner starts capturing credentials” (base:395); “rebinds inherited auth when shared-store ownership moves before first capture” (base:415) src/agents/prepared-model-runtime.auth-recovery.test.ts (startup-degradation guard); src/agents/prepared-model-runtime.cancelled-admission.test.ts (remaining guards)
74 src/agents/prepared-model-runtime.cancelled-admission.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-runtime.cancelled-admission.test.ts
75 src/agents/prepared-model-runtime.capture.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-runtime.capture.test.ts
76 src/agents/prepared-model-runtime.catalog-publication.test.ts TRIM Explicit native supersession and connection abort refuse sessions.create and persist no session. Source cases: “creates only with current native activation ($selection, superseded=$superseded, stop=$stop)” (base:218) src/agents/prepared-model-runtime.catalog-projection.test.ts
77 src/agents/prepared-model-runtime.configured-catalog.test.ts TRIM Accepted account window, authored caps, no cross-account retained inventory, custom physical route. Source cases: “uses accepted account prompt limits instead of the superseded synthetic window” (base:468); “preserves explicit authored prompt and native-window caps” (base:554); “retains only same-account inventory after failure” (base:605) src/agents/prepared-model-runtime.configured.test.ts
78 src/agents/prepared-model-runtime.gateway-leases.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “reprepares run admission when config publication supersedes its unfinished build” (base:29) src/agents/prepared-model-runtime.test.ts
79 src/agents/prepared-model-runtime.inbound-registry.test.ts TRIM SQLite inspected-input lifetime, sibling-preserving auth recovery, cancelled admission owner cleanup. Source cases: “holds inspected input through accepted preparation and refuses a retired result” (base:160); “recovers a rejected auth refresh projection without affecting siblings” (base:619); “aborts run admission without retaining an owner after auth publication” (base:641) src/agents/prepared-model-runtime.cancelled-admission.test.ts
80 src/agents/prepared-model-runtime.native-demand.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-runtime.native-demand.test.ts
81 src/agents/prepared-model-runtime.native-picker-failures.test.ts TRIM Revoked lease, constructor auth rejection, API provider independence, readiness owner retirement. Source cases: “keeps API provider readiness independent of a failed native runtime for the same provider” (base:579) src/agents/prepared-model-runtime.native-demand.test.ts
82 src/agents/prepared-model-runtime.owner-selection.test.ts TRIM Committed owner stays current; stale dynamic lease, unconfigured missing runtime, queued auth failure. Source cases: “keeps a committed gateway owner current when an admitted turn resumes on its older generation” (base:301); “does not let a stale dynamic lease authorize a replacement generation” (base:482); “stales every owner when queued auth refresh fails after config publication” (base:592) src/agents/prepared-model-runtime.test.ts
83 src/agents/prepared-model-runtime.owner-supersession.test.ts TRIM Retain the listed consequential guards; drop remaining low-value permutations/wiring and unused setup. Source cases: “retires only the deleted agent's physical owners” (base:336); “keeps a retired agent withdrawn when its in-flight configured build finishes” (base:382); “keeps logged-out reply dispatch after the config operation cache retires” (base:503) src/agents/prepared-model-runtime.catalog-retention.test.ts
84 src/agents/prepared-model-runtime.plugin-drain.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-runtime.plugin-drain.test.ts
85 src/agents/prepared-model-runtime.published-resources.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-runtime.published-resources.test.ts
86 src/agents/prepared-model-runtime.registry-borrow.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-runtime.registry-borrow.test.ts
87 src/agents/prepared-model-runtime.reload-auth.test.ts TRIM Auth invalidation inside lifecycle publication, failed adopted replacement recovery, overlapping mutations, plugin-drain replacement. Source cases: “commits auth invalidation inside the active lifecycle publication” (base:344); “keeps transitively overlapping inherited auth mutations atomic” (base:451) src/agents/prepared-model-runtime.metadata-handoff.test.ts
88 src/agents/prepared-model-runtime.remote-publication.test.ts TRIM Exactly three: models.list no retry after replacement authority loss; first reply after catalog adoption; shutdown not held by pricing. Source cases: “models.list does not retry after the remote replacement itself loses authority” (base:213); “delivers the first reply when catalog adoption retires its captured dispatch publication” (base:301); “does not hold Gateway shutdown on an adoption's pricing preparation” (base:551) src/agents/prepared-model-runtime.test.ts
89 src/agents/prepared-model-runtime.reply-fallback.test.ts TRIM Current-generation reply, degraded context engine legacy admission, selected-only user/auto subagent fallback policy. Source cases: “prepares a reply on the current generation when its captured dispatch generation was replaced” (base:94); “admits a nested reply after its configured context engine falls back to legacy” (base:137) src/agents/prepared-model-runtime.descriptor-reuse.test.ts
90 src/agents/prepared-model-runtime.run-resources.test.ts KEEP All existing cases retained; predominantly authority, lifetime, privacy, or user-visible regression guards. src/agents/prepared-model-runtime.run-resources.test.ts
91 src/agents/prepared-model-runtime.scoped-refresh.test.ts KEEP Restore the complete suite exactly from captured main, including newly added native refresh/publication race coverage and all credential/profile invalidation cases. Exact keeper: src/agents/prepared-model-runtime.scoped-refresh.test.ts at 5cb4520c7e1d2d4ef519508c2c5dd091e446d789; database-worker selector restored.
92 src/agents/prepared-model-runtime.startup-registry.test.ts TRIM Unshadowed global instance reuse and shadowed workspace source isolation. Source cases: “borrows global startup instances across workspaces without borrowing shadowed sources” (base:257) src/agents/prepared-model-runtime.published-resources.test.ts
93 src/agents/prepared-model-runtime.startup-static.test.ts TRIM Superseded static-hook generation cannot publish. Source cases: “does not publish a static catalog generation superseded while its hook is running” (base:434) src/agents/prepared-model-runtime.catalog-owner.test.ts
94 src/agents/test-helpers/catalog-capture-footprint.ts DELETE Only two old consumers removed/folded without footprint measurements; no remaining import. src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts
95 src/agents/test-helpers/prepared-model-catalog-legacy-fixture.ts DELETE Legacy matrix removed; native admission guards folded without helper; no remaining import. src/agents/prepared-model-catalog-worker.custody.integration.test.ts

@vincentkoc vincentkoc self-assigned this Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XL labels Nov 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes low-value agent tests, folds consequential guards into existing suites, and updates their test inventories.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful test consolidation with reported focused runtime validation and no actionable defect found; hosted CI has not finished.
Proof confidence 🐚 platinum hermit (4/6) This test-only change requires no shipped-entry-point demonstration; supplied validation exercises the retained suites and real catalog-worker fixtures.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer approved the value-based pilot, and the changes reduce test maintenance while retaining consequential guards in existing suites.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-approved cleanup remains useful, and review found no actionable defect; required CI is still running.

Priority: P3
Reviewed head: f29de569ed9285c5edbb91cf33c36cbc5127d0ed

Before merge

None.

Findings

None.

Agent review details

How this fits together

CI selectors route agent test fixtures through runtime owners and worker transports, then evaluate their behavior with retained assertions.

flowchart LR
  A[Test inventories] --> B[Existing keeper suites]
  B --> C[Agent runtime owners]
  B --> D[Catalog worker transport]
  C --> E[Regression assertions]
  D --> E
Loading

Technical review

Best possible solution:

Retain consequential regressions in existing owner suites and use their existing completion signals without adding production machinery.

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

This PR reports test maintenance rather than a product bug; source inspection confirms the latest wait changes, and no tests were executed during this read-only review.

Is this the best way to solve the issue?

Folding valuable guards into existing suites and using the existing abort-aware wait helper fits the approved scope without creating another owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Native admission and provider renewal keeps the original intent (fix: stop catalog renewal from stalling agent runs #157459: Prevent selected native models from stalling behind provider catalog renewal and preserve independently published results and credentials.)
  • Historical-peer OAuth refresh keeps the original intent (43c68c3: Exercise real-worker refresh, historical credential fencing, successful settlement, and rollback before provider I/O.)
  • Catalog test host selection changes intended behavior with a stated reason (cb1cc0c: Retain portable catalog lifecycle coverage on Node and Bun while separating V8-specific planner instrumentation.)
  • Image replay keeps the original intent (31d6d8c: Keep earlier image content stable across later provider requests.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit cb1cc0c adds scripts/lib/ci-test-runtime.mts:124 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cb1cc0cb58bc; files: scripts/lib/ci-test-runtime.mts)
  • Peter Steinberger: Raw commit 5822af6 adds src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts:37 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5822af67c6da; files: src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts)
  • Ayaan Zaidi: Raw commit 43c68c3 adds src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts:11 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 43c68c34df71; files: src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test source Production runtime: +0/-0; test source and support: +8,121/-22,946. The keeper additions consolidate retained contracts while removing substantially more donor scaffolding.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This is internal test maintenance without a demonstrated urgent product failure.
  • 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.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (5 earlier review cycles)
  • reviewed 2026-11-14T15:00:54.668Z sha 8821a16 :: blocked before merge. :: [P2] Prune mock-export baseline entries with the deleted suites | [P2] Migrate the runtime-discovery fixture before deleting its target | [P2] Preserve the real-registry client-shadow authorization regression
  • reviewed 2026-11-16T17:27:27.136Z sha 1ab84ba :: needs changes before merge. :: [P2] Retain the rebuilding-hook timeout regression | [P2] Preserve the Responses admission-to-wire handoff coverage | [P2] Keep the persisted image-prefix retry and reopen regression | [P2] Retain the catalog v3 publication integration | [P2] Preserve committed and failed writer-takeover coverage
  • reviewed 2026-11-16T17:39:05.840Z sha 4aef4e1 :: needs changes before merge. :: [P2] Retain the resized-image retry and reopen regression | [P2] Preserve mutable-history rewrite detection | [P2] Retain the pre-admission fallback-notice regression
  • reviewed 2026-11-18T00:21:22.618Z sha f63e30e :: needs changes before merge. :: [P2] Remove the unreachable guest branch after narrowing the table | [P2] Remove unused bindings copied into the surviving suites
  • reviewed 2026-11-18T04:09:57.222Z sha 192f167 :: needs maintainer review before merge. :: none

Reviewed November 17, 2026, 11:43 PM ET / November 18, 2026, 04:43 UTC (Revision 6).

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts labels Nov 14, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 14, 2026 15:32
@vincentkoc
vincentkoc marked this pull request as draft November 14, 2026 15:42
@clawsweeper clawsweeper Bot removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 14, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 15, 2026 01:23
@vincentkoc
vincentkoc force-pushed the test/loc-reduction-w2-recut-1-20261114 branch from fe38a13 to 0d57b5c Compare November 16, 2026 12:47
@vincentkoc
vincentkoc enabled auto-merge (squash) November 16, 2026 12:52
@vincentkoc
vincentkoc disabled auto-merge November 16, 2026 13:07
@vincentkoc
vincentkoc marked this pull request as draft November 16, 2026 13:08
@vincentkoc
vincentkoc force-pushed the test/loc-reduction-w2-recut-1-20261114 branch from 0d57b5c to 1ab84ba Compare November 16, 2026 17:19
@vincentkoc
vincentkoc marked this pull request as ready for review November 16, 2026 17:19
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Repair round 2 at 1ab84ba: retained distinct coverage exactly from current main, removed only unreferenced test support, and updated the file-to-keeper manifest. No production changes. Please review this exact head; CI is pending.

@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 16, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Repair round 3 at 4aef4e1: retained distinct coverage exactly from current main, removed only unreferenced test support, and updated the file-to-keeper manifest. No production changes. Please review this exact head; CI is pending.

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 18, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head f29de569ed9285c5edbb91cf33c36cbc5127d0ed against captured main 703c82d20c5cbff62ba3c53eb35045006c9b1d02. This is the final authorized repair round for the trim-and-fold pilot. The approved bar remains VALUE, not uniqueness; the full 95-file evidence table is in the PR body (11 DELETE / 52 TRIM / 32 KEEP, 14,908 net lines removed, production delta 0).

The preceding head was review-clean but CI found four folded wall-clock timeout races in prepared-model-catalog-worker.oauth-peers.integration.test.ts. They now await the same existing completion signals with withinTest(..., signal). The 120s test bound, admission-before-release ordering, native completion ordering, OAuth claims/rollback assertions and cleanup remain unchanged. No baseline increase, timeout expansion, new harness or production edit.

The exact timeout-race ratchet, focused oxlint and agent test typecheck pass. All original 49 scoped files plus two restored keepers and the inventory test passed: 52 files / 955 tests, zero failures/skips/unhandled errors, native wrapper exit 0. Fresh independent full-context review completed all four passes with zero P0–P2 findings. Required hosted CI remains pending; no skipped check is counted as a pass.

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Nov 18, 2026
@vincentkoc
vincentkoc merged commit ee3e16e into main Nov 18, 2026
152 checks passed
@vincentkoc
vincentkoc deleted the test/loc-reduction-w2-recut-1-20261114 branch November 18, 2026 05:12
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Nov 18, 2026
Staging route 1 for openclaw#129388 (staging only; no PR ref move).
Upstream main b894fe5 (fetched 2026-11-18T19:00Z),
merge base 9122a49 (the chain's own absorb). 42 conflicted paths, all resolved
here; rerere replayed none.

Agent schema: upstream 703c82d (openclaw#200533) owns 43 (pending-input endings) and 44 is
free in this tree, so continuation's recipient authority moves 43 -> 44:
- SQLite owner runs upstream's 43 step, then the idempotent authority step;
- PostgreSQL ladder: 42 tool usage, 43 endings (from V42), 44 authority (from V43);
- backup scopes 43 session_pending_inputs (upstream), 44 session_recipient_authority;
- port descriptor pin 44, historical 27-43; witness admits upstream's 43;
- the fleet bridge classifies 38-43; it admits only upstream's own 43 there, so the
  never-deployed chain 43 (upstream 42 + authority) is refused before any write;
- jump-14 42 (the fleet on ab5a30e) now runs upstream's 42 and 43, then authority;
- package schemaVersions.agent 44; agent-schema-history doc rows 42/43/44 and the
  authority section (the chain had left it at 42).

One owner where upstream now owns a fork extraction:
- session-restart-resume: upstream's resolveStartupRestartMarker (openclaw#201060) replaces
  the fork's session-restart-resume-marker.ts (deleted); the fork's tombstone early
  return stays ahead of upstream's interrupted-settle check.
- user-turn-transcript: upstream's applyUserTurnReplacementText replaces the fork's
  byte-identical applyPersistedUserTurnReplacementText (deleted).
- migration witness: upstream's agentSchemaVersions (+43) replaces the fork's
  AGENT_WITNESS_SCHEMA_VERSIONS.
- session-event delivery: the fork's #1447 cron failure-copy withholding moves into
  upstream's createSessionEventReplyDelivery; session-event-handoff equals upstream.

Other resolutions keep both sides (import unions checked against real uses; upstream
openclaw#200533 marker shape `{}`, end causes, lifecycleRestartScope; fork restart tombstones
and operator recovery). attempt.cwd-split.test.ts follows upstream's deletion
(openclaw#198916); its one fork case moves to attempt.continuation-tools.test.ts.
Generated outputs regenerated (config docs, gateway validators, postgres schema,
worker inventory). Compile follow-through: compactionTarget.storePath (openclaw#200714) and
two fork test cleanups pass upstream's new finishPendingInput end cause.

Refs: openclaw#129388

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
)

* test: fold valuable runtime guards into focused suites

* test: repair folded fixture lifetimes and worker selection

* test: preserve folded runtime fixture prerequisites

* test: prepare explicit config and auth for folded guards

* test: repair folded agent suite contracts

* test: retain same-backend question authority guard

* test: wait for owned catalog completion signals
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Nov 19, 2026
…stage 2)

Catches the pure continuation candidate bc7e568 up to openclaw/openclaw
main 41bdde2 (fetched 2026-11-19T14:32:59Z),
2,996 upstream commits past the old merge base 401a1de. Merge commit only;
rerere disabled, so every resolution was made here.

80 conflicted paths (77 content, 3 modify/delete), each recorded with base,
ours and theirs blobs and its reason in the lane's stage2-conflicts.md:
- 8 take upstream whole: the openclaw#197153 pg16-smoke cherry-pick (6909b64) now
  ships upstream (ci.yml, ci-build-manifest, ci-workflow-planning test), the
  Control UI settings child moved onto runDistArtifactChild, the canary
  worker target and two active-facts migration tests.
- 3 deleted with upstream: session-fork and update-candidate-canary suites
  whose production paths upstream removed; cwd-split folded away (openclaw#198916),
  its one continuation case rehomed to attempt.continuation-tools.test.ts.
- One-owner cutovers where upstream now owns a fork extraction: the
  requester-origin projection and replacement-text helpers (openclaw#200533) replace
  the fork's byte-identical copies in user-turn-transcript.metadata.ts.
- Ports into fork-extracted owners: removalReason in the queued-start plan
  and collector-group sweep (openclaw#199868), the async prepared-pricing usage
  diagnostic, the announce flow types, and the session-delivery codec, which
  gains upstream's mediaCandidate kind, reviewedTaskId and their schemas
  (openclaw#198227), importing its retention type from the leaf types module.
- Transcript repair (openclaw#201304, post-b894): upstream's payload-free adapter
  kernel carries the fork's continue_delegate attachment redaction through a
  payload-adapter-only fact and a withBlock update.
- Reset cleanup: upstream's process and retained-send stops (openclaw#199079,
  openclaw#200326) with the fork's continuation-aware reason as the single input;
  the chat reset's retention adapter wraps upstream's stopSessionResetWork,
  the Gateway preemption keeps stopSessionResetSubagents as upstream does.
- Schema: upstream owns agent 42 (tool usage) and 43 (pending-input
  endings) and is at 43; 44 is unused upstream. Continuation's recipient
  authority moves 42 -> 44: version constants, step order, historical
  schemas, witness additive table and version set, backup scope, PostgreSQL
  ladder (V43 = current minus the authority table) and port descriptor.
  package.json schemaVersions state 40, agent 44.
- Generated outputs regenerated, never hand-merged: config baseline,
  gateway validators, postgres schema catalogs, worker-access inventory.
- Compile follow-through for upstream's delivery-union narrowing and its
  readSessionDelivery callers.

Refs openclaw#129388
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
)

* fix(plugins): portable plugin-state keys for PostgreSQL

Use an exclusive SQL lower bound for Doctor pagination instead of a NUL-suffixed cursor. Reject new NUL keys in test-only plugin-state fixtures while retaining legacy SQLite adoption reads.

Add real PostgreSQL Doctor regression coverage and register it in conformance and database-worker lanes. Refs openclaw#184862 openclaw#188642.

* test: account for rebased plugin-state coverage

* test(clickclack): import legacy revocations before adoption

(cherry picked from commit 395cac7)

Release adaptation: Only exclusive SQL lower bound in kernel and Doctor pagination; preserve legacy SQLite keys and public validation. Regression exercises real Doctor paging and inspected executed SQL bindings; no NUL-key fixture policy, schema or unrelated tests.

Follow-up dispositions: 8253356 fix: preserve child results after source lifecycle changes (openclaw#202708); f3f89c7 fix: show saved child results when completion delivery fails (openclaw#202664); c45faa8 fix: align CI tests with admitted tool calls (openclaw#202655); 5c9389a fix: make channels add report required plugin install failures (openclaw#202091); 52b9188 fix: show hosted model details in `models list` without a Gateway (openclaw#202490); d248a76 fix: show an outcome when kept child chats return no answer (openclaw#202423); 5148804 fix(discord): check a queued message's access again when its turn starts (openclaw#202330); 2470d62 fix: let setup use account models with a fresh catalog (openclaw#202019); 9fa0b92 fix: let PostgreSQL Gateways start with plugin-backed secrets (openclaw#201063); c180824 fix(plugins): Talk and plugin-loading requests fail on PostgreSQL Gateways (openclaw#201976); cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 17c5fb0 fix(state): PostgreSQL state created before Template bootstrap deferral is refused as schema drift (openclaw#197425); b5c1277 fix: let resumed parents collect children stopped by restart (openclaw#201460); f920a7e chore(postgres): qualify cron completion during graceful shutdown (openclaw#201246); 1680f54 fix(openai): new ChatGPT subscription models missing until an OpenClaw release (openclaw#201130); 0d8820a fix(media): image descriptions use the ChatGPT OAuth route when OpenAI has no API key (openclaw#199299); ee3e16e test(agents): trim and fold low-value regression suites (openclaw#198916); b8029b4 test(agents): qualify PostgreSQL simple-completion acquisition (openclaw#200956); 703c82d fix(sessions): record queued input end causes and recover them across crashes (openclaw#200533); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); d565e17 fix(ci): retire deleted session fork test from inventory (openclaw#200611); 4cf12c6 chore(postgres): qualify prompt refresh and rebalance CI (openclaw#200488); d460273 fix(templates): release earlier Template-managed agents (openclaw#200303); ff75829 fix(update): --no-restart update fails when the Gateway restarts itself during Doctor's stop (openclaw#200181); 0b2ad60 chore(postgres): cover compaction watched-session prompts (openclaw#200117); b90c573 test: consolidate redundant coverage (198795 recut) (openclaw#198943); a042363 test: consolidate redundant coverage (198793, part 2) (openclaw#198936); 9bfad2b test: consolidate suites while retaining recovery owners (openclaw#198933); 4e9812c test: consolidate redundant coverage (198789, part 2) (openclaw#198932); 90814f5 fix(subagents): stops a finished sub-agent's chat being deleted before its parent reads the result; 799bc0b fix(ci): stabilize hourly fixtures and retire unused exports (openclaw#199851); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); a4cc2ad fix: undo cold-session compaction CPU and latency regressions (openclaw#199561); 55fec79 fix(agents): stop divergent mid-turn overflow recovery (openclaw#199636); 2c4413a fix: reduce Gateway stalls under filesystem pressure (openclaw#197510); 37d977f fix: output reducers are skipped in headless and Code Mode runs (openclaw#199434); c9ee264 fix(compaction): concurrent sessions wait for each other's summaries during compaction (openclaw#196550); 2471ddc feat: let agents review generated images before delivery (openclaw#198227); 21f7dc6 fix(github): publication fails with PostgreSQL session or state stores (openclaw#193749); 63d9e57 fix(ci): new PostgreSQL suites are omitted from conformance (openclaw#198390); 466a4b6 fix(telegram): steered answers quote the wrong input (openclaw#178124); 87b6f52 fix(delivery): resend routed Telegram finals after an ambiguous network failure (openclaw#192779); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); cff99b2 fix(agents): keep provider history append-only across runs (openclaw#197874); 8a328bf feat: add an opt-in usage-ranked tool index (openclaw#197128); 097e648 fix(ci): plan only executable infra tests (openclaw#197911); 76385fd fix(models): discovered models become "Unknown model" after restart or an ended sign-in (openclaw#197784); 89d4177 fix(plugin-state): guarded calls fail until Gateway restart after an unknown write outcome (openclaw#197790); baca36e fix(sessions): commit selected invitations with original messages (openclaw#184512); 699e538 fix(sessions): drain passive notices on sessions_send resumes; d6ded18 chore(ci): drop retired test-lines allocation records (2/3) (openclaw#197656); e0dd020 fix(agents): collect process results at suspended-run capacity; 4897740 feat(auth): preserve delegated OCE user profiles and permissions (openclaw#196856); 7197ce1 feat(templates): install bundled plugins through native management (openclaw#196349); 9c6ee9b feat: let Template automations start paused for onboarding (openclaw#196323); 79a6214 fix(message): retain local final replies in conversation history (openclaw#187795); caa978c feat(templates): open durable chat before verified setup (openclaw#196392); 78e73aa fix(sessions): cold PostgreSQL conversations fail after idle readers close (openclaw#189991); b6ed907 perf(sessions): persist active transcript facts for hydration (openclaw#193682); 1595dd2 feat(plugins): reauthorize accepted session work (openclaw#176886); b43ad0a fix(models): avoid reloading plugins on catalog refresh (openclaw#193903); 0947d02 fix(ci): avoid unrelated PostgreSQL runs and admit owned tests (openclaw#193870); 428ca7d feat(openclaw-id): add Gateway membership authority and publication behind the Labs flag (openclaw#192335); c718583 fix(update): repair refuses forever after a verified update fails a later step (openclaw#193132); 3f64174 fix: deliver background replies after a reload retires the turn registry (openclaw#193130); 982f3b1 fix(imessage): report Automation failures after Gateway updates (openclaw#186117); 31b28e9 fix(agents): wait for a peer OAuth refresh before failing request auth (openclaw#192906); cf50d4a feat(storage): support read-only PostgreSQL standby inspection (openclaw#192645); 82fd4e6 fix(agents): retain stale session target refusal reasons (openclaw#192681); 8ac4e19 fix(worktrees): reserve capacity on PostgreSQL (openclaw#192537); 718b349 fix: reduce session startup stalls under storage contention; 08f4a19 refactor(skills): move Skill Workshop into its bundled plugin (openclaw#192471); 837402a fix(clawrouter): keep upstream credit failures off the shared key (openclaw#192575); f38495f fix(plugins): reject late routing from canceled runs (openclaw#192492); dc5d61a improve(sessions): reduce unnecessary maintenance query rows (openclaw#192023); c4bf0dc fix(sessions): avoid extra maintenance scans for embedded archives (openclaw#184507); e44b3d6 fix(team-reports): recover after database connection loss (openclaw#192020); 991fb33 fix(logbook): recover after database connection loss (openclaw#192011); e6d0d2e fix(test): include omitted PostgreSQL conformance suites (openclaw#191962); da5ff0f fix(codex): reject native hooks from a previous run (openclaw#191788); 09f0b0b feat(plugins): add skill usage runtime for plugins (openclaw#191661); 00b2ff4 fix: parent sessions miss child approvals with a custom session store (openclaw#189827); be44b10 fix: stop completed session writes retaining request data (openclaw#191197); d40aa7c fix(sessions): replay creation requests across Gateway restarts (openclaw#190862); d894035 fix: await Doctor shared-state repair preparation (openclaw#190875); b515cc7 feat: fork threaded conversations with Telegram support (openclaw#190783); def6349 feat(plugins): plugins can run a hidden forked turn of a session with their own tools (openclaw#190950); d983e34 feat(plugins): plugin commands can continue the agent with a replacement prompt, on every channel (openclaw#190908); ea3f0b8 fix(ci): provision Node test prerequisites and retain Baseten routing (openclaw#191050); 29503e1 fix(update): Gateway stays stopped after the updater process dies mid-update (openclaw#188497); fc8c2d0 fix(update): preserve unfinished handoff artifacts (openclaw#190571); 7c26e8c fix(ci): cover PostgreSQL managed update handoffs (openclaw#190336); 4913d41 fix(ci): prevent truncated PostgreSQL target listings (openclaw#189509); 8925f62 fix(gateway): start restored PostgreSQL homes on the first attempt (openclaw#190291); 177fe32 feat(models): preserve inference capabilities in opt-in catalog v3 (openclaw#189678); 7faf32d feat: retain repository disk authority through recovery (openclaw#189106); a658df3 feat(database): capture externally quiesced SQLite migrations; 0f9e7f7 feat(database): capture exact SQLite migration capsules; 4fb684e feat(backup): add PostgreSQL local companion checkpoints; c89a101 fix(doctor): migrate auth profiles on PostgreSQL stores (openclaw#189639); 799de09 fix(ci): split oversized workspace and setup files (openclaw#189356); 21ee847 fix(acp): keep completed run conversations resumable (openclaw#189273); fce0e56 perf(sessions): open cold history without restoring archives (schema 39) (openclaw#188397)

Validation: Baseline1 NUL-binding assertion failure/21passing; candidate22/22passes (188693-green.log). Real SQLite Doctor path and generated SQL proved; no native PostgreSQL server execution claimed.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 0895146d8c1493146f5c6461eee0b10c329bdd1e)
(cherry picked from commit f8ccaa70bc9773d6bbb569bc0e275eee0c544ead)
ccclucky added a commit to ccclucky/openclaw that referenced this pull request Nov 25, 2026
Resolve the test-file conflict from the upstream test consolidation
(openclaw#198916): the staged-sandbox regression tests now live in images.test.ts
next to the folded media-reference coverage, and the stale test-lines
allocation record is dropped because the change stays inside the
400-line allowance.
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. scripts Repository scripts 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