Skip to content

test(core,plugins,ui): remove low-value tests (batch d621) - #184882

Merged
steipete merged 33 commits into
mainfrom
tcr/land-d621-1793038627
Oct 26, 2026
Merged

steipete merged 33 commits into
mainfrom
tcr/land-d621-1793038627

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces duplicate test proof and repeated fixture scaffolding in campaign batch d621.

User Impact

No production behavior, API, configuration, or visual changes. Retains owner-level lifecycle, security, transport and recovery coverage while consolidating overlapping test cases.

Why This Change Was Made

Replays 29 of the 30 supplied commits onto pinned main, now rebased from 307e5c122274 to bd111bf8e030fd5abddeb89d70d8abdc63467f86. The custodian commit 5e1c913e5297 is already represented by main commit 86deff52b4a7 (#179340), so it is skipped.

Conflict handling:

  • Proxy capture: preserve main's OpenSSL config/argument assertions and callback arguments; retain the real-PEM fixture simplification and owner-level duplicate deletions.
  • Mock baseline: remove the deleted Discord presenter entry and the three removed proxy-capture retirement mocks; preserve all unrelated main-side entries.
  • Agent tool catalog: drop this file's cleanup hunk, preserving main's newer capability, wiring and localization checks.
  • ACP: the combined list/cold-reload fixture failed in CI; drop that consolidation, restore the separate main list and memory-worker tests and their routing entry. Cache/resume cleanup remains.
  • Update cleanup: retain main's structured error envelope and new retirement-error regression.
  • Discord command deployment: drop both command-deploy file hunks because main moved coverage to Client.deployCommands and retired the implementation targeted by the campaign. Scheduler/helper changes remain.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <surviving changed TS/JS files>: exit 0.
  • node_modules/.bin/oxlint -c .oxlintrc.json <surviving changed TS/JS files>: exit 0.
  • git diff --check bd111bf8e030fd5abddeb89d70d8abdc63467f86 HEAD: passed.
  • Per operator CI-only instructions, no local Vitest, check-changed, tsgo, or Testbox runs. No leases used. Hosted openclaw/ci-gate is the runtime/typecheck gate; independent review runs alongside CI.
  • Source shard reports explicitly say tests and coverage were not run in CI-only mode. No coverage totals are available or claimed, and earlier report LOC counts are not used as final replay counts.
  • No touched paths match current CODEOWNERS rules.

Review and CI repairs:

  • Accepted and repaired eight distinct-coverage findings: descendant lease lifetime, native migration journal/future-version assertions, successful stopped recovery retirement, four-worker REST concurrency, manifest-backed TypeSafe catalog rows, mutation of both miss/hit route results, service-stop root/current-authority request, and configured Copilot integration identity precedence.

  • Rejected three duplicate-coverage findings after source inspection: shared blob custody remains at src/proxy-capture/store.sqlite.test.ts:612; worker drain at src/state/openclaw-state-worker-lease.test.ts:239 plus real durable capture at src/proxy-capture/runtime.lifecycle.test.ts:478; native batch/partial errors/metadata/one fetch at extensions/levanto/registration.test.ts:153 and its sentRequest helper.

  • Independent full-batch review and subsequent CI-repair-delta review both finished scoped-clean through P2 after fixes. An intermediate pass flagged unstaged index versions; all repairs are committed.

  • First hosted run 40376796407 identified batch-caused type errors: restored the missing voice-handler guard and generator return undefined; dropped the incompatible Discord interaction-builder refactor. It also found Bun request getter matching and a mutable Copilot expected value; repaired them with explicit field projection and independent literal expected text.

  • Restored the original TypeSafe secret-input mock factory/setup after the mock-export ratchet rejected its changed fingerprint; no new exception or baseline allowance.

  • Untouched reply-agent-turn-preparation.test.ts:646 also had a type error; scheduled main job 121776725394 reproduced the same error. Main then fixed it in a8af441b0efa (fix(test): type the provided reply operation in queued access cases #184907); this branch is now rebased onto that fix. No admin exception used.

  • Fresh run 40379730953 passed the corrected Copilot tests and prior batch type errors. TypeSafe local transport still failed on Bun missing-vs-undefined header matching, so its entire file diff is now dropped: the exact pinned-main fixture and all assertions are restored. The rollback review finished scoped-clean.

  • Latest run 40381394187 additionally required pruning exactly three stale proxy-capture mock fingerprints. Removed those entries only, verified against source and reviewed scoped-clean.

  • Initial CI exercised the changed tests; the revised exact head is pending fresh hosted proof. No local tests/typechecks were run.

  • Head 3837060f5bb7 passed all hosted CI checks in 40384057566, including the required gate. Main advanced into a content conflict before merge. Rebased onto bd111bf8e030fd5abddeb89d70d8abdc63467f86, preserving main's newly added async-store write helper and reapplying the same reviewed duplicate deletions. Fresh-head CI is pending; prior green evidence is not claimed as current-head CI.

Production LOC: +0 / -0 (net 0).

Tests LOC: +1955 / -3191 (net -1236).

Test support/routing LOC: +75 / -138 (net -63).

Shrink-only baseline LOC: +0 / -4 (net -4).

Per-shard final replay accounting

Counts compare current pinned main with the replay. Declarations are static lexical counts of test/it declarations, not expanded table rows. Coverage: not run for every shard per the source reports and CI-only instructions.

o0489

Test LOC 453 → 352 (-101); declarations 7 → 6 (-1). Coverage: not run (source report).

  • src/proxy-capture/ca.test.ts
  • src/proxy-capture/runtime.retirement.test.ts
  • src/proxy-capture/store.async.test.ts

o0492

Test LOC 295 → 206 (-89); declarations 9 → 5 (-4). Coverage: not run (source report).

  • extensions/typesafe/src/decisions.test.ts
  • extensions/typesafe/src/registration.lazy.test.ts
  • extensions/typesafe/src/transport.test-support.ts

o0493

Test LOC 570 → 479 (-91); declarations 16 → 13 (-3). Coverage: not run (source report).

  • src/commands/channels/capabilities.test.ts
  • src/commands/channels/dead-letters.test.ts

o0494

Test LOC 436 → 340 (-96); declarations 17 → 14 (-3). Coverage: not run (source report).

  • extensions/discord/src/activities/interaction.test.ts
  • extensions/discord/src/activities/presenter.test.ts
  • extensions/discord/src/activities/register.test.ts
  • extensions/discord/src/activities/test-helpers.test-support.ts
  • config/test-mock-exports-baseline.txt

o0495

Test LOC 560 → 516 (-44); declarations 16 → 15 (-1). Coverage: not run (source report).

  • extensions/session-share/src/session-catalog.test.ts

o0496

Test LOC 342 → 286 (-56); declarations 6 → 5 (-1). Coverage: not run (source report).

  • src/acp/runtime/session-meta-read.cache.test.ts
  • src/acp/runtime/session-meta-resume.test.ts

o0497

Test LOC 190 → 146 (-44); declarations 4 → 2 (-2). Coverage: not run (source report).

  • src/gateway/talk/handlers/client-fixtures.test-support.ts
  • src/gateway/talk/handlers/voice-channel.test.ts
  • src/gateway/talk/handlers/voice-rpc.test-support.ts

o0498

Test LOC 363 → 295 (-68); declarations 12 → 11 (-1). Coverage: not run (source report).

  • ui/src/lib/agents/creation-recovery.test.ts
  • ui/src/lib/agents/roster-activity.test.ts

o0499

Test LOC 551 → 478 (-73); declarations 13 → 14 (1). Coverage: not run (source report).

  • extensions/github-copilot/stream.test.ts
  • extensions/github-copilot/usage.test.ts

o0500

Test LOC 551 → 440 (-111); declarations 20 → 17 (-3). Coverage: not run (source report).

  • extensions/levanto/sage-transport.test.ts
  • extensions/levanto/sage-validation.test.ts

o0501

Test LOC 550 → 444 (-106); declarations 35 → 28 (-7). Coverage: not run (source report).

  • src/routing/bindings.selection-work.test.ts
  • src/routing/bound-account-read.test.ts
  • src/routing/resolve-route.cache.test.ts
  • src/routing/session-key.test.ts

o0502

Test LOC 541 → 445 (-96); declarations 16 → 11 (-5). Coverage: not run (source report).

  • .agents/skills/update-team-server/controller/migration-admission.test.mjs
  • .agents/skills/update-team-server/controller/operator-profile.test.mjs
  • .agents/skills/update-team-server/controller/reconciliation-terminal-fence.test.mjs
  • .agents/skills/update-team-server/controller/user-ownership.test.mjs

o0503

Test LOC 235 → 216 (-19); declarations 6 → 6 (0). Coverage: not run (source report).

  • src/cli/update-cli/cleanup.test.ts
  • src/cli/update-cli/update-command-legacy-service-stop.test.ts

o0504

Test LOC 124 → 98 (-26); declarations 4 → 4 (0). Coverage: not run (source report).

  • extensions/discord/src/internal/rest-scheduler.test.ts

o0505

Test LOC 526 → 419 (-107); declarations 9 → 8 (-1). Coverage: not run (source report).

  • src/hooks/gmail-watcher.integration.test.ts
  • src/hooks/hooks-install.test.ts
  • src/hooks/loader.cache-invalidation.test.ts
  • src/hooks/workspace.test.ts

o0506

Test LOC 533 → 424 (-109); declarations 31 → 26 (-5). Coverage: not run (source report).

  • src/agents/failover/classify.test.ts
  • src/agents/failover/failover-classification.corpus.test.ts
  • src/agents/failover/retry-evidence.test.ts

o0507

No remaining diff; o0507 was already on main.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@steipete
steipete enabled auto-merge (squash) October 26, 2026 18:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T19:40:42.120789Z b9578ff New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: github-copilot plugin: session-share plugin: typesafe plugin: levanto Levanto Sage decision provider size: XL labels Oct 26, 2026
@steipete
steipete disabled auto-merge October 26, 2026 18:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b9316e263

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates test fixtures and overlapping cases across core, plugins, updater tooling, and the Control UI.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful maintenance direction, but current-head validation exposes introduced fixture failures and source inspection identifies another typecheck blocker.
Proof confidence 🦪 silver shellfish (2/6) This maintainer-authored test cleanup changes no shipped behavior; its test and typecheck defects are recorded as findings.
Patch quality 🦪 silver shellfish (2/6) 4 actionable review findings remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces repeated test scaffolding without adding runtime machinery or changing product contracts.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep this maintainer-authored cleanup open; four introduced test defects need focused repairs before merge.

Priority: P3
Reviewed head: 0b9316e263f4f27a68d8294fa32f5a8f28ec5653

Before merge

  • Assert the absent authorization header separately (P2) - For all three loopback hostnames, a healthy unauthenticated IncomingMessage has no authorization property. toMatchObject requires that property even when its expected value is undefined, so the new assertion fails. Existing CI confirms all three failures, matching the earlier review comment. Keep the URL/host assertion and check request.headers.authorization with toBeUndefined().
  • Build the Copilot expectation from an immutable text value (P2) - The stream patch mutates the system message's content into a text-block array. Reading system.content after awaiting runCopilotStream therefore nests that array inside the expected text field, while the actual text remains a string. CI reports this exact mismatch. Save the original prompt text separately and use that string in the expectation.
  • Seed the canonical database for the ACP cold reload (P2) - state.statePath("openclaw.sqlite") seeds OPENCLAW_STATE_DIR/openclaw.sqlite, but the final listWithoutHostSql({}) resolves OPENCLAW_STATE_DIR/state/openclaw.sqlite. Consequently the cold reload returns [] instead of the seeded row, as CI confirms at line 81. Remove the explicit database override or obtain the canonical path from its existing resolver.
  • Restore narrowing before invoking the indexed voice handler (P2) - talkVoiceHandlers is a Record<string, GatewayRequestHandler>, and method is an arbitrary string. With noUncheckedIndexedAccess enabled, this lookup is possibly undefined. Removing the previous existence check makes the direct invocation fail type checking. Retain the checked local handler rather than invoking the unchecked index.

Findings

  • [P2] Assert the absent authorization header separately — extensions/typesafe/src/local.transport.test.ts:129-132
  • [P2] Build the Copilot expectation from an immutable text value — extensions/github-copilot/stream.test.ts:110-111
  • [P2] Seed the canonical database for the ACP cold reload — src/acp/runtime/session-meta-list.test.ts:45
Agent review details

How this fits together

The changed test suites feed synthetic inputs through runtime owners and transport adapters, then check results, lifecycle behavior, and isolation.

flowchart LR
  A[Test fixtures] --> B[Test runner]
  B --> C[Core runtime owners]
  B --> D[Plugin adapters]
  B --> E[UI state owners]
  C --> F[Contract assertions]
  D --> F
  E --> F
Loading

Technical review

Best possible solution:

Preserve the consolidation while repairing the three failing fixtures and restoring a checked voice-handler lookup.

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

No product bug is claimed; existing CI annotations demonstrate three introduced assertion failures, and source inspection establishes the unchecked handler type error.

Is this the best way to solve the issue?

Consolidating existing owner suites is appropriate, provided fixtures preserve canonical paths, independent expectations, and valid type narrowing.

Full review comments:

  • [P2] Assert the absent authorization header separately — extensions/typesafe/src/local.transport.test.ts:129-132
    For all three loopback hostnames, a healthy unauthenticated IncomingMessage has no authorization property. toMatchObject requires that property even when its expected value is undefined, so the new assertion fails. Existing CI confirms all three failures, matching the earlier review comment. Keep the URL/host assertion and check request.headers.authorization with toBeUndefined().
    Confidence: 1
  • [P2] Build the Copilot expectation from an immutable text value — extensions/github-copilot/stream.test.ts:110-111
    The stream patch mutates the system message's content into a text-block array. Reading system.content after awaiting runCopilotStream therefore nests that array inside the expected text field, while the actual text remains a string. CI reports this exact mismatch. Save the original prompt text separately and use that string in the expectation.
    Confidence: 1
  • [P2] Seed the canonical database for the ACP cold reload — src/acp/runtime/session-meta-list.test.ts:45
    state.statePath("openclaw.sqlite") seeds OPENCLAW_STATE_DIR/openclaw.sqlite, but the final listWithoutHostSql({}) resolves OPENCLAW_STATE_DIR/state/openclaw.sqlite. Consequently the cold reload returns [] instead of the seeded row, as CI confirms at line 81. Remove the explicit database override or obtain the canonical path from its existing resolver.
    Confidence: 1
  • [P2] Restore narrowing before invoking the indexed voice handler — src/gateway/talk/handlers/voice-rpc.test-support.ts:45
    talkVoiceHandlers is a Record<string, GatewayRequestHandler>, and method is an arbitrary string. With noUncheckedIndexedAccess enabled, this lookup is possibly undefined. Removing the previous existence check makes the direct invocation fail type checking. Retain the checked local handler rather than invoking the unchecked index.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test extensions/typesafe/src/local.transport.test.ts extensions/github-copilot/stream.test.ts src/acp/runtime/session-meta-list.test.ts src/gateway/talk/handlers/voice-channel.test.ts
  • pnpm tsgo:core:test
  • pnpm tsgo:extensions:test
  • git diff --check

What I checked:

Likely related people:

  • Vincent Koc: Raw commit a2cf0a7 adds extensions/typesafe/src/local.transport.test.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a2cf0a72b23d; files: extensions/typesafe/src/local.transport.test.ts)

PR surface

Tests -1575, Other -1. Total -1576 across 49 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 48 2123 3698 -1575
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 49 2123 3699 -1576

Labels

Label changes:

  • add P3: This is test maintenance with no shipped behavior change; its introduced failures need repair without indicating an urgent product regression.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is test maintenance with no shipped behavior change; its introduced failures need repair without indicating an urgent product regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed October 26, 2026, 2:36 PM ET / 18:36 UTC.

@steipete
steipete force-pushed the tcr/land-d621-1793038627 branch from 0b9316e to 25ad2f1 Compare October 26, 2026 18:39
@steipete
steipete enabled auto-merge (squash) October 26, 2026 18:39
@steipete
steipete disabled auto-merge October 26, 2026 18:49
@steipete
steipete enabled auto-merge (squash) October 26, 2026 18:50
@steipete
steipete disabled auto-merge October 26, 2026 19:05
@steipete
steipete force-pushed the tcr/land-d621-1793038627 branch from f9e85b6 to 3837060 Compare October 26, 2026 19:08
@steipete
steipete enabled auto-merge (squash) October 26, 2026 19:08
@steipete
steipete disabled auto-merge October 26, 2026 19:34
Replace fake certificate parsing with existing PEM fixtures and narrow the invalid-CA stub to its flag. Replace manual retirement counters/events with mock history while preserving request/terminal ordering, failure identity, and no-reopen checks.

Remove the async shared-blob custody replay covered by store.sqlite.test.ts: preserves %s blob custody and cleanup counts. Keep async delete/purge dispatch and off-main-thread persistence proof; drop redundant worker-message introspection.

CI-only static validation. Cumulative shard reduction: 582 to 526 lines (9.6%). Remaining cold/write reservation, snapshot, drain, and retirement boundaries are distinct; the 20% target remains unmet.
Keep foreign-target and unsupported-voice assertions in the scoped channel replacement flow. Preserve all four ownership retirement cases and the plugin-context regression. Remove unused disk-state setup: managed admin voice calls bypass session facts. Let delegated authority create and retire its own run context instead of pre-registering a preserved context and clearing it separately. Keep shared fixture exports intact for sibling callers.
Share body-stream and validation fixtures; consolidate vendor-limit and redirect tables without dropping their cases. Keep DNS admission, private-network policy, credential stripping, cancellation, image limits, metadata and correlation assertions.

Remove the native-batch replay covered by registration.test.ts: batches mixed scalar kinds with a level rubric and retains partial failures. Its preserves native sort without pairwise fan-out case covers successful sort parsing. Keep wrong-ID rejection in sage-validation.test.ts and malformed-body transport cleanup in sage-transport.test.ts; HTTP 503 retains the generic transport-error branch.

CI-only campaign: oxfmt, plain oxlint and git diff --check passed. Runtime tests and coverage were intentionally not run.
Separate collision coverage from async hook ordering and remove repeated ID variants. The retained colliding-ID/idempotence test and Anthropic SDK loopback test cover normalization; the async-hook test retains post-hook stripping and cache-marker assertions. Reuse tool-message fixtures for provider isolation and simplify response-cancellation recording.
Keep Copilot payload selection once per branch; generic sync/async return and ordering coverage remains in stream-payload-utils.test.ts (settles without changing caller return or phase order). Configured integration identity remains covered by models.test.ts (selects onboarding's starter model using the configured integration identity), while the retained SDK loopback case proves caller precedence and a single wire header. Usage parsing remains in the parses table; routing cases retain raw-token, host and API-version assertions. Trim repeated callback scaffolding and non-driving fixture fields.
Compact account-selection fixtures and parameterize session-key branches without dropping distinct routing behavior. Preserve both peer-kind equivalence directions, unknown-kind fallback, exact aliases, role scopes, owner guards and bounded scan assertions.

Remove fixture-length restatements and one repeated caller-mutation cycle; the retained returned-route isolation test still checks the same mutation boundary. CI-only: oxlint, oxfmt and diff-check pass; runtime and coverage proof deferred to hosted CI. Shard LOC: 550 -> 440.
Port o0496 onto the campaign lane, preserving its newer cold-reload model coverage and resume SQL assertion. Consolidate memory metadata cases and cache lifecycle fixtures, and remove the obsolete worker routing entry.

Validation: oxlint and oxfmt --check passed on all four surviving touched files; git diff --check passed. Tests deferred to landing CI as requested.
Consolidate cleanup JSON assertions and per-case fixture setup; use typed legacy-stop table rows. Retain all distinct schema admission, descendant custody, service-stop gating, and cleanup reporting cases. No production or embedded fixture behavior changes.
Retain descendant custody coverage in update-command-executor-native.test.ts: nested native child retains a settled spawner until its descendant finishes; composed native/config effects retain original authority (healthy-upgrade and spawner-killed). Those cases cover same-root custody, both changed installation roots staying busy, joined tree extinction, and final release. update-command-executor.test.ts additionally retains raw orphan coverage in retains dead-parent custody until its delegated process tree exits. Remove the redundant legacy-stop helper argument-shape assertion while retaining returned state, stop notification, progress, and all refusal cases. CI-only: plain oxlint, oxfmt, and diff checks; no tests run.
Consolidate policy invocation and native receipt fixtures. Keep malformed operator profile validation at the channels entry point, which shares operatorProfile with policy; preserve selected-model and unattended-update rejection checks in the policy suite.
Merge operator profile, user ownership, and reconciliation fences into the existing native controller admission suite. Share imports and CLI proof helpers; retain every ownership refusal as an independently named table row and both late-replacement races.

The removed successful reconciliation helper case is covered by release.test.mjs: a cold restored predecessor starts once through its native owner and verifies without changing config or pointers. Receipt-root and original-witness behavior remains covered by the native restoration and start-permit cases. The forward-version replay uses the same migrationKind inequality branch as the retained 25-to-26 crossing.

CI-only: no test or coverage execution. Plain oxlint and git diff --check pass; oxfmt excludes this directory. Cumulative shard LOC: 541 to 431 (-20.3%).
Trim comparison fixtures and reuse deployment, scheduler, and interaction setup while retaining all 17 cases. Client.deployCommands patches changed localization only retains ordinary command-field and Discord metadata comparison coverage; null localization, nsfw metadata, and CJK comparison assertions remain here. Authority tests remain unchanged.
Use Client.deployCommands for cache-failure and application-isolation proof; deploy sequentially so a shared cache key cannot hide behind concurrent lookups. Retain separate cache rows without asserting private key formatting.

Fractional rounding remains in rest-routes.test.ts (rounds fractional millisecond reset-after headers up). Reset waiting and four-worker dispatch remain in rest.test.ts (waits for a rate-limit reset before dispatching; dispatches critical interaction callbacks before older background requests). The retained oversized-wait case also exercises zero retry-after; keep the distinct invalid-deadline scheduler guard and all authority cases.
Reuse the existing hook fixture writer and process-exit waiter. Keep metadata size acceptance and rejection in one discovery scenario, preserving both warning checks and exact-limit acceptance. Installed-hook execution retains proof formerly duplicated by the handler file readback; on-disk stat equality retains the source byte-length assertion. Preserve all path-escape, hardlink, install layout, import freshness, and process-tree shutdown behaviors.
Keep install destinations, persisted enablement, discovery exclusion, and real handler execution while removing duplicate record fields and internal load counts. The CLI hook-pack install and hook-install transaction suites retain record-owner proof. Keep one non-RangeError discovery read case with explicit private-content redaction. Preserve both cache freshness branches and capture parent/child PIDs atomically in the Gmail fixture.
Reuse rejection and TPM fixtures and trim repeated assertion scaffolding. Keep corpus isolation and all classification, auth, conversation-state and retry-precedence behaviors.

Remove six retry-parser replays covered by packages/ai/src/internal/retry-after.test.ts: parses retry-text durations with the same grammar the failover path uses, and validates HTTP dates. Retain rounding, infinity, reset precedence and structured RetryInfo integration cases.

CI-only validation: plain oxlint, oxfmt and git diff --check. No tests or coverage runs. Lines 533 -> 494 (7.3%); below the 20% target because remaining cases protect distinct behavior.
Consolidate raw and structured classification cases into the policy table, retain one representative per auth status matching branch, and share minimal RetryInfo fixtures. Keep auth, replay, provider, timing and image-exclusion outcomes asserted.

Remove the redundant billing-custom-proxy corpus case: classification policy's billing validationSignal(402) row retains the explicit-402 fallback without billing hints. Replace the oversized image predicate payload with overlapping tool_use.id and image-dimension evidence so the exclusion guard is directly exercised.

CI-only: plain oxlint, oxfmt and git diff --check passed; no tests run. Shard lines from original baseline: corpus 209 to 172, classify 184 to 145, retry evidence 140 to 107; total 533 to 424 (20.5 percent reduction).
@steipete
steipete force-pushed the tcr/land-d621-1793038627 branch from 3837060 to b9578ff Compare October 26, 2026 19:38
@steipete
steipete enabled auto-merge (squash) October 26, 2026 19:38
@steipete
steipete merged commit 6f3b2b3 into main Oct 26, 2026
119 checks passed
@steipete
steipete deleted the tcr/land-d621-1793038627 branch October 26, 2026 20:01
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…184882)

* test(proxy-capture): simplify o0489 fixtures and duplicate proof

Replace fake certificate parsing with existing PEM fixtures and narrow the invalid-CA stub to its flag. Replace manual retirement counters/events with mock history while preserving request/terminal ordering, failure identity, and no-reopen checks.

Remove the async shared-blob custody replay covered by store.sqlite.test.ts: preserves %s blob custody and cleanup counts. Keep async delete/purge dispatch and off-main-thread persistence proof; drop redundant worker-message introspection.

CI-only static validation. Cumulative shard reduction: 582 to 526 lines (9.6%). Remaining cold/write reservation, snapshot, drain, and retirement boundaries are distinct; the 20% target remains unmet.

* test(proxy-capture): consolidate o0489 owner-level proof

Drop snapshot replay covered by openclaw-state-db-readonly.test.ts: reads fresh authority without replacing an inherited discovery snapshot. Drop release-drain replay covered by openclaw-state-worker-lease.test.ts: drains a command accepted before cold acquisition after its callback returns, with durable capture proof in runtime.lifecycle.test.ts: drains immutable host capture with host-only ownership.

Reuse main-thread SQL observers and replace synthetic retirement context/synchronous-store scaffolding with an isolated real state root and a no-acquisition spy. Preserve retirement error identity, terminal ordering, no end-session write, and no reopening. No production changes or test execution; formatting and plain oxlint pass. Cumulative shard: 582 to 465 lines (-20.1%).

* test(typesafe): deslop o0492 tests

Consolidate hosted-fact header fixtures and capture local HTTP requests without a duplicate projection. Keep every routing, secret-isolation, response-validation and lazy-import case. Readiness remains covered by registration.lazy.test.ts and remote.transport.test.ts; removed catalog assertions checked only fixture construction.

* test(typesafe): consolidate o0492 boundary fixtures

Share the catalog branch harness and batch native, legacy and route-bound catalog assertions. The retained custom/v1 row covers the removed v1/systemone noncanonical-path variant.

Remove the cached initialization-failure replay covered by src/shared/lazy-runtime.test.ts: preserves cached runtime import rejections. Keep TypeSafe import-time authority races, cancellation and distinct caller results; share its existing registration fixture through a cold dynamic import.

Drop fixture-only registration guards already enforced by legacyWireFixture and redundant internal call counts. Preserve local endpoint, stale-key, wire format and socket-reuse boundaries. CI-only static gates: oxfmt, plain oxlint and diff-check. Shard lines: 570 to 456.

* test(channels): deslop o0493 tests

Reuse the channel fixture and real account label formatter; share dead-letter failure setup and table the two account scopes. Keep every scope validation and durable recovery assertion.

Remove mock-only scope output already covered by the install test (custom multiline probe output) and terminal-safe diagnostics test. Remove the timeout text replay: the wall-clock rollback test retains timeout behavior from 80fde8e, while terminal-safe probe failures retain the empty-formatter generic fallback branch.

CI-only validation: plain oxlint, oxfmt, and git diff --check pass. No tests or coverage run. Lines 570 -> 479 (16.0%); cases 27 -> 25. Below the 20% target: remaining checks retain distinct validation, timeout, prepared-account, credential/config, and recovery boundaries.

* test(discord): deslop o0494 tests

Reuse the registered Activity fixture instead of a parallel registration API mock. Keep all distinct protocol, routing, delivery-recovery and persistence-conflict cases. Registration target metadata remains asserted by registers static routes; the launch test retains pending-record identity proof and the watchdog test retains zero pending timers plus no delayed duplicate launch.

* test(discord): consolidate o0494 activity coverage

Keep Activity interaction, presentation and persistence proof in one suite. Consolidate the healthy launch ordering and watchdog checks, table distinct route branches, and retain failed delivery and concurrent store replacement scenarios. The static-registration case owns unavailable presenter proof; the config suite retains absent and empty-secret normalization coverage. Remove the deleted presenter's mock baseline entry.

* test(acp): deslop o0496 tests

Consolidate listing fixtures in "joins immutable current entries with explicit context and after a cold config reload" while retaining warm refresh, cold config, immutable snapshot, and missing-store assertions. Replace manual spy forwarding and cleanup with call observation and scoped disposal; retain every cache and resume check.

* test(session-share): deslop o0495 tests

* test(session-share): consolidate o0495 refresh coverage

Share snapshot withdrawal setup across failure and retirement cases. The failure row retains stale-publication and recovery assertions; config, connection, and disconnect rows retain revocation guards. Remove redundant refresh accounting while preserving backoff, admission, and lifecycle checks.

* test(session-share): deduplicate o0495 paging scenarios

Keep the slow-paging case with all cursor, search, and empty-refresh assertions; it subsumes the fast paging replay. Remove the duplicate admission refresh and one-use deferred helper while preserving concurrency and retirement assertions.

* test(agents): deslop o0498 tests

Reuse creation fixtures and successful receipts while retaining all six recovery and Gateway-target cases. Drop duplicate internal RPC inventories; keep outcome and no-duplicate-write assertions.

Consolidate roster aggregation into preserves row ownership, recency ties, and canonical main precedence, retaining identity, custom main key, fallback preview, activity, empty roster entries, and system-agent exclusion. Keep all internal-preview variants and localization assertions.

CI-only campaign: plain oxlint, oxfmt, and git diff --check passed. Runtime tests and coverage intentionally deferred to hosted CI.

* test(talk): deslop o0497 tests

Consolidate the ordinary channel list/change proof into the retained plugin-context regression. Preserve catalog normalization, no browser handoff, foreign-target rejection, and all four post-await authority boundaries. Flatten trusted chat response fixture nesting without changing settlement ordering.

* test(talk): reduce o0497 fixture layers

Keep foreign-target and unsupported-voice assertions in the scoped channel replacement flow. Preserve all four ownership retirement cases and the plugin-context regression. Remove unused disk-state setup: managed admin voice calls bypass session facts. Let delegated authority create and retire its own run context instead of pre-registering a preserved context and clearing it separately. Keep shared fixture exports intact for sibling callers.

* test(levanto): deslop o0500 tests

Share body-stream and validation fixtures; consolidate vendor-limit and redirect tables without dropping their cases. Keep DNS admission, private-network policy, credential stripping, cancellation, image limits, metadata and correlation assertions.

Remove the native-batch replay covered by registration.test.ts: batches mixed scalar kinds with a level rubric and retains partial failures. Its preserves native sort without pairwise fan-out case covers successful sort parsing. Keep wrong-ID rejection in sage-validation.test.ts and malformed-body transport cleanup in sage-transport.test.ts; HTTP 503 retains the generic transport-error branch.

CI-only campaign: oxfmt, plain oxlint and git diff --check passed. Runtime tests and coverage were intentionally not run.

* test(github-copilot): deslop o0499 tests

Separate collision coverage from async hook ordering and remove repeated ID variants. The retained colliding-ID/idempotence test and Anthropic SDK loopback test cover normalization; the async-hook test retains post-hook stripping and cache-marker assertions. Reuse tool-message fixtures for provider isolation and simplify response-cancellation recording.

* test(github-copilot): consolidate o0499 boundary coverage

Keep Copilot payload selection once per branch; generic sync/async return and ordering coverage remains in stream-payload-utils.test.ts (settles without changing caller return or phase order). Configured integration identity remains covered by models.test.ts (selects onboarding's starter model using the configured integration identity), while the retained SDK loopback case proves caller precedence and a single wire header. Usage parsing remains in the parses table; routing cases retain raw-token, host and API-version assertions. Trim repeated callback scaffolding and non-driving fixture fields.

* test(routing): deslop o0501 tests

Compact account-selection fixtures and parameterize session-key branches without dropping distinct routing behavior. Preserve both peer-kind equivalence directions, unknown-kind fallback, exact aliases, role scopes, owner guards and bounded scan assertions.

Remove fixture-length restatements and one repeated caller-mutation cycle; the retained returned-route isolation test still checks the same mutation boundary. CI-only: oxlint, oxfmt and diff-check pass; runtime and coverage proof deferred to hosted CI. Shard LOC: 550 -> 440.

* test(acp): consolidate o0496 metadata tests

Port o0496 onto the campaign lane, preserving its newer cold-reload model coverage and resume SQL assertion. Consolidate memory metadata cases and cache lifecycle fixtures, and remove the obsolete worker routing entry.

Validation: oxlint and oxfmt --check passed on all four surviving touched files; git diff --check passed. Tests deferred to landing CI as requested.

* test(update-cli): deslop o0503 tests

Consolidate cleanup JSON assertions and per-case fixture setup; use typed legacy-stop table rows. Retain all distinct schema admission, descendant custody, service-stop gating, and cleanup reporting cases. No production or embedded fixture behavior changes.

* test(update-cli): remove duplicated descendant suite for o0503

Retain descendant custody coverage in update-command-executor-native.test.ts: nested native child retains a settled spawner until its descendant finishes; composed native/config effects retain original authority (healthy-upgrade and spawner-killed). Those cases cover same-root custody, both changed installation roots staying busy, joined tree extinction, and final release. update-command-executor.test.ts additionally retains raw orphan coverage in retains dead-parent custody until its delegated process tree exits. Remove the redundant legacy-stop helper argument-shape assertion while retaining returned state, stop notification, progress, and all refusal cases. CI-only: plain oxlint, oxfmt, and diff checks; no tests run.

* test(updater): deslop o0502 tests

Consolidate policy invocation and native receipt fixtures. Keep malformed operator profile validation at the channels entry point, which shares operatorProfile with policy; preserve selected-model and unattended-update rejection checks in the policy suite.

* test(updater): consolidate o0502 admission coverage

Merge operator profile, user ownership, and reconciliation fences into the existing native controller admission suite. Share imports and CLI proof helpers; retain every ownership refusal as an independently named table row and both late-replacement races.

The removed successful reconciliation helper case is covered by release.test.mjs: a cold restored predecessor starts once through its native owner and verifies without changing config or pointers. Receipt-root and original-witness behavior remains covered by the native restoration and start-permit cases. The forward-version replay uses the same migrationKind inequality branch as the retained 25-to-26 crossing.

CI-only: no test or coverage execution. Plain oxlint and git diff --check pass; oxfmt excludes this directory. Cumulative shard LOC: 541 to 431 (-20.3%).

* test(discord): deslop o0504 tests

Trim comparison fixtures and reuse deployment, scheduler, and interaction setup while retaining all 17 cases. Client.deployCommands patches changed localization only retains ordinary command-field and Discord metadata comparison coverage; null localization, nsfw metadata, and CJK comparison assertions remain here. Authority tests remain unchanged.

* test(discord): consolidate o0504 boundary proof

Use Client.deployCommands for cache-failure and application-isolation proof; deploy sequentially so a shared cache key cannot hide behind concurrent lookups. Retain separate cache rows without asserting private key formatting.

Fractional rounding remains in rest-routes.test.ts (rounds fractional millisecond reset-after headers up). Reset waiting and four-worker dispatch remain in rest.test.ts (waits for a rate-limit reset before dispatching; dispatches critical interaction callbacks before older background requests). The retained oversized-wait case also exercises zero retry-after; keep the distinct invalid-deadline scheduler guard and all authority cases.

* test(hooks): deslop o0505 tests

Reuse the existing hook fixture writer and process-exit waiter. Keep metadata size acceptance and rejection in one discovery scenario, preserving both warning checks and exact-limit acceptance. Installed-hook execution retains proof formerly duplicated by the handler file readback; on-disk stat equality retains the source byte-length assertion. Preserve all path-escape, hardlink, install layout, import freshness, and process-tree shutdown behaviors.

* test(hooks): consolidate o0505 fixtures and assertions

Keep install destinations, persisted enablement, discovery exclusion, and real handler execution while removing duplicate record fields and internal load counts. The CLI hook-pack install and hook-install transaction suites retain record-owner proof. Keep one non-RangeError discovery read case with explicit private-content redaction. Preserve both cache freshness branches and capture parent/child PIDs atomically in the Gmail fixture.

* test(failover): deslop o0506 tests

Reuse rejection and TPM fixtures and trim repeated assertion scaffolding. Keep corpus isolation and all classification, auth, conversation-state and retry-precedence behaviors.

Remove six retry-parser replays covered by packages/ai/src/internal/retry-after.test.ts: parses retry-text durations with the same grammar the failover path uses, and validates HTTP dates. Retain rounding, infinity, reset precedence and structured RetryInfo integration cases.

CI-only validation: plain oxlint, oxfmt and git diff --check. No tests or coverage runs. Lines 533 -> 494 (7.3%); below the 20% target because remaining cases protect distinct behavior.

* test(failover): consolidate o0506 decision-path coverage

Consolidate raw and structured classification cases into the policy table, retain one representative per auth status matching branch, and share minimal RetryInfo fixtures. Keep auth, replay, provider, timing and image-exclusion outcomes asserted.

Remove the redundant billing-custom-proxy corpus case: classification policy's billing validationSignal(402) row retains the explicit-402 fallback without billing hints. Replace the oversized image predicate payload with overlapping tool_use.id and image-dimension evidence so the exclusion guard is directly exercised.

CI-only: plain oxlint, oxfmt and git diff --check passed; no tests run. Shard lines from original baseline: corpus 209 to 172, classify 184 to 145, retry evidence 140 to 107; total 533 to 424 (20.5 percent reduction).

* test: preserve distinct coverage while landing d621

* test: repair d621 CI fixtures and retain ACP boundaries

* test(typesafe): retain the original local transport fixture

* test(proxy-capture): prune retired mock allowances
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: discord Channel integration: discord cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: github-copilot gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: levanto Levanto Sage decision provider plugin: session-share plugin: typesafe rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant