Skip to content

test(core,ui): remove low-value tests (batch d007) - #166689

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d007-1791393247
Oct 7, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d007-1791393247

Conversation

@steipete

@steipete steipete commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repeated and implementation-coupled tests across configuration, infrastructure, agent tools/runtime, Gateway dispatch/MCP, backup, Doctor, and cron UI make the test suite harder to maintain.

User Impact

No production behavior changes. This batch removes redundant test cases and consolidates retained regressions at their existing test owners. Production LOC: +0/-0. Test LOC: +5,488/-12,381 (net -6,893); test routing/inventories/baselines: +0/-15 across four files.

Why This Change Was Made

Replay the ten validated d007 campaign commits onto main at 79e94e64766b93061d7b537d436815a220f6bbe1. Keep distinct authorization, cancellation, lifecycle, race, privacy, and rendering coverage while removing low-value overlap. All ten commits are applied; none skipped.

The only replay conflict was the import block in ui/src/pages/cron/cron-page.lifecycle.test.ts. Retained main's agent-selection import once, added the consolidation's type/agent imports, and preserved main's newer model/provider regression cases. The initial replay dropped no intended hunks; independent review subsequently restored distinct coverage as described below. Baseline edits are shrink-only. No changed path matches the current CODEOWNERS file.

Evidence

Dropped the reduction in src/gateway/mcp-http.completion-lineage.test.ts after its retained transaction-stage watch test failed during the combined focused run. A clean main checkout at d72a907b6125aef3ad98b709c533c8dec2f16c49 passed all 14 cases. The original file and execution order are preserved in the final batch; this is not claimed as a product or flaky-test repair.

Original in-shard coverage evidence is listed below; every shard passed its statement/branch covered-count loss gate (at most 1%). Coverage groups overlap, so these numbers are not additive and are not a new combined-branch coverage run. Original shard totals: test LOC 44,258 → 37,205; declarations 885 → 689; executed cases 1,370 → 953. Final replay LOC above comes from the actual batch diff.

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • Targeted oxfmt --write, git diff --check, and plain oxlint -c .oxlintrc.json: passed, exit 0.
  • Blacksmith Testbox, final head 086659eb72c0f4e2787c399afd97abad842fa2c3: CI=1 pnpm test <66 focused files> passed all 844 tests across nine routed Vitest groups in 446.47 seconds. This includes every surviving changed test plus the restored pager and MCP lineage files. Testbox run.
  • OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <96 changed paths>: did not execute: Testbox allocation tbx_01m4br80231z40etke9xkcfx0w remained queued without a runner for about five minutes and was stopped. This is an infrastructure gap, not a passing changed-file gate. The campaign arming rule delegates final acceptance to hosted openclaw/ci-gate.
  • Independent diff review: five accepted P2 findings repaired; follow-up review of those repairs is clean through P2. One concern rejected with canonical owner evidence below.

No retries, timeouts, assertions, or production behavior were weakened to obtain passing validation.

Independent review raised six P2 coverage concerns. Accepted five: restored the Matrix generated-account SecretRef case in the consolidated redaction suite, exact pager near-miss tables, an independently pinned inherited allowlist, successful queue settlement with a throwing observer, and original runtime-user restoration through an existing context transform. The pager file now matches main.

Rejected the backup scrubbing concern after verifying the unchanged canonical src/snapshot/local-repository.test.ts case sanitizes transient global rows and enforces the global owner. It asserts removal of delivery queues, leases, transient blob rows/bytes, retention of durable plugin rows/bytes, and unchanged live source data. Both snapshot and backup paths call sanitizeOpenClawGlobalStateSnapshot; retained backup alias integration additionally exercises queue/blob and agent-lease scrubbing through archive creation. Restoring the deleted duplicate would not add a distinct contract.

w1069: test LOC 2,423 → 1,843 (-580); declarations 90 → 63 (-27)

Original coverage totals:

covered statements 2447 -> 2443 (-4); branches 1574 -> 1560 (-14); functions 371 -> 370 (-1)

Original commit files:

config/test-mock-exports-baseline.txt
src/config/redact-snapshot.matrix-accounts.test.ts
src/config/redact-snapshot.private-fields.test.ts
src/config/redact-snapshot.restore.test.ts
src/config/redact-snapshot.test.ts
src/config/validation.allowed-values.test.ts
src/config/validation.async.test.ts
src/config/validation.channel-metadata.test.ts
src/config/validation.dm-policy.test.ts
src/config/validation.legacy-rules-fast-path.test.ts
src/config/validation.policy.test.ts
src/config/validation.sandbox-container-env.test.ts
w1068: test LOC 3,768 → 2,490 (-1,278); declarations 90 → 55 (-35)

Original coverage totals:

