Skip to content

test(providers, cli): remove low-value tests (batch d580) - #184015

Merged
steipete merged 32 commits into
mainfrom
tcr/land-d580-1792975632
Oct 26, 2026
Merged

steipete merged 32 commits into
mainfrom
tcr/land-d580-1792975632

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This test-only batch consolidates repeated fixtures and assertions at their existing owners, and removes duplicate same-path examples. It replays 29 campaign commits onto main at 7f552a02c8995786ec42923ab6fe2648d5cb0afd. No production code or public behavior changes.

Distinct provider validation, cancellation, credentials, security, persistence, transport, and lifecycle checks remain. Shared helpers retain their callers. Duplicate option mapping stays covered by the SDK QA tests; Telegram dispatch by the parent QA CLI tests; retry/header behavior by the provider-error and retry-evidence tests; missing-session fallback by the session-key resolver tests.

Scope and size

Line counts and test declaration counts below compare the pinned base with this branch. Declarations count it/test and their each/for tables, not expanded cases. All files are tests or test support.

Shard File Lines before → after Declarations before → after
s0980 extensions/fireworks/stream.test.ts 234 → 176 4 → 4
s0981 src/cli/nodes-cli/register.camera.test.ts 233 → 172 9 → 8
s0982 extensions/byteplus/video-generation-provider.test.ts 231 → 193 11 → 9
s0983 extensions/admin-http-rpc/src/handler.test.ts 227 → 179 9 → 7
s0984 extensions/msteams/src/qa/adapter.runtime.test.ts 224 → 209 2 → 2
s0985 src/canvas/widget-script-syntax.test.ts unchanged; skipped unchanged
s0986 src/memory/memory-artifact-provenance.test.ts 227 → 170 8 → 7
s0987 packages/ai/src/internal/retry-after.test.ts 226 → 168 16 → 11
s0988 extensions/cua-computer/index.test.ts 223 → 187 8 → 8
s0989 extensions/requesty/provider-models.test.ts 223 → 184 9 → 9
s0990 extensions/qa-lab/src/live-transports/cli.test.ts 222 → 167 6 → 5
s0992 extensions/subq/src/runtime.test.ts 218 → 163 8 → 7
s0993 src/infra/format-time/format-time.test.ts 208 → 172 20 → 17
s0994 extensions/crabbox/doctor-contract-api.test.ts 217 → 200 4 → 4
s0995 extensions/muse/src/test-support/fake-muse.mjs 217 → 188 0 → 0
s0996 ui/src/pages/chat/test-helpers/chat-transcript-native.tsx 264 → 250 0 → 0
s0997 src/commands/agent/session.test.ts 214 → 160 9 → 7

Production LOC: +0 / -0. Test/test-support LOC: +946 / -1616, net -670 across 16 files. Of that, shared test support is +28 / -71; test files are +918 / -1545. No deleted files, baseline changes, or CODEOWNERS-matched paths.

Replay decisions

Applied every listed commit except 8579765feba3d87aef02f06507d9b9129daf8184 (s0985). The canvas test was substantially rewritten on main and conflicted throughout the file. Dropped that complete structural-cleanup commit, preserving main's parsing and diagnostic coverage unchanged. All other commits replayed without conflicts. Later dropped the CUA API mock-compaction hunk to preserve main's exact existing mock baseline identity.

The first CI run found two fixture regressions, repaired without weakening assertions: restore Fireworks' JSON wire serialization (structured cloning retains undefined optional fields), and restore the typed Vitest store spy in Crabbox (the plain callback replacement did not satisfy the generic store signature).

