Repository navigation
test(infra,workers): remove low-value tests (batch d184) - #164628
Conversation
Port shard u0227 while preserving the lane capacity fixture fix already present from de8845f049052aa276c36e9829e8baaa7572f234. Apply the test consolidations from 9b79bc4bbe524e408497a0826a4c8651e6bd35fb. Validated on Blacksmith Testbox from fresh main c732cad plus the seven resolved test files: 99 tests passed across 7 files, no skips. Focused oxlint, oxfmt, diff checks, and independent review passed.
Port 9ac90ae875b72b33841f216daf5096e15273a11b and 933ab48ef072b29fbc762b488883f2ce2f7c0b9b onto the campaign lane. Preserve the newer tool-presentation fixture and both schema-admission cases from HEAD. Validation: fresh-main small-delta Testbox checkout, 4 files and 39 tests passed with no skips (33.04s); oxlint, oxfmt --check, and git diff --check passed. Independent review found no actionable issues.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 8:09 PM ET / October 4, 2026, 00:09 UTC. ClawSweeper reviewWhat this changesThe branch consolidates infrastructure and worker regression tests into shared fixtures and tables while removing overlapping scenarios and assertions. Merge readiness✅ Ready for maintainer review Keep open: this is a coherent test consolidation that remains distinct from current main. No blocking correctness defect was identified in the reviewed changes. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s infrastructure manages updates, SQLite storage, recovery, and background delivery, while worker environments manage remote session execution. These tests supply controlled inputs and faults to those owners and check their observable outcomes. flowchart TD
A[Controlled fixtures and faults] --> B[Parameterized regression tests]
B --> C[Worker session lifecycle]
B --> D[Updates and SQLite storage]
C --> E[Behavior and recovery assertions]
D --> E
E --> F[Test runner and CI results]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -2065. Total -2065 across 58 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep distinct lifecycle, cancellation, durability, and recovery regressions at their owning boundaries while sharing repeated setup. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reduces test duplication rather than repairing a reported runtime failure. Is this the best way to solve the issue? Yes: local fixtures and parameterized cases are an appropriate way to consolidate these tests, and the inspected retained cases preserve important independent boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a0af795745b6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…4628) * test(infra): deslop u0242 tests * test(workers): deslop u0227 tests Port shard u0227 while preserving the lane capacity fixture fix already present from de8845f049052aa276c36e9829e8baaa7572f234. Apply the test consolidations from 9b79bc4bbe524e408497a0826a4c8651e6bd35fb. Validated on Blacksmith Testbox from fresh main 045550c plus the seven resolved test files: 99 tests passed across 7 files, no skips. Focused oxlint, oxfmt, diff checks, and independent review passed. * test(infra): deslop u0243 tests * test(gateway): deslop u0230 tests Port 9ac90ae875b72b33841f216daf5096e15273a11b and 933ab48ef072b29fbc762b488883f2ce2f7c0b9b onto the campaign lane. Preserve the newer tool-presentation fixture and both schema-admission cases from HEAD. Validation: fresh-main small-delta Testbox checkout, 4 files and 39 tests passed with no skips (33.04s); oxlint, oxfmt --check, and git diff --check passed. Independent review found no actionable issues. * test(sqlite): deslop u0246 tests * test(infra): deslop u0231 tests * test(infra): deslop u0247 tests * test(infra): deslop u0244 tests * test(infra): deslop u0248 tests * test(infra): deslop u0241 tests * test(infra): retain distinct boundary cases after consolidation
What Problem This Solves
Infrastructure and worker tests repeat fixtures and overlapping variants, increasing maintenance cost without independent regression coverage.
User Impact
No user-visible behavior changes. This batch changes only 58 test files: +4,072/-6,137 test LOC (net -2,065), with zero production or shared-support LOC changes.
Why This Change Was Made
Consolidate repeated scenarios into tables and shared local fixtures, remove duplicate variants and redundant assertions, and retain distinct authority, cancellation, durability, recovery, and migration regressions. All ten campaign commits replayed in order onto main at
4bcd6956b0a431b3d7024f1ad13095947c242bf8; none were skipped. No conflicts or dropped hunks. Existing main behavior, including the worker-capacity fixture and newer schema-admission cases, is retained.Independent review identified three distinct cases to retain: unsafe-integer cadence, the original three snapshot acquisition/transfer combinations, and unnumbered claim-only audit-migration recovery with claim removal. These were restored within the existing tables. Two other findings were rejected after source inspection: the reserved archive-generation row already retains the full interrupted-downgrade scenario; the removed publication byte-budget replay manually constructed its binding entry and repeated the canonical comparator boundary already covered by the retained reconciliation test. The remaining publication test still asserts actual binding payload bytes.
No paths match the current CODEOWNERS file.
Evidence
OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs --base 4bcd6956b0a431b3d7024f1ad13095947c242bf8 -- <58 changed paths>passed: all five TypeScript graphs, type-aware lint, formatting, dead-export scans, boundary checks, and ratchets. The child marker kept the gate on Testbox. Combined focused rerun plus changed-gate command: 488.467s, exit 0.tbx_01m421j4bnbdkt7f46mdv7k0ft. Proof is the successful command exit/timing receipt; external lease cleanup can cancel the hosting workflow.oxfmt, plainoxlint -c .oxlintrc.jsonacross all 58 files, andgit diff --checkpassed.The coverage figures below are historical in-shard before/after proof, not fresh coverage measurements on this PR base. Every comparison stays within the campaign's 1% covered-statement/branch budget. Declaration counts include table declarations and do not equal executed test counts. Metrics below are measured across the selected commits' changed files and include the review restorations, rather than the older full-shard totals.
Shard coverage and evidence qualifications
u0231 uses the finished-commit log, superseding the initial report blocked by Testbox infrastructure. Its selected five files exactly match the subsequently repaired and validated commit. The repair validation independently records 7,548→7,545 statements and 4,051→4,049 branches with no failed groups; the finished comparison differs by one statement and also passes.
u0241 uses a supplemental seven-file comparison covering every edited file. Its original full-shard comparison excluded a group with an obsolete assertion in the unchanged filesystem test. Main already corrected that assertion in #164438 (
f79dac86bd4); this batch does not reintroduce it.u0230 uses the repaired baseline across all four files. Its four-statement/one-branch decrease is in workspace manifest parsing, with retained byte-boundary proof in the reconciliation and manifest-worker suites. u0243 has one individual worker-pool branch decrease despite aggregate gains. u0227, u0246, u0247, u0244, u0248, and u0241 recorded no per-file drops.
Files touched by each shard
u0242:
src/infra/package-update-swap.integrity.test.ts,src/infra/package-update-swap.windows.test.ts,src/infra/ports-probe.test.ts,src/infra/push-apns-store.worker-read.test.ts,src/infra/restart-stale-pids.authority.test.ts,src/infra/restart-stale-pids.cwd.test.ts.u0227:
src/gateway/worker-environments/placement-session-tool-operations.worker.test.ts,src/gateway/worker-environments/placement-turn-authority.test.ts,src/gateway/worker-environments/placement-turn-claims.worker.test.ts,src/gateway/worker-environments/placement-worker-gate.test.ts,src/gateway/worker-environments/placement-workspace-journal.test.ts,src/gateway/worker-environments/prepared-pool-maintenance.test.ts,src/gateway/worker-environments/project-preparation-verification.test.ts.u0243:
src/infra/restart.deferral-timeout.test.ts,src/infra/run-node-static-assets.test.ts,src/infra/run-node.live-dist.test.ts,src/infra/run-node.runtime-postbuild.test.ts,src/infra/safe-package-install.test.ts,src/infra/session-cost-usage-cache.admission.test.ts.u0230:
src/gateway/worker-environments/worker-turn-rpc.gateway-tools.test.ts,src/gateway/worker-environments/worker-turn-rpc.live-ack.test.ts,src/gateway/worker-environments/workspace-local-reconciliation.test.ts,src/gateway/worker-environments/workspace-publication-input.test.ts.u0246:
src/infra/sqlite-schema-facts.test.ts,src/infra/sqlite-snapshot-cow.test.ts,src/infra/sqlite-snapshot-retirement.test.ts,src/infra/sqlite-snapshot-single-flight.test.ts,src/infra/sqlite-snapshot-staging-runtime.test.ts,src/infra/sqlite-snapshot-staging.cancellation.test.ts.u0231:
src/index.entrypoint.test.ts,src/infra/agent-activity-events.test.ts,src/infra/agent-database-readers.test.ts,src/infra/backup-create.ownership.test.ts,src/infra/backup-retention.test.ts.u0247:
src/infra/sqlite-snapshot.transfer.test.ts,src/infra/sqlite-transaction.diagnostics.test.ts,src/infra/sqlite-wal-checkpoint.test.ts,src/infra/sqlite-wal.checkpoint-tick.test.ts,src/infra/sqlite-worker-contract.test.ts,src/infra/sqlite-worker-input-preparation.test.ts.u0244:
src/infra/session-cost-usage-worker-refresh.test.ts,src/infra/session-delivery-queue-runtime.test.ts,src/infra/session-event-wake.poll-disposition.test.ts,src/infra/shell-env.test.ts,src/infra/sqlite-exit-close.test.ts,src/infra/sqlite-index-corruption.test.ts.u0248:
src/infra/sqlite-worker-transcripts.test.ts,src/infra/ssh-tunnel.test.ts,src/infra/startup-migration-checkpoint.inspection.test.ts,src/infra/state-migrations.audit-logs.test.ts,src/infra/state-migrations.media-persistence.canonical-archives.test.ts,src/infra/state-migrations.meeting-transcripts-stage-cleanup.test.ts.u0241:
src/infra/package-dist-inventory.test.ts,src/infra/package-lifecycle.ownership.test.ts,src/infra/package-update-activation-durability.test.ts,src/infra/package-update-activation-journal.test.ts,src/infra/package-update-activation-lifetime.test.ts,src/infra/package-update-lifecycle.test.ts.