covered statements 3349 -> 3349 (0); branches 1820 -> 1819 (-1); functions 695 -> 695 (0)

Original commit files:

config/max-lines-baseline.txt
src/infra/host-env-security.pager.test.ts
src/infra/host-env-security.policy-parity.test.ts
src/infra/host-env-security.reported-baseline.test.ts
src/infra/host-env-security.test.ts
src/infra/sqlite-wal.connection-pragmas.test.ts
src/infra/sqlite-wal.mount-timeout.test.ts
src/infra/sqlite-wal.nocow.test.ts
src/infra/sqlite-wal.test.ts
w1070: test LOC 4,728 → 4,417 (-311); declarations 90 → 82 (-8)

Original coverage totals:

covered statements 10114 -> 10114 (0); branches 5889 -> 5888 (-1); functions 1738 -> 1738 (0)

Original commit files:

config/test-mock-exports-baseline.txt
scripts/lib/ci-proof-test-inventory.mts
src/agents/tools/in-process-gateway.cron-completion.test.ts
src/agents/tools/in-process-gateway.test.ts
src/agents/tools/pdf-tool.runtime-abort.test.ts
src/agents/tools/pdf-tool.test.ts
src/agents/tools/transcripts-tool.account-ownership.test.ts
src/agents/tools/transcripts-tool.auto-start.test.ts
src/agents/tools/transcripts-tool.lifecycle.test.ts
src/agents/tools/transcripts-tool.occupancy.test.ts
src/agents/tools/transcripts-tool.selection.test.ts
src/agents/tools/transcripts-tool.test.ts
test/vitest/vitest.database-worker-core-paths.mjs
w1073: test LOC 5,615 → 5,180 (-435); declarations 88 → 78 (-10)

Original coverage totals:

covered statements 9369 -> 9359 (-10); branches 6722 -> 6706 (-16); functions 1629 -> 1623 (-6)

Original commit files:

src/gateway/server-methods.authorization.test.ts
src/gateway/server-methods.control-plane-rate-limit.test.ts
src/gateway/server-methods.dispatch-authorization.test.ts
src/gateway/server-methods.placement-authorization.test.ts
src/gateway/server-methods.plugin-gateway-dispatch.test.ts
src/gateway/server-methods.presence-activity.test.ts
src/gateway/server-methods.profile-authorization.test.ts
src/gateway/server-methods.session-narrow-mutations.test.ts
src/gateway/server-methods.session-patch-orchestration.test.ts
src/gateway/server-methods.suspension-admission.test.ts
w1071: test LOC 3,702 → 3,470 (-232); declarations 89 → 79 (-10)

Original coverage totals:

covered statements 15339 -> 15343 (4); branches 9681 -> 9678 (-3); functions 2812 -> 2814 (2)

Original commit files:

src/agents/embedded-agent-runner/run/attempt.llm-boundary.cache-stability.test.ts
src/agents/embedded-agent-runner/run/attempt.llm-boundary.steering.test.ts
src/agents/embedded-agent-runner/run/attempt.llm-boundary.test.ts
src/agents/embedded-agent-runner/run/attempt.prompt-helpers.test.ts
src/agents/embedded-agent-runner/run/attempt.queue-message.test.ts
w1072: test LOC 4,133 → 3,270 (-863); declarations 89 → 61 (-28)

Original coverage totals:

covered statements 3416 -> 3417 (1); branches 2526 -> 2526 (0); functions 684 -> 684 (0)

Original commit files:

scripts/lib/ci-proof-test-inventory.mts
ui/src/pages/cron/cron-page.delivery-conversations.test.ts
ui/src/pages/cron/cron-page.lifecycle.test.ts
ui/src/pages/cron/cron-page.pacing.test.ts
ui/src/pages/cron/cron-page.route-hydration.test.ts
ui/src/pages/cron/cron-page.runtime.test.ts
ui/src/pages/cron/cron-page.test.ts
ui/src/pages/cron/cron-page.visibility.test.ts
ui/src/pages/cron/view.editor.test.ts
ui/src/pages/cron/view.test.ts
w1079: test LOC 5,569 → 5,172 (-397); declarations 86 → 79 (-7)

Original coverage totals:

covered statements 6505 -> 6506 (1); branches 4375 -> 4368 (-7); functions 1214 -> 1213 (-1)

Original commit files:

src/gateway/mcp-http.archive-authority.test.ts
src/gateway/mcp-http.completion-lineage.test.ts
src/gateway/mcp-http.keepalive.test.ts
src/gateway/mcp-http.plugin-reload.test.ts
src/gateway/mcp-http.question-authority.test.ts
src/gateway/mcp-http.session-controls.test.ts
src/gateway/mcp-http.test.ts
w1074: test LOC 4,143 → 3,388 (-755); declarations 88 → 68 (-20)