The next run passed those runtime/type checks and found type-aware lint issues in compacted admin/Muse fixtures plus missing per-mock isolation explanations. Restored the function-only timer callback type, normalized socket chunks to strings, restored void early returns, and documented QA transport isolation. A later ratchet pass requested pruning CUA's baseline after adding its isolation explanation; instead, restored main's exact original CUA API mock declaration and dropped only that compaction. No baseline allowances, retries, skips, or weakened assertions were added.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <all 16 changed files>: passed, no additional diff.
  • node_modules/.bin/oxlint -c .oxlintrc.json <all 16 changed files>: exited 0.
  • git diff --check 7f552a02c8995786ec42923ab6fe2648d5cb0afd: passed.
  • Runtime tests, coverage, typechecks, check-changed, and Testbox were deliberately not run locally under the operator's CI-only compute rule. No leases created. openclaw/ci-gate is the hosted proof and merge gate.
  • Coverage totals for every listed shard: unavailable. The supplied per-shard reports explicitly say tests and coverage were not run under CI-only mode; there is no measured coverage delta to quote. Their static case-retention reports are not represented as executed test proof.
  • Independent review covered the complete pinned-base diff. Two findings were rejected after source verification: packages/llm-core/src/utils/event-stream.ts marks a terminal done push complete and resolves the result without requiring end(); repository-wide search found no consumers of the removed Muse rejected-test-key or MUSE_FIXTURE_INHERITED_VALUE controls. Focused P0–P2 reviews of both subsequent CI repair sets were scoped-clean. No measured runtime improvement is claimed.

Share fixed usage fixtures and trim stream setup while preserving all 17 cases and billing, affinity, callback, and routing assertions.

Generic message serialization remains covered by packages/ai/src/openai-completions-messages.test.ts (keeps trailing permission guidance in the system message) and packages/ai/src/transports/openai-completions-transport.test.ts (streams loopback requests with configured SDK timeout). Kimi thinking removal remains asserted by the shard's sanitizes-before-caller-payload-hook cases.

CI-only validation: oxfmt, oxlint, and git diff --check passed. No test or coverage runs.
Consolidate submission/poll/download assertions into the retained malformed-duration success case. Share response setup and table the submit/poll JSON cap checks without removing either boundary. Preserve all distinct request, malformed-response, cancellation, cap, and deadline checks. CI-only validation: oxfmt, plain oxlint, and diff check; tests and coverage deferred to hosted CI.
Reuse SDK response and server fixtures, and share the raw-socket driver across full oversized, partial oversized and stalled uploads. Preserve all 14 cases, including metadata branches, allowlist enforcement, validation errors and close/listener cleanup. Fold Gateway error status proof into the response-mapping table.
Share inbound/outbound bus record construction and bind flow preparation to its adapter fixture. Preserve both transport cases and all existing assertions: readiness, Gateway routing, bootstrap/auth, mentions, conversation scopes, outbound mapping, cleanup, and redirect rejection. The already-consolidated suite has no safe redundant behavior layer to delete.
Revisit PASS 17 layers: preserve readiness rejection/counting, ingress identity and scope, outbound delivery, bootstrap cleanup, and redirect denial. The sibling private-runtime redirect test covers Connector egress, not adapter ingress. Compact the repeated mention fixture without dropping protocol assertions.
Remove unasserted sender-name and chat-text overrides. Preserve distinct readiness, config, bootstrap, ingress and egress protocol, cleanup, and redirect-rejection behavior. No same-path duplicate or retired subject remains in this shard; private-runtime redirects protect a different egress boundary.
Share browser target fixtures and ordinary-risk assertions while retaining every case and security boundary. Remove redundant risk-suite nesting. No production changes; CI-only validation.
Replace store-materialization instrumentation with the retained listing corruption proof: unrelated and expired corrupt rows remain unread, while selected corruption rejects. Share address fixtures and SQL setup without removing persistence, conflict, or trust-boundary cases.
Keep all thirteen cases while consolidating trusted/untrusted lifecycle proof in preserves-origin table. Exact persistence rejection proves promise chaining for write, restore, remove, and clear without a redundant deferred-entry race. Reuse fixture and seed setup, and make conflict injection explicitly one-shot.
Trim unused catalog fixture fields and share projection/error setup. Keep all distinct projection, authentication, cleanup and malformed-catalog assertions. The plugin-level cache TTL test in extensions/requesty/index.test.ts retains the bare/prefixed Claude and non-Claude detection cases; retain the nested-path false positive here. CI-only validation: oxlint, oxfmt and diff-check.
Consolidate HTTP-date cases into a typed table, reuse the mixed-authority error fixture, and replace manual accessor counters with spies. Preserve all retry timing, quota precedence, hostile-metadata, grammar, calendar, leap-second, and rolling-year assertions. CI-only static validation; no tests or coverage run.
Move duplicate predicate and timing-shape checks to the provider-resolution table. Keep each retry syntax, invalid-prose fallback, explicit-header priority and RetryInfo priority observable there. Remove repeated native/record matrix execution; native reads remain covered by the overridden-get test and provider-error.test.ts cases 'preserves SDK retry timing without exposing unrelated headers' and 'projects native quota headers before redaction'.

Retain the common invalid-calendar and weekday guards once across date formats, with every valid format, leap-second and rolling-year path still covered. The failover/retry-evidence.test.ts case 'applies an exhausted-bucket reset only when the provider gave no explicit time' also covers the timing split through its consumer.

CI-only: formatting, diff check and plain oxlint passed; no test runs. Shard LOC 226 -> 168 (25.7% reduction); this follow-up 202 -> 168.
Share command parsing and suite assertions without deleting distinct CLI behavior. Preserve lazy registration and adapter loading, lane dispatch, option/default mapping, scenario normalization, error reporting, and Telegram dispatch. CI-only static validation; all seven expanded cases retained.
Drop generic option-mapping replays covered by src/plugin-sdk/qa-runtime.test.ts (registers shared live transport QA CLI options). Drop Telegram dispatch/defaults replay covered by extensions/qa-lab/src/cli.test.ts (routes telegram CLI defaults into the lane runtime); scenario mapping stays covered at the SDK owner. Retain Discord driver and credential wiring, standard defaults and scenario normalization, lazy runtime boundaries, and failure identity/reporting. Consolidate load counters and fixture guards. CI-only: format, plain oxlint, and diff checks pass; no test runs.
Remove same-path duration variants while retaining unit combinations, rounding thresholds, large values, timezone changes, DST and failure paths. Replace the local assertion loop with individually named table cases.
Share score and bounded-input fixtures without removing any contract assertions. Keep all 28 cases: wire translation, HTTP classifications, input limits, response validation and redaction, credential rotation, and cancellation/admission each protect distinct behavior. The already compact suite cannot safely meet the 25 percent line target; reduce 218 to 212 lines. Static lint/format/diff checks pass; runtime validation is deferred to hosted CI under campaign CI-only mode.
Use a canonical normalized result and shared synthetic credential, consolidate rotation assertions, and rely on inherited Vitest unstub cleanup. Preserve wire translation, status mappings, input and response rejection, no-dispatch authority checks, and terminal cancellation. The live sibling does not replace negative-path coverage. No production changes or test runs; local formatting, diff checks, and oxlint pass.
Reduce the shard from its original 218 lines to 163. Keep HTTP 400 as the unsupported-input branch representative for 413/422 and 503 as the transport representative for 402; retain both authentication statuses. Merge malformed and oversized responses into the parser rejection table, preserving exact unavailable outcomes and no-retry assertions. Remove registration-mock metadata checks and redundant call-count assertions while retaining real endpoint, payload, credential, cancellation, and admission contracts. Share the score legend with isolated mutable response fixtures. Static oxlint, formatting, and diff checks pass; no tests run under CI-only instructions.
Trim migration fixture construction and remove the unobserved context spy while retaining all nine cases. Keep distinct legacy/v2 migration, recovery, unsupported-row preservation, and concurrent publication outcomes. The already-consolidated safety suite cannot meet a 25% line reduction without losing distinct proof.
Share profile and runtime identity fixtures and retain all nine migration, durability, recovery and conflict cases. Remove internal compareAndApply call-count assertions; persisted rows and migration results still prove retry outcomes. CLI and Gateway recovery siblings do not replace Doctor migration guidance, so retain that owner-boundary case.
Share approval-choice construction and shorten turn dispatch without removing fixture scenarios. Preserve deny-only choices, protocol metadata, and delayed native settlement for harness.test.ts and harness-lifecycle.test-support.ts. Runtime and verify-setup callers remain unchanged.
Consolidate prompt-specific response text and redundant reply/return plumbing. Preserve all protocol scenarios, required approval fields, cursor ordering, and delayed settlement. No tests run under CI-only campaign rules.
Repository-wide searches find no consumers of rejected-test-key or MUSE_FIXTURE_INHERITED_VALUE. Remove their stale fixture hooks and use UUIDs for all fresh native sessions; callers assert identity reuse and replacement, not the previous unlogged counter format. Keep initialization, approval, streaming, resume refusal, and native settlement scenarios intact.
Share the content-row callback between native mount and ready-row fixtures, and simplify the bounded scroll fixture without changing lifecycle behavior. Retain the shared harness used by transcript controller, recovery, scroll ownership, and end-follow tests.
Obtain the current transcript session before rendering instead of nesting render work inside the session lookup callback. Preserve session selection, focus forwarding, update ordering, and all test cases.
Consolidate multi-agent store fixtures and trim repeated resolution setup. Keep routing, aliasing, precedence, and cross-agent isolation assertions.

Remove duplicate missing-session fallback coverage: src/agents/command/session.resolve-session-key.test.ts already covers creates a missing session-id target under the roster's default owner.
Share the default-agent and cross-store ID routing fixture while retaining both executed cases and exact entry assertions. Read fixture rows directly instead of wrapping them in an unasserted mock.

Keep the scoped scan assertion focused on agent isolation instead of the full internal request shape. Total shard lines: 214 to 160 (-25.2%); CI-only static gates passed.
@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.

@steipete
steipete enabled auto-merge (squash) October 26, 2026 00:55
@steipete
steipete disabled auto-merge October 26, 2026 01:04
@steipete
steipete enabled auto-merge (squash) October 26, 2026 01:05
@steipete
steipete disabled auto-merge October 26, 2026 01:12
@steipete
steipete enabled auto-merge (squash) October 26, 2026 01:14
@steipete
steipete merged commit 6fc33d1 into main Oct 26, 2026
116 checks passed
@steipete
steipete deleted the tcr/land-d580-1792975632 branch October 26, 2026 01:24
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
…84015)

* test(cli): deslop s0981 tests

* test(fireworks): deslop s0980 tests

* test(fireworks): consolidate s0980 stream fixtures

Share fixed usage fixtures and trim stream setup while preserving all 17 cases and billing, affinity, callback, and routing assertions.

Generic message serialization remains covered by packages/ai/src/openai-completions-messages.test.ts (keeps trailing permission guidance in the system message) and packages/ai/src/transports/openai-completions-transport.test.ts (streams loopback requests with configured SDK timeout). Kimi thinking removal remains asserted by the shard's sanitizes-before-caller-payload-hook cases.

CI-only validation: oxfmt, oxlint, and git diff --check passed. No test or coverage runs.

* test(byteplus): deslop s0982 tests

Consolidate submission/poll/download assertions into the retained malformed-duration success case. Share response setup and table the submit/poll JSON cap checks without removing either boundary. Preserve all distinct request, malformed-response, cancellation, cap, and deadline checks. CI-only validation: oxfmt, plain oxlint, and diff check; tests and coverage deferred to hosted CI.

* test(admin-http-rpc): deslop s0983 tests

Reuse SDK response and server fixtures, and share the raw-socket driver across full oversized, partial oversized and stalled uploads. Preserve all 14 cases, including metadata branches, allowlist enforcement, validation errors and close/listener cleanup. Fold Gateway error status proof into the response-mapping table.

* test(msteams): deslop s0984 tests

Share inbound/outbound bus record construction and bind flow preparation to its adapter fixture. Preserve both transport cases and all existing assertions: readiness, Gateway routing, bootstrap/auth, mentions, conversation scopes, outbound mapping, cleanup, and redirect rejection. The already-consolidated suite has no safe redundant behavior layer to delete.

* test(msteams): compact s0984 mention fixture

Revisit PASS 17 layers: preserve readiness rejection/counting, ingress identity and scope, outbound delivery, bootstrap cleanup, and redirect denial. The sibling private-runtime redirect test covers Connector egress, not adapter ingress. Compact the repeated mention fixture without dropping protocol assertions.

* test(msteams): minimize s0984 ingress fixtures

Remove unasserted sender-name and chat-text overrides. Preserve distinct readiness, config, bootstrap, ingress and egress protocol, cleanup, and redirect-rejection behavior. No same-path duplicate or retired subject remains in this shard; private-runtime redirects protect a different egress boundary.

* test(cua-computer): deslop s0988 tests

Share browser target fixtures and ordinary-risk assertions while retaining every case and security boundary. Remove redundant risk-suite nesting. No production changes; CI-only validation.

* test(memory): deslop s0986 tests

Replace store-materialization instrumentation with the retained listing corruption proof: unrelated and expired corrupt rows remain unread, while selected corruption rejects. Share address fixtures and SQL setup without removing persistence, conflict, or trust-boundary cases.

* test(memory): finish s0986 structural reduction

Keep all thirteen cases while consolidating trusted/untrusted lifecycle proof in preserves-origin table. Exact persistence rejection proves promise chaining for write, restore, remove, and clear without a redundant deferred-entry race. Reuse fixture and seed setup, and make conflict injection explicitly one-shot.

* test(requesty): deslop s0989 tests

Trim unused catalog fixture fields and share projection/error setup. Keep all distinct projection, authentication, cleanup and malformed-catalog assertions. The plugin-level cache TTL test in extensions/requesty/index.test.ts retains the bare/prefixed Claude and non-Claude detection cases; retain the nested-path false positive here. CI-only validation: oxlint, oxfmt and diff-check.

* test(ai): deslop s0987 tests

Consolidate HTTP-date cases into a typed table, reuse the mixed-authority error fixture, and replace manual accessor counters with spies. Preserve all retry timing, quota precedence, hostile-metadata, grammar, calendar, leap-second, and rolling-year assertions. CI-only static validation; no tests or coverage run.

* test(ai): consolidate s0987 retry behavior coverage

Move duplicate predicate and timing-shape checks to the provider-resolution table. Keep each retry syntax, invalid-prose fallback, explicit-header priority and RetryInfo priority observable there. Remove repeated native/record matrix execution; native reads remain covered by the overridden-get test and provider-error.test.ts cases 'preserves SDK retry timing without exposing unrelated headers' and 'projects native quota headers before redaction'.

Retain the common invalid-calendar and weekday guards once across date formats, with every valid format, leap-second and rolling-year path still covered. The failover/retry-evidence.test.ts case 'applies an exhausted-bucket reset only when the provider gave no explicit time' also covers the timing split through its consumer.

CI-only: formatting, diff check and plain oxlint passed; no test runs. Shard LOC 226 -> 168 (25.7% reduction); this follow-up 202 -> 168.

* test(qa-lab): deslop s0990 tests

Share command parsing and suite assertions without deleting distinct CLI behavior. Preserve lazy registration and adapter loading, lane dispatch, option/default mapping, scenario normalization, error reporting, and Telegram dispatch. CI-only static validation; all seven expanded cases retained.

* test(qa-lab): consolidate s0990 owner coverage

Drop generic option-mapping replays covered by src/plugin-sdk/qa-runtime.test.ts (registers shared live transport QA CLI options). Drop Telegram dispatch/defaults replay covered by extensions/qa-lab/src/cli.test.ts (routes telegram CLI defaults into the lane runtime); scenario mapping stays covered at the SDK owner. Retain Discord driver and credential wiring, standard defaults and scenario normalization, lazy runtime boundaries, and failure identity/reporting. Consolidate load counters and fixture guards. CI-only: format, plain oxlint, and diff checks pass; no test runs.

* test(infra): deslop s0993 tests

Remove same-path duration variants while retaining unit combinations, rounding thresholds, large values, timezone changes, DST and failure paths. Replace the local assertion loop with individually named table cases.

* test(subq): deslop s0992 tests

Share score and bounded-input fixtures without removing any contract assertions. Keep all 28 cases: wire translation, HTTP classifications, input limits, response validation and redaction, credential rotation, and cancellation/admission each protect distinct behavior. The already compact suite cannot safely meet the 25 percent line target; reduce 218 to 212 lines. Static lint/format/diff checks pass; runtime validation is deferred to hosted CI under campaign CI-only mode.

* test(subq): consolidate s0992 fixtures and credential assertions

Use a canonical normalized result and shared synthetic credential, consolidate rotation assertions, and rely on inherited Vitest unstub cleanup. Preserve wire translation, status mappings, input and response rejection, no-dispatch authority checks, and terminal cancellation. The live sibling does not replace negative-path coverage. No production changes or test runs; local formatting, diff checks, and oxlint pass.

* test(subq): consolidate s0992 branch coverage

Reduce the shard from its original 218 lines to 163. Keep HTTP 400 as the unsupported-input branch representative for 413/422 and 503 as the transport representative for 402; retain both authentication statuses. Merge malformed and oversized responses into the parser rejection table, preserving exact unavailable outcomes and no-retry assertions. Remove registration-mock metadata checks and redundant call-count assertions while retaining real endpoint, payload, credential, cancellation, and admission contracts. Share the score legend with isolated mutable response fixtures. Static oxlint, formatting, and diff checks pass; no tests run under CI-only instructions.

* test(crabbox): deslop s0994 tests

Trim migration fixture construction and remove the unobserved context spy while retaining all nine cases. Keep distinct legacy/v2 migration, recovery, unsupported-row preservation, and concurrent publication outcomes. The already-consolidated safety suite cannot meet a 25% line reduction without losing distinct proof.

* test(crabbox): consolidate s0994 migration fixtures

Share profile and runtime identity fixtures and retain all nine migration, durability, recovery and conflict cases. Remove internal compareAndApply call-count assertions; persisted rows and migration results still prove retry outcomes. CLI and Gateway recovery siblings do not replace Doctor migration guidance, so retain that owner-boundary case.

* test(muse): deslop s0995 tests

Share approval-choice construction and shorten turn dispatch without removing fixture scenarios. Preserve deny-only choices, protocol metadata, and delayed native settlement for harness.test.ts and harness-lifecycle.test-support.ts. Runtime and verify-setup callers remain unchanged.

* test(muse): compact s0995 fixture responses

Consolidate prompt-specific response text and redundant reply/return plumbing. Preserve all protocol scenarios, required approval fields, cursor ordering, and delayed settlement. No tests run under CI-only campaign rules.

* test(muse): remove unused s0995 fixture branches

Repository-wide searches find no consumers of rejected-test-key or MUSE_FIXTURE_INHERITED_VALUE. Remove their stale fixture hooks and use UUIDs for all fresh native sessions; callers assert identity reuse and replacement, not the previous unlogged counter format. Keep initialization, approval, streaming, resume refusal, and native settlement scenarios intact.

* test(ui): deslop s0996 tests

Share the content-row callback between native mount and ready-row fixtures, and simplify the bounded scroll fixture without changing lifecycle behavior. Retain the shared harness used by transcript controller, recovery, scroll ownership, and end-follow tests.

* test(ui): simplify s0996 session fixture rendering

Obtain the current transcript session before rendering instead of nesting render work inside the session lookup callback. Preserve session selection, focus forwarding, update ordering, and all test cases.

* test(agent): deslop s0997 tests

Consolidate multi-agent store fixtures and trim repeated resolution setup. Keep routing, aliasing, precedence, and cross-agent isolation assertions.

Remove duplicate missing-session fallback coverage: src/agents/command/session.resolve-session-key.test.ts already covers creates a missing session-id target under the roster's default owner.

* test(agent): consolidate s0997 routing fixtures

Share the default-agent and cross-store ID routing fixture while retaining both executed cases and exact entry assertions. Read fixture rows directly instead of wrapping them in an unasserted mock.

Keep the scoped scan assertion focused on agent isolation instead of the full internal request shape. Total shard lines: 214 to 160 (-25.2%); CI-only static gates passed.

* test: preserve fixture serialization and store typing

* test: preserve fixture lint and mock isolation contracts

* test(cua-computer): preserve existing mock baseline identity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant