Skip to content

test(agents,chat,ci): remove low-value tests (batch d309) - #178243

Merged
steipete merged 35 commits into
mainfrom
tcr/land-d309-1792482605
Oct 20, 2026
Merged

steipete merged 35 commits into
mainfrom
tcr/land-d309-1792482605

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This campaign batch reduces repeated test fixtures and assertion scaffolding across provider, agent/reply, chat, and CI-script suites.

User Impact

No production or user-visible behavior change. This is test/support maintenance plus two shrink-only test baselines; no user configuration, schema, dependency, or runtime changes.

Why This Change Was Made

Replayed all 30 supplied d309 commits, in order, onto pinned main 0276fca4ea1a3bbbd683d16a6a0574ed0e3a46f2. The replay retains current-main behavior and adds follow-up repairs for stale fixture declarations and CI type contracts.

Conflict decisions

  • Kept current main unchanged for Anthropic provider-policy, catalog/history/runtime tests: supplied refactors relied on earlier, unlisted fixture changes. The independent provider-discovery and discovery-budget changes remain.
  • Kept current main's Codex session-history test unchanged, including normal, oversized, and incognito projection coverage; incoming work assumed a smaller case matrix.
  • Kept the first supplied reply-lifecycle cleanup but dropped the conflicting later whole-file rewrite, preserving newer audit, cancellation, and compaction assertions.
  • Kept prompt-cache-retention and result-fallback-classifier files unchanged: incoming singleton conversions assumed prior case removals not present on main.
  • Preserved the current resolveSettledToolTerminalContinuation import while accepting the new subscription fixture.
  • Preserved all current ambiguous-patch matching tiers and node-exec approval success/failure branches; accepted standalone fixture cleanups but dropped later conflicting whole-file rewrites.

No complete commit was skipped. The above are partial, file/hunk-level omissions.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <72 changed files>: passed.
  • node_modules/.bin/oxlint -c .oxlintrc.json <72 changed files>: exit 0 after removing two stale local declarations.
  • git diff --check 0276fca4ea1a3bbbd683d16a6a0574ed0e3a46f2: passed.
  • CI-only operator rule: no local Vitest, check-changed, tsgo, coverage, or Testbox/Crabbox execution. Hosted openclaw/ci-gate is the runtime/typecheck merge gate. No leases used.
  • Independent review completed: all six initial findings accepted; the repair delta is scoped-clean at P0–P2.

Production versus test LOC

git diff --numstat against the pinned base: production +0/-0; test and test-support +11,291/-15,206, net -3,915 across 72 test/support files, plus baseline metadata +1/-4 in two files (74 files total). Support is included with tests, not production. No CODEOWNERS patterns match these paths.

Review and first-head CI repairs

The first head's CI run 39390016783 exposed fixture type/lint errors and a steering-stream runtime failure. Auto-merge was disabled during repair; no baseline exception or blind rerun was used.

All six review findings were accepted. These five files were restored to pinned main in full, preserving provider-request steering proof, synchronous stream behavior, positive thinking compatibility, collaborative-steering refusal, secretless producer negative controls, and workflow-expression defaults:

  • src/agents/embedded-agent-runner/run/attempt-prompt-submit.steering.test.ts
  • src/agents/embedded-agent-runner/model-resolution-consistency.test.ts
  • src/auto-reply/reply/dispatch-from-config.queue-notices.test-support.ts
  • test/scripts/plugin-clawhub-new-workflow.test.ts
  • test/scripts/ci-workflow-complete.test.ts

Remaining fixes restore the workflow-step generic return contract, observer return contract, exact deferred type, DOM/container/callback types, explicit mutation variants and fixture source/path checks. Synthetic process exits remain Error objects. No assertions were weakened to satisfy CI. The repair-only independent review found no actionable P0–P2 issues.

The next head's run 39391973694 found that the fixture source assertion also rejected deliberate literal new-file insertions. That assertion now applies only to callback edits of an existing file; literal insertions still reach the unchanged denial assertions. A focused independent review of this final helper repair is scoped-clean at P0–P2.

The third head's ratchet job measured three remaining timeout-race allowances in test-projects-build-admission.test.ts, down from seven. The baseline entry is shrunk to that exact count; no allowance is added. The same job requested immediately preceding isolation explanations for three compacted mocks. Those comments now document the existing synthetic-process, target-provider, and model-catalog isolation without changing behavior. This metadata-only repair also received a scoped-clean P0–P2 review.

The next exact-head ratchet job confirmed the timeout baseline passes and requested removal of the three now-obsolete mock hash entries. Those exact entries were deleted from config/test-mock-exports-baseline.txt, with no additions. All other selected CI jobs passed on that head. This final three-line baseline-only prune is independently reviewed as scoped-clean.

Per-shard replay inventory

Counts below describe the final replayed files against pinned main, including test-support. Declarations are a static textual count of it/test and .each calls, not executed case counts. The supplied shard reports describe earlier campaign snapshots; their totals are not current-head runtime/coverage evidence. Every supplied report explicitly says coverage was not run in CI-only mode, so there is no in-shard coverage-total line to report.

z0062: LOC 303 → 237 (-66); declarations 8 → 8 (0)
  • extensions/anthropic/provider-discovery.test.ts
  • extensions/anthropic/session-catalog-discovery-budget.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0064: LOC 2828 → 2505 (-323); declarations 43 → 39 (-4)
  • src/agents/embedded-agent-runner/run/attempt-prompt-submit.cache-observation.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-submit.runtime-replay.test.ts
  • src/agents/embedded-agent-runner/run/attempt-recovery.per-day-rate-limit.test.ts
  • src/agents/embedded-agent-runner/run/attempt-recovery.test-support.ts
  • src/agents/embedded-agent-runner/run/attempt-recovery.test.ts
  • src/agents/embedded-agent-runner/run/attempt-required-work.test.ts
  • src/agents/embedded-agent-runner/run/attempt-result.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0065: LOC 3400 → 2705 (-695); declarations 74 → 67 (-7)
  • src/auto-reply/reply/agent-runner-execution-lifecycle.test.ts
  • src/auto-reply/reply/agent-runner-execution-message-authority.test.ts
  • src/auto-reply/reply/agent-runner-execution-message-tools.test.ts
  • src/auto-reply/reply/agent-runner-execution-results.test.ts
  • src/auto-reply/reply/agent-runner-execution-runtime.test.ts
  • src/auto-reply/reply/agent-runner-execution-settled-recovery.test.ts
  • src/auto-reply/reply/agent-runner-execution-suite.test-support.ts
  • src/auto-reply/reply/agent-runner-execution-terminal-failures.test.ts
  • src/auto-reply/reply/agent-runner-failure-reply.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0066: LOC 2346 → 2045 (-301); declarations 24 → 19 (-5)
  • extensions/codex/src/app-server/session-history-control.test.ts
  • extensions/codex/src/app-server/session-history.test-support.ts
  • extensions/codex/src/app-server/settled-turn-context.test.ts
  • extensions/codex/src/app-server/settled-turn-finalizer.native.test.ts
  • extensions/codex/src/app-server/settled-turn-finalizer.test-support.ts
  • extensions/codex/src/app-server/settled-turn-finalizer.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0067: LOC 3115 → 2638 (-477); declarations 46 → 36 (-10)
  • src/auto-reply/reply/directive-handling.mixed-inline.test-helpers.ts
  • src/auto-reply/reply/directive-handling.model-status.test-support.ts
  • src/auto-reply/reply/dispatch-from-config.acp-controller.test.ts
  • src/auto-reply/reply/dispatch-from-config.continuation-settlement.test.ts
  • src/auto-reply/reply/dispatch-from-config.owner-settlement.test.ts
  • src/auto-reply/reply/dispatch-from-config.progress-privacy.test-support.ts
  • src/auto-reply/reply/dispatch-from-config.terminal-recovery.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0068: LOC 2968 → 2663 (-305); declarations 80 → 78 (-2)
  • test/scripts/personal-credential-writer-guard.test.ts
  • test/scripts/pinned-bun.test.ts
  • test/scripts/plugin-binding-command-escape-docker.test.ts
  • test/scripts/plugin-boundary-report.test.ts
  • test/scripts/plugin-inventory-module-refs.test.ts
  • test/scripts/plugin-npm-extended-stable-workflow.test.ts
  • test/scripts/plugin-npm-publication-readback.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0069: LOC 1875 → 1477 (-398); declarations 50 → 42 (-8)
  • src/agents/embedded-agent-runner/model.skip-agent-discovery-hooks.test.ts
  • src/agents/embedded-agent-runner/replay-history.test.ts
  • src/agents/embedded-agent-runner/run.plugin-runtime-refresh.integration.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0070: LOC 3321 → 2880 (-441); declarations 67 → 63 (-4)
  • ui/src/pages/chat/components/chat-tool-card-identity.browser.test.ts
  • ui/src/pages/chat/components/chat-tool-cards.browser.test.tsx
  • ui/src/pages/chat/components/chat-tool-cards.test.tsx
  • ui/src/pages/chat/components/chat-tool-purpose.test.ts
  • ui/src/pages/chat/components/chat-transcript-controller.test.tsx
  • ui/src/pages/chat/components/chat-transcript-end-anchor.test.ts
  • ui/src/pages/chat/components/chat-transcript-end-follow.browser.test.ts
  • ui/src/pages/chat/components/chat-transcript.test-support.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0071: LOC 3320 → 2987 (-333); declarations 58 → 58 (0)
  • test/scripts/test-projects-build-admission.test.ts
  • test/scripts/test-projects-package-directories.test.ts
  • test/scripts/test-skip-inventory.test.ts
  • test/scripts/testbox-command-cwd.test.ts
  • test/scripts/testbox-lease-freshness.test.ts
  • test/scripts/ts-topology.test.ts
  • test/scripts/tsdown-ai-package.test.ts
  • test/scripts/tsdown-runtime-cache.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0072: LOC 3319 → 2866 (-453); declarations 64 → 64 (0)
  • src/agents/apply-patch-ambiguous-hunk.test.ts
  • src/agents/apply-patch-update.test.ts
  • src/agents/apply-patch.test-support.ts
  • src/agents/auth-profiles.provider-refresh-lifecycle.test.ts
  • src/agents/auth-profiles.resolve-auth-profile-order.does-not-prioritize-lastgood-round-robin-ordering.test.ts
  • src/agents/bash-tools.exec-host-node.integration.test.ts
  • src/agents/bash-tools.exec-runtime.cleanup.test.ts
  • src/agents/bash-tools.exec-runtime.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

z0073: LOC 2352 → 2229 (-123); declarations 16 → 14 (-2)
  • test/scripts/ci-windows-process-census.test-support.ts
  • test/scripts/ci-windows-test-plan.test.ts
  • test/scripts/ci-workflow-manifest.test-support.ts
  • test/scripts/ci-workflow-ui-full.test.ts
  • test/scripts/ci-workflow.test-support.ts
  • test/scripts/cli-invocation.test.ts
  • test/scripts/code-mode-matrix-config.test.ts

Source report coverage: not run (CI-only mode). The report's 25%-per-file target was not met; no coverage percentages or execution improvements are claimed.

@steipete
steipete enabled auto-merge (squash) October 20, 2026 08:14
@steipete
steipete disabled auto-merge October 20, 2026 08:19
@steipete
steipete enabled auto-merge (squash) October 20, 2026 08:24
@steipete
steipete disabled auto-merge October 20, 2026 08:33
@steipete
steipete enabled auto-merge (squash) October 20, 2026 08:39
@steipete
steipete disabled auto-merge October 20, 2026 08:53
@steipete
steipete enabled auto-merge (squash) October 20, 2026 08:58
@steipete
steipete disabled auto-merge October 20, 2026 09:03
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates repeated test fixtures and assertions across agent, provider, chat, and tooling suites and shrinks two test baselines.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with no established code defect; supporting CI is substantial, but current-head validation is not green and coverage preservation has no fresh measurement.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR changes tests and baseline metadata only; shipped-runtime demonstration is outside the ordinary proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated fixtures and assertion scaffolding increase the cost of maintaining the test suites.
Reason: Maintainer-authored direction is established, and the verified net reduction serves that maintenance goal without changing product behavior.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open as useful maintainer-directed test cleanup; no discrete introduced regression was established, and the latest required typecheck failure still needs attribution.

Priority: P3
Reviewed head: aa506f280991ec5db757c0fa946572cc98f66993

Before merge

  • Complete next step - Inspect the check-prod-types source diagnostic and determine whether it requires a PR repair or inherited-failure handling.

Findings

None.

Agent review details

How this fits together

These suites feed synthetic inputs through runtime owners and tooling entry points, then assert contracts used by the repository’s CI gates.

flowchart LR
  A[Synthetic inputs] --> B[Shared test fixtures]
  B --> C[Runtime and tooling owners]
  C --> D[Behavioral assertions]
  D --> E[CI merge gate]
Loading

Technical review

Best possible solution:

Retain the fixture consolidation and shrinking baselines while preserving distinct behavioral contracts.

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

This PR does not report a product bug; the observed validation failure is a hosted core typecheck failure whose source diagnostic was unavailable.

Is this the best way to solve the issue?

Consolidating existing owner suites is appropriate here; the inspected changes preserve meaningful rejection, cancellation, delivery, and account-isolation scenarios without adding production machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Plugin-refresh integration tests keeps the original intent (1a9533f: Preserve committed work, route-aware delivery deduplication, and pending media custody across plugin generations.)
  • Codex settled-turn finalization tests keeps the original intent (db98474: Keep summaries on the admitted model and correct account while refusing unsupported supervised finalization without replaying completed actions.)
  • Replay-history tests keeps the original intent (bd5f760: Preserve exact silent-reply semantics and avoid fabricated turn-ending replies.)
  • Chat test fixtures keeps the original intent (4d18f99: Exercise chat widgets and tool previews through the Solid rendering owners.)
  • Scheduler admission tests keeps the original intent (8d1ab6c: Preserve terminal outcomes across runner entry points, including failure and child-group settlement.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ce36412 adds ui/src/ui/chat/tool-cards.test.ts:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ce364121aa4a; files: ui/src/ui/chat/tool-cards.test.ts)

PR surface

Tests -2836, Other -3. Total -2839 across 74 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 72 6767 9603 -2836
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 1 4 -3
Total 74 6768 9607 -2839

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests/support +11,097/-15,012 Shared fixtures and consolidated cases remove 3,915 test lines; no production growth requires justification.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no introduced user-facing runtime change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is test-maintenance cleanup with no introduced user-facing runtime change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attribute the latest core typecheck failure using its source diagnostics.

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 20, 2026, 5:17 AM ET / 09:17 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

The only failed job on reviewed head aa506f280991ec5db757c0fa946572cc98f66993 is check-prod-types (and the aggregate openclaw/ci-gate). All selected runtime/UI tests, test typechecks, lint, security, and baseline ratchets passed.

The same pnpm tsgo:core step fails in scheduled main CI run 39401671859, head 6a2e9a1f9ea002b14e2847e8ca89e2b90c37f59d: https://github.com/openclaw/openclaw/actions/runs/39401671859/job/118557976943 . Both logs report src/plugin-sdk/control-ui-components.ts(14,12): TS2304 Cannot find name 'HTMLElement', control-ui-session-link.ts(32,18): TS2584 Cannot find name 'document', and the ensuing DOM/JSX errors across browser UI modules.

Main commit a2332caed768dab02dfa6586b478c8f89b819535 added src/gateway/chat-display-replay.test-support.ts, which imports browser UI consumers into the DOM-free core TypeScript program. This batch does not change that helper, tsconfig.core.json, or the failing production/UI modules. Main was refreshed before this comment; no subsequent change to that helper or core config fixes the boundary yet.

Landing under the operator's explicit pre-existing-failure rule, with the merge pinned to the reviewed head above. The unrelated main repair remains outside this batch.

@steipete
steipete merged commit a3267d4 into main Oct 20, 2026
137 of 140 checks passed
@steipete
steipete deleted the tcr/land-d309-1792482605 branch October 20, 2026 09:38
Tosko4 added a commit to Tosko4/openclaw that referenced this pull request Oct 20, 2026
Resolve settled-turn test conflicts with openclaw#178243: keep main's flattened
context test and in-file native helpers; re-add only the PR's stage
diagnostics cases and native message history-coverage case.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
…78243)

* test(anthropic): deslop z0062 tests

* test(anthropic): deslop z0062 tests

* test(auto-reply): deslop z0065 tests

* test(auto-reply): deslop z0065 tests

* test(codex): deslop z0066 tests

* test(codex): deslop z0066 tests

* test(codex): deslop z0066 tests

* test(auto-reply): deslop z0067 tests

* test(auto-reply): deslop z0067 tests

* test(auto-reply): deslop z0067 tests

* test(scripts): deslop z0068 tests

* test(scripts): deslop z0068 tests

* test(scripts): deslop z0068 tests

* test(agents): deslop z0069 tests

* test(agents): deslop z0069 tests

* test(agents): deslop z0069 tests

* test(chat): deslop z0070 tests

* test(chat): deslop z0070 tests

* test(chat): deslop z0070 tests

* test(scripts): deslop z0071 tests

* test(scripts): deslop z0071 tests

* test(scripts): deslop z0071 tests

* test(agents): deslop z0064 tests

* test(agents): deslop z0064 tests

* test(agents): deslop z0064 tests

* test(agents): deslop z0072 tests

* test(agents): deslop z0072 tests

* test(agents): deslop z0072 tests

* test(ci): deslop z0073 tests

* test(ci): deslop z0073 tests

* test(auto-reply): reuse shared execution fixture after replay

* test: preserve boundary controls and repair batch fixture types

* test(scripts): allow new literal credential guard fixtures

* test: shrink timeout baseline and document mock isolation

* test: prune retired mock export baseline entries
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 extensions: anthropic extensions: codex P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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