Original coverage totals:

covered statements 3700 -> 3700 (0); branches 2511 -> 2511 (0); functions 603 -> 603 (0)

Original commit files:

src/agents/embedded-agent-runner/run/lane-controller.group-wait.test.ts
src/agents/embedded-agent-runner/run/lane-controller.lifecycle.test.ts
src/agents/embedded-agent-runner/run/lane-controller.queue-liveness.test.ts
src/agents/embedded-agent-runner/run/lane-controller.test.ts
src/agents/embedded-agent-runner/run/lane-controller.writer-claim.test.ts
src/agents/embedded-agent-runner/run/terminal-resolution.auth.test.ts
src/agents/embedded-agent-runner/run/terminal-resolution.refusal.test.ts
src/agents/embedded-agent-runner/run/terminal-resolution.rejected-tool-call.test.ts
src/agents/embedded-agent-runner/run/terminal-resolution.settled-request.test.ts
src/agents/embedded-agent-runner/run/terminal-resolution.state.test.ts
src/agents/embedded-agent-runner/run/terminal-resolution.test.ts
src/agents/embedded-agent-runner/run/terminal-resolution.tool-use-without-call.test.ts
w1075: test LOC 5,240 → 4,144 (-1,096); declarations 88 → 62 (-26)

Original coverage totals:

covered statements 7296 -> 7452 (156); branches 3864 -> 4031 (167); functions 1430 -> 1466 (36)

Original commit files:

src/infra/backup-create.audit.test.ts
src/infra/backup-create.legacy-audit-lease.test.ts
src/infra/backup-create.opaque-links.test.ts
src/infra/backup-create.ownership.test.ts
src/infra/backup-create.publication.test.ts
src/infra/backup-create.registered-hardlinks.test.ts
src/infra/backup-create.sqlite-hardlinks.test.ts
src/infra/backup-create.test.ts
src/infra/backup-create.vanished.test.ts
src/infra/backup-create.windows.test.ts
w1076: test LOC 4,937 → 3,831 (-1,106); declarations 87 → 62 (-25)

Original coverage totals:

covered statements 2217 -> 2217 (0); branches 1359 -> 1358 (-1); functions 379 -> 379 (0)

Original commit files:

config/test-mock-exports-baseline.txt
src/commands/doctor-session-canonical-keys.address.test.ts
src/commands/doctor-session-canonical-keys.completions.test.ts
src/commands/doctor-session-canonical-keys.owner-repair.test.ts
src/commands/doctor-session-canonical-keys.race.test.ts
src/commands/doctor-session-canonical-keys.test.ts
src/commands/doctor-session-transcripts.missing-index.test.ts
src/commands/doctor-session-transcripts.sqlite.test.ts
src/commands/doctor-session-transcripts.test.ts
src/commands/doctor-state-integrity.cloud-storage.test.ts
src/commands/doctor-state-integrity.linux-storage.test.ts
src/commands/doctor-state-integrity.test.ts
src/commands/doctor-state-integrity.transcripts.test.ts
test/vitest/vitest.database-worker-core-paths.mjs

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@steipete
steipete enabled auto-merge (squash) October 7, 2026 18:04
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling size: XL labels Oct 7, 2026
@steipete
steipete merged commit c938a54 into main Oct 7, 2026
147 of 152 checks passed
@steipete
steipete deleted the tcr/land-d007-1791393247 branch October 7, 2026 18:13
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 7, 2026
2 upstream commits. One conflict, in
src/commands/doctor-session-canonical-keys.owner-repair.test.ts: upstream
openclaw#166689 pruned and simplified this test. Our side had adapted its owner
fixture (assignLegacySessionOwner) and added one feature case, "compares
authority ownership against the selected occupant before stamp
preservation". Resolution takes upstream's file, which passes against this
tree, and appends the feature case unchanged; it needs only helpers upstream's
file already imports. 5/5 under scripts/run-vitest.mjs; commands-doctor test
typecheck shard clean.

Also regenerates docs/reference/database-schemas/worker-access-inventory.md
for this tree (--check reported it stale after the a34319b merge).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Jhynq2GVpzuVQQieebEubg
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
* test(config): deslop w1069 tests

* test(infra): deslop w1068 tests

* test(agents): deslop w1070 tests

* test(gateway): deslop w1073 tests

* test(agents): deslop w1071 tests

* test(ui): deslop w1072 tests

* test(gateway): deslop w1079 tests

* test(agents): deslop w1074 tests

* test(backup): deslop w1075 tests

* test(doctor): deslop w1076 tests

* test: retain distinct security and lifecycle coverage
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 commands Command implementations docker Docker and sandbox tooling gateway Gateway runtime scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant