Skip to content

test(core,plugins): remove low-value tests (batch d015) - #167073

Merged
steipete merged 12 commits into
mainfrom
tcr/land-d015-1791444713
Oct 8, 2026
Merged

steipete merged 12 commits into
mainfrom
tcr/land-d015-1791444713

Conversation

@steipete

@steipete steipete commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Batch d015 removes duplicated test scenarios and consolidates split suites whose remaining cases protect the same owners, reducing the maintenance and execution cost of the test suite.

User Impact

No user-visible behavior changes. Production code is unchanged. The replay preserves current-main changes, including the newer steering-custody regression. Retention review restored the private-final, WebSocket, transcript-search and query-budget suites, plus distinct sandbox denial, HTTP lockdown and binary upload, linked-Git rollback, Doctor recovery ordering and state relocation, POSIX snapshot creation, transcript identity, next-date auto-start, and bounded scoped-metadata cases.

Why This Change Was Made

Replay the ten reviewed campaign shards in their original order onto main. All ten applied; none were skipped and no conflicts required resolution. After initial hosted CI exposed an interaction with newly landed main tests, the batch was rebased once onto 6aa926265782b5cf59bf7c1296b877debeb029f9, also without conflicts. A follow-up retention correction drops the private-final, WebSocket, transcript-search, and query-budget deletions and restores the distinct cases listed above. These cases protect contracts that statement/branch coverage totals alone cannot establish. The mock-export baseline shrinks. Test inventories and policy watches transfer protected selection to the surviving sanitizer/shutdown suites and remove obsolete deleted-file entries.

The final batch changes 66 paths: test code +4,310/-8,847 lines (net -4,537); test planning and inventories +2/-13 (net -11); production +0/-0. No CODEOWNERS patterns match the changed paths.

Evidence

  • Local frozen-lockfile install, targeted oxfmt --write, plain oxlint -c .oxlintrc.json, and git diff --check: passed.
  • Blacksmith Testbox CI=1 pnpm test <44 touched test files>: 665 passed, two existing platform skips across 12 groups (720.38 seconds of test orchestration).
  • Retention correction rerun over seven affected files: 116 passed (104.17 seconds).
  • Final boundary correction rerun over seven affected files: 227 passed, two existing platform skips (116.84 seconds).
  • Each remote test command verified SHA-256 source bytes inside the prepared execution checkout before running. Testbox hosting run; command receipts exited 0. Lease cleanup can mark the hosting job cancelled.
  • Initial OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <changed paths> attempt: infrastructure gap, subsequently closed by the successful recovery run below. After source preparation completed, lease tbx_01m4dad7g879vg9w1qz2rjdgq3 timed out after 15 minutes queued without a runner; automatic cleanup stopped it and native status confirmed completion. No changed checks executed; the wrapper exited 1 during runner admission. All focused tests that executed passed; the required hosted openclaw/ci-gate remains the merge gate.
  • Two complete PR-diff reviews were followed by a clean review of the complete correction patch. Accepted and rejected findings are explained below.
  • Initial hosted CI exposed one replay interaction and one typed-lint cleanup omission in reply-run-registry.visibility.test.ts: a newly landed main regression uses an error-class import removed by the earlier reduction, and the narrowed boolean table retained four unnecessary explicit-false comparisons. The import and equivalent boolean checks were repaired after the base refresh. The exact affected suite then passed 23 tests, and the complete changed-file gate passed on fresh Testbox proof, including all 27 core test-type graphs, extension/script types, dead-export scans, and core/extension/script lint. This closes the initial changed-gate infrastructure gap.
  • The final routing-only delta has separate planner proof and a successful changed-file gate for the two routing files on its own Testbox run.

Coverage below is the original per-shard comparison, not a newly measured aggregate coverage claim. Each shard stayed within the 1% covered-statement/branch gate. The w1136 summary report was stale: its later finish log and successful remote coverage snapshot confirm unchanged totals. Some original shard changed checks were interrupted by Testbox infrastructure; the batch validation above reports the current replay separately.

Shard Area Test LOC before → after Declarations before → after Covered statements before → after Covered branches before → after
w1136 commands 5,438 → 4,659 61 → 49 5,994 → 5,994 3,510 → 3,510
w1144 Telegram 2,903 → 2,553 60 → 49 5,823 → 5,823 4,625 → 4,625
w1146 sessions 4,074 → 3,409 68 → 53 7,196 → 7,196 4,113 → 4,112
w1143 package update 3,375 → 2,678 60 → 52 4,008 → 4,008 2,359 → 2,358
w1145 egress proxy 2,513 → 1,969 60 → 41 729 → 729 374 → 374
w1151 browser 2,733 → 2,343 58 → 50 1,227 → 1,227 1,165 → 1,165
w1147 auto-reply 3,029 → 2,735 59 → 55 4,173 → 4,171 3,267 → 3,267
w1152 memory-core 3,293 → 3,089 58 → 53 3,461 → 3,461 2,111 → 2,111
w1154 snapshot 2,049 → 1,682 57 → 44 614 → 614 332 → 332
w1148 transcripts 3,318 → 2,526 59 → 38 1,413 → 1,413 923 → 922

The original shard LOC counts include their full assigned file sets and precede the retention corrections; the net batch delta above is measured from the final candidate against this PR's base. Coverage does not measure spawned process/native worker internals, and Linux results do not establish native Windows/macOS behavior. Declaration targets below 30% were accepted to retain independent regressions, authority boundaries, and ordering proof.

Files touched by each shard

test(commands): deslop w1136 tests

covered statements 5994 -> 5994 (0); branches 3510 -> 3510 (0); functions 1225 -> 1225 (0)

  • scripts/lib/ci-proof-test-inventory.mts
  • src/commands/doctor-config-preflight.admission.process.test.ts
  • src/commands/doctor-config-preflight.legacy-copy.test.ts
  • src/commands/doctor-config-preflight.legacy-owner.process.test.ts
  • src/commands/doctor-config-preflight.pending-read.test.ts
  • src/commands/doctor-config-preflight.plugin-deferral.test.ts
  • src/commands/doctor-config-preflight.plugin-persistence.test.ts
  • src/commands/doctor-config-preflight.pristine.process.test.ts
  • src/commands/doctor-config-preflight.process.test-support.test.ts
  • src/commands/doctor-config-preflight.process.test.ts
  • src/commands/doctor-config-preflight.recovery.test.ts
  • src/commands/doctor-config-preflight.refusal.process.test.ts
  • src/commands/doctor-config-preflight.runtime-owners.test.ts

test(telegram): deslop w1144 tests

covered statements 5823 -> 5823 (0); branches 4625 -> 4625 (0); functions 1103 -> 1103 (0)

  • config/test-mock-exports-baseline.txt
  • extensions/telegram/src/bot-message-context.dm-session.test.ts
  • extensions/telegram/src/bot-message-context.media-carriers.test.ts
  • extensions/telegram/src/bot-message-context.prompt-context.test.ts
  • extensions/telegram/src/outbound-adapter.normalize-payload.test.ts
  • extensions/telegram/src/outbound-adapter.presentation.test.ts
  • extensions/telegram/src/outbound-adapter.sanitize.test.ts
  • extensions/telegram/src/outbound-adapter.telegram-http.test.ts
  • scripts/lib/ci-proof-test-inventory.mts

test(sessions): deslop w1146 tests

covered statements 7196 -> 7196 (0); branches 4113 -> 4112 (-1); functions 1661 -> 1661 (0)

  • src/config/sessions/disk-budget.artifacts.test.ts
  • src/config/sessions/disk-budget.physical-usage.test.ts
  • src/config/sessions/disk-budget.test.ts
  • src/config/sessions/disk-budget.zero-byte.test.ts
  • src/config/sessions/session-cold-storage.preflight.test.ts
  • src/config/sessions/session-cold-storage.publication.test.ts

test(infra): deslop w1143 tests

covered statements 4008 -> 4008 (0); branches 2359 -> 2358 (-1); functions 763 -> 763 (0)

  • src/infra/package-update-swap.bounds.test.ts
  • src/infra/package-update-swap.diagnostics.test.ts
  • src/infra/package-update-swap.freebsd.test.ts
  • src/infra/package-update-swap.integrity.test.ts
  • src/infra/package-update-swap.launcher.test.ts
  • src/infra/package-update-swap.ownership.test.ts
  • src/infra/package-update-swap.test.ts
  • src/infra/package-update-swap.windows.test.ts

test(secrets): deslop w1145 tests

covered statements 729 -> 729 (0); branches 374 -> 374 (0); functions 133 -> 133 (0)

  • src/secrets/egress-proxy/proxy-server.http.test.ts
  • src/secrets/egress-proxy/proxy-server.lifecycle.test.ts
  • src/secrets/egress-proxy/proxy-server.test.ts

test(browser): deslop w1151 tests

covered statements 1227 -> 1227 (0); branches 1165 -> 1165 (0); functions 205 -> 205 (0)

  • config/test-mock-exports-baseline.txt
  • extensions/browser/src/browser-tool.routing-guidance.test.ts
  • extensions/browser/src/browser-tool.tabs.test.ts
  • extensions/browser/src/browser-tool.test.ts

test(auto-reply): deslop w1147 tests

covered statements 4173 -> 4171 (-2); branches 3267 -> 3267 (0); functions 780 -> 779 (-1)

  • src/auto-reply/reply/agent-runner.media-ownership.test.ts
  • src/auto-reply/reply/agent-runner.stalled-turn.test.ts
  • src/auto-reply/reply/reply-run-registry.abort.test.ts
  • src/auto-reply/reply/reply-run-registry.backend-ready.test.ts
  • src/auto-reply/reply/reply-run-registry.control-owner.test.ts
  • src/auto-reply/reply/reply-run-registry.preparation.test.ts
  • src/auto-reply/reply/reply-run-registry.retained-singleton.test.ts
  • src/auto-reply/reply/reply-run-registry.successor-barrier.test.ts
  • src/auto-reply/reply/reply-run-registry.visibility.test.ts

test(memory-core): deslop w1152 tests

covered statements 3461 -> 3461 (0); branches 2111 -> 2111 (0); functions 724 -> 724 (0)

  • extensions/memory-core/src/memory/manager.borrowed-connection.test.ts
  • extensions/memory-core/src/memory/manager.fts-only-reindex.test.ts
  • extensions/memory-core/src/memory/manager.legacy-migration-cleanup.test.ts
  • extensions/memory-core/src/memory/manager.reindex-recovery.test.ts

test(snapshot): deslop w1154 tests

covered statements 614 -> 614 (0); branches 332 -> 332 (0); functions 77 -> 77 (0)

  • src/snapshot/local-repository.test.ts
  • src/snapshot/local-repository.windows-acl-probe.test.ts

test(transcripts): deslop w1148 tests

covered statements 1413 -> 1413 (0); branches 923 -> 922 (-1); functions 342 -> 342 (0)

  • src/transcripts/library.async.test.ts
  • src/transcripts/library.test.ts
  • src/transcripts/status.metadata.test.ts
  • src/transcripts/status.occupancy.test.ts
  • src/transcripts/status.producer.shutdown.test.ts
  • src/transcripts/status.producer.test.ts
  • src/transcripts/status.provider-reload.test.ts
  • src/transcripts/status.test.ts
  • scripts/lib/ci-policy-test-watch.mts
  • test/vitest/vitest.database-worker-core-paths.mjs
Review dispositions

Two full-diff reviews identified retention risks that coverage totals alone missed. Accepted findings were resolved by keeping the independent contracts summarized above; a fresh review of the complete correction patch returned no actionable P0–P2 findings.

The hosted review also identified two real selection gaps. The Telegram sanitizer destination now inherits the deleted suite's protected classification, and SQLite/transcript-worker policy changes select the surviving shutdown suite. Three stale deleted-file inventory entries were removed. The three existing planner suites passed all 94 tests on Testbox (152.74 seconds). Direct planner execution confirmed the sanitizer suite for both package.json and pnpm-lock.yaml changes, and the surviving transcript status suite for SQLite worker and transcript-worker changes.

Rejected findings were checked against the owners and remaining tests:

  • Browser cancellation returns immediately after asserting rejection, before the node-only assertions; both rows passed on Testbox.
  • Plain HTTP missing-auth rejection remains in the absolute-form forwardedRequest auth matrix. Unresolved URL/header sentinels share swapRequestText; worker/lifecycle tests retain no-origin-contact rejection, and WebSocket tests retain URL substitution wiring.
  • Committed-WAL copying remains covered at createVerifiedSqliteSnapshot, which the repository calls through the canonical snapshot-copy owner. Repository restore-content coverage remains.
  • The deleted preserveKeys fixture used an unarchived row that eviction independently excludes. Restoring it would preserve a non-discriminating negative control.
  • Transcript URL sanitization remains covered through a real capture. The distinct changed-invitation lifecycle identity case was restored.
  • The proxy port inequality was inherited, not introduced by this batch. It was removed as nearby cleanup because independent ephemeral ports need not differ; origin and audit assertions still prove forwarding.

@clawsweeper

clawsweeper Bot commented Oct 8, 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 8, 2026 08:52
@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram extensions: memory-core Extension: memory-core scripts Repository scripts commands Command implementations extensions: browser size: XL labels Oct 8, 2026
@steipete
steipete disabled auto-merge October 8, 2026 09:00
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 8, 2026, 6:17 AM ET / 10:17 UTC (Revision 2).

ClawSweeper review

What this changes

This PR consolidates overlapping test suites, removes redundant scenarios, and transfers test-selection entries to surviving suites.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with repaired routing and supporting harness validation; historical comparison remains partially limited.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The maintainer-authored change has no production behavior to demonstrate; reported Testbox suite and planner runs support the test consolidation, and no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes
Reason: Reducing repeated fixtures and equivalent executions lowers maintenance cost. The corrected selection entries preserve the intended protection of consolidated suites.

Merge readiness

⛔ Blocked before merge - 1 item remains

The two prior CI-selection findings are resolved. No new concrete blocking defect was established in the inspected consolidation; this maintainer-authored PR remains useful work rather than a closure candidate.

Priority: P3
Reviewed head: 3d9cf77743ee7fdabd730df430cf870d2e6ac9ab

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.

Findings

None.

Agent review details

How this fits together

OpenClaw’s regression suites exercise runtime contracts with fixtures and isolated processes. CI inventories and policy watches select the suites that should run when source or dependency inputs change.

flowchart TD
  A[Source and dependency changes] --> B[CI test selection]
  B --> C[Surviving regression suites]
  D[Fixtures and isolated processes] --> C
  C --> E[Contract assertions]
  E --> F[Validation results]
Loading

Technical review

Best possible solution:

Keep meaningful regressions at their canonical test owners and preserve their CI-selection guarantees while reducing duplicate execution.

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

Not applicable: this PR reduces test duplication rather than reporting a runtime bug; the prior selection defects can be checked directly in the revised inventories.

Is this the best way to solve the issue?

Yes for the inspected consolidation and routing corrections: surviving suites retain the examined contracts without adding production seams.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness. Added test files: 62.

Security

None.

Evidence

What I checked:

  • Prior sanitizer finding resolved: The surviving normalize-payload suite now occupies the deleted sanitizer suite’s protected-inventory entry and contains the plain-account and named rich-account sanitizer assertions. (scripts/lib/ci-proof-test-inventory.mts:806, 3d9cf77743ee)
  • Prior shutdown-watch finding resolved: The SQLite/transcript-worker watch now selects status.test.ts, which contains the relocated configured-transcript shutdown cleanup scenarios. (scripts/lib/ci-policy-test-watch.mts:1082, 3d9cf77743ee)
  • Shutdown contract retained: The surviving suite exercises late utterances, cleanup failures, durable pre-shutdown notes, and retired callbacks. (src/transcripts/status.test.ts:468, 3d9cf77743ee)
  • Shared timezone coverage remains: A retained tool-boundary test changes the active skill timezone after warming the database worker, checks reordered unzoned dates, and rejects a read whose caller timezone changes during execution; this prevents treating the removed isolated timezone case as complete loss of that contract. (src/agents/tools/transcripts-tool-read.test.ts:93, 3d9cf77743ee)
  • Full review dispositions inspected: The REST body read recovered the omitted review-disposition section. It reports 94 passing planner tests and direct selection checks for package.json, pnpm-lock.yaml, SQLite-worker, and transcript-worker changes. The supplied body identity was SHA-256 07a1c8d4705a9e6fef2c817401df19af59bde1570b43c643f5a76af56461333f. (3d9cf77743ee)
  • History routing: Current-main history connects Peter Steinberger to repeated test-inventory maintenance; the snapshot feature commit identifies Vincent Koc as its author. These are routing facts, not causal attribution. (scripts/lib/ci-proof-test-inventory.mts, 76d6104f7723)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Tests -4542, Other -6. Total -4548 across 66 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 63 4267 8809 -4542
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 2 8 -6
Total 66 4269 8817 -4548

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no production behavior change; the previously identified routing defects are repaired.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is test-maintenance cleanup with no production behavior change; the previously identified routing defects are repaired.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-08T08:59:31.128Z sha 839371b :: blocked before merge. :: [P2] Transfer protected selection to the consolidated sanitizer suite | [P2] Retarget the shutdown policy watch to the surviving suite

Port bf205b2de7d4c75892b7aa159ede27acd352b26e while preserving the newer lane cancellation cases and abort-reason assertions.

Validation: 97 tests passed across seven retained files on Blacksmith Testbox from fresh origin/main f66ca12 plus all ten resolved shard paths. Three deleted suite paths were excluded from the executable test list after the launcher rejected those nonexistent targets. No tests skipped, timeout increases, or assertion weakening during the port. Targeted oxlint and oxfmt checks passed, git diff --check passed, and independent review found no actionable P0-P2 findings.
@steipete
steipete force-pushed the tcr/land-d015-1791444713 branch from 839371b to 3d9cf77 Compare October 8, 2026 10:11
@steipete
steipete enabled auto-merge (squash) October 8, 2026 10:11
@steipete
steipete disabled auto-merge October 8, 2026 10:12
@steipete
steipete enabled auto-merge (squash) October 8, 2026 10:13
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 8, 2026
@steipete
steipete merged commit 36bd762 into main Oct 8, 2026
145 checks passed
@steipete
steipete deleted the tcr/land-d015-1791444713 branch October 8, 2026 10:22
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
)

* test(commands): deslop w1136 tests

* test(telegram): deslop w1144 tests

* test(sessions): deslop w1146 tests

* test(infra): deslop w1143 tests

* test(secrets): deslop w1145 tests

* test(browser): deslop w1151 tests

* test(auto-reply): deslop w1147 tests

Port bf205b2de7d4c75892b7aa159ede27acd352b26e while preserving the newer lane cancellation cases and abort-reason assertions.

Validation: 97 tests passed across seven retained files on Blacksmith Testbox from fresh origin/main 92d3bdb plus all ten resolved shard paths. Three deleted suite paths were excluded from the executable test list after the launcher rejected those nonexistent targets. No tests skipped, timeout increases, or assertion weakening during the port. Targeted oxlint and oxfmt checks passed, git diff --check passed, and independent review found no actionable P0-P2 findings.

* test(memory-core): deslop w1152 tests

* test(snapshot): deslop w1154 tests

* test(transcripts): deslop w1148 tests

* test: retain independent boundary coverage in d015

* test: preserve cleanup coverage on current main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram commands Command implementations extensions: browser extensions: memory-core Extension: memory-core P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant