Skip to content

test(core, chat): remove low-value tests (batch d639) - #185166

Merged
steipete merged 20 commits into
mainfrom
tcr/land-d639-1793056450
Oct 26, 2026
Merged

steipete merged 20 commits into
mainfrom
tcr/land-d639-1793056450

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Removes redundant test setup and duplicate coverage in campaign batch d639 while retaining current-main behavior.

User Impact

No production behavior changes. This is test/support consolidation only; no runtime production files change.

Why This Change Was Made

Replay the requested campaign commits on pinned main d5d9420d3f37f66431997ab3ad7aa1f9ddded049. Keep the existing runtime owners and boundary assertions; merge the worktree eviction/exact-state suites into removal suites, and share focused fixtures in channels, chat, secrets, updater, and sessions.

19 of 30 commits replayed (some partially); 11 skipped. Review repairs fully revert the retained deltas of 7c3f8f8e53f0 and 3b1be18c9042, leaving 17 original commits with a net contribution. No new dependencies, runtime seams, configuration, migrations, or public APIs.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <changed existing TS/JS files>: passed.
  • node_modules/.bin/oxlint -c .oxlintrc.json <changed existing TS/JS files>: exit 0.
  • git diff --check d5d9420d3f37f66431997ab3ad7aa1f9ddded049: passed.
  • CI-only operator rule: no local Vitest, check-changed, tsgo, coverage, or Testbox execution. PR openclaw/ci-gate is the runtime/typecheck proof; independent review runs while CI is pending.
  • Production LOC: +0/-0. Test and test-support LOC: +1252/-1591 (net -339). Test-routing inventory: +0/-2. Total: +1252/-1593 (net -341).
  • No CODEOWNERS patterns match the changed paths.
  • Source shard reports explicitly state tests and coverage were not run in CI-only mode. They contain no coverage totals; no coverage-threshold claim is made. Some report commit IDs describe earlier passes, so the numbers below are recomputed from this exact replay rather than copied from those reports.
Per-shard exact-base counts and files

Static declaration counts count it/test declarations, not expanded table cases. LOC includes test support. Coverage for every row: not measured (source reports: “Tests and coverage were not run, per CI-only mode”).

Shard LOC before → after Declarations before → after Retained files
o0814 100 → 85 4 → 4 extensions/geolocation/index.test.ts
o0817 100 → 78 9 → 8 packages/llm-core/src/model-contracts/anthropic.test.ts
o0818 100 → 79 5 → 5 src/channels/plugins/contracts/test-helpers/config-write-contract-suites.ts
o0819 100 → 80 4 → 4 src/channels/status/account-state.test.ts
o0820 100 → 80 8 → 7 src/chat/canvas-render.test.ts
o0821 100 → 80 2 → 2 src/process/spawn-broker/handoff.test.ts
k0001 1512 → 1464 26 → 26 src/agents/worktrees/service.eviction-nesting.test.ts
src/agents/worktrees/service.exact-state.test.ts
src/agents/worktrees/service.gc-empty-maintenance.test.ts
src/agents/worktrees/service.removal-budget.test.ts
src/agents/worktrees/service.removal-safety.test.ts
j0241 1616 → 1602 27 → 27 src/secrets/runtime-provider-and-media-surfaces.test.ts
src/secrets/runtime-state.test.ts
j0061 3369 → 3257 87 → 83 ui/src/pages/chat/chat-page.test.ts
ui/src/pages/chat/chat-pending-inputs.test.ts
ui/src/pages/chat/composer-dictation.test.ts
ui/src/pages/chat/composer-persistence.test.ts
j0121 860 → 829 14 → 14 src/infra/install-package-dir.rollback.test.ts
j0181 1384 → 1368 28 → 28 src/sessions/session-controller.lifecycle-diagnostics.test.ts
src/sessions/user-turn-transcript.persistence.test.ts
o0816 unchanged unchanged None: conflicting Teams helper retained from main
k0003 unchanged unchanged None: outbound consolidation skipped
k0002 unchanged unchanged None: Gateway consolidation skipped
k0004 unchanged unchanged None: startup/prompt consolidation skipped
j0361 unchanged unchanged None: plugin UI consolidation skipped

The k0001 file list includes the three deleted suites; every case moves into a surviving removal suite. Two routing entries for retired files are removed.

Replay decisions

Fully skipped:

  • 54610cc7b8e5 (o0816): main's Teams helper now records/responds to token requests. The proposed reject-all interceptor would discard current security/ingress fixture behavior.
  • 17bcb5aa58f4, 1e6f55176546 (k0003): current recovery/completion/send-policy tests and claim setup diverged; preserve main's modified suites instead of moving stale copies.
  • 17a3573545a3, 789150a5fa92, 2dabb9ae6d7f (k0002): current pairing/shutdown/version tests diverged and the proposed merge imports absent server.node-family.test-support. Keep current main fixtures and suites.
  • e2acf3bdb894, 48a38de77206, d75cd252eaea (k0004): current native-bootstrap/migration and prompt fixtures diverged; later commits depend on the dropped merges.
  • 961b652439be (k0001): native-profile/APFS/GC/hooks merge conflicts across rewritten current suites and routing. Retain these current-main suites.
  • 9094d7ec6605 (j0361): both plugin UI files conflict with current fixture/routing changes.

Partially applied:

  • b511cdf5c5c0: retain current auto-cleanup temp tracker and asynchronous DB close; add the moved suite's run-lease reset to that existing teardown.
  • ab84cf05583f: runtime-state only; preserve current provider-integrations file.
  • eb2d6223909d: runtime-state/provider-media only; preserve provider-integrations and runtime-web-tools, and restore the apply file after review.
  • 26f2b533fb6f, 963ee38c633c: preserve current chat-pane-session-events; retain other clean hunks.
  • 8e50775dfefb: pending-input duplicate reduction only. Preserve current chat-page and composer-persistence; the full 50-ID off-page live-input receipt case was restored after review; custody presentation remains covered by chat-thread suites.
  • 49d0b0807482: keep rollback only; preserve package-update-activation-lifetime, run-node, sqlite-readonly-location, and update-database-restore.
  • 7c3f8f8e53f0: ultimately no retained delta; restore finalize-worker to main after review.
  • 1c914feea85e, 3b1be18c9042: preserve current session-lifecycle-admission; the latter now has no retained delta after review restored steering.
  • 77d941591178: preserve current user-turn-transcript; keep only the persistence fixture reuse after restoring the complete steering file.

Review repairs restore the entire update-migrated-finalize.worker file to main (including the changes from c4e0fd543676), preserving unavailable predecessor ownership, durable stop receipts, and restart-pending deadline proof. Geolocation country/countryCode assertions and exactly-once database-load assertion are restored; the malformed allowlist table is removed by restoring secrets/apply.test.ts to main. The complete steering file is restored, including current-authority legacy injection and direct backend rejection/custody coverage. All other listed commits apply completely. Conflicting files are kept byte-for-byte from the pre-pick branch; no blanket baseline regeneration or runtime behavior decisions.

Independent Review

First review: five accepted findings restored geolocation country fields and guarded legacy-injection coverage and removed the finalize-worker changes to retain unavailable predecessor ownership, durable stop receipts, and restart-pending deadline proof. One read-helper warning was rejected: service.removal-budget.test.ts already defines read(directory: string, name = "README.md"), so the moved two-argument calls read the requested file.

Second review: restored the complete steering file to retain direct backend-rejection cleanup, and restored the full 50-ID off-page live-input receipt case. Three index-only findings were resolved by staging the previously completed repairs. Third review: restored secrets/apply.test.ts to remove malformed array parameterization and preserve first-time restrictive-allowlist coverage; restored the geolocation exactly-once database-load assertion. Final repair-only review: scoped-clean through P2, no accepted/actionable findings. The earlier whole-diff review plus this clean repair review cover the final candidate. No local tests or typechecks were run.

The first CI run reported a batch-caused mock-exports failure in update-migrated-finalize.worker.test.ts (new Doctor mock missing isolation annotation): https://github.com/openclaw/openclaw/actions/runs/40418990620/job/121909007042. Restoring that file entirely removes the offending hunk. The repaired head must receive fresh CI; the old red run is not waived.

Loading
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 plugin: geolocation Geolocation plugin (IP to coarse city) scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant