Skip to content

test(state,secrets,infra): remove low-value tests (batch d189) - #164798

Merged
steipete merged 10 commits into
mainfrom
tcr/land-d189-1791092762
Oct 4, 2026
Merged

steipete merged 10 commits into
mainfrom
tcr/land-d189-1791092762

Conversation

@steipete

@steipete steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The state, secrets, infrastructure, status, video-generation, and worker test suites repeat fixtures and overlapping checks that add maintenance cost without distinct behavioral coverage.

User Impact

No user-visible behavior changes. This batch changes 54 test files only: +4,937/−7,327 test LOC (net −2,390), with 0 production or shared-support LOC changed. Distinct security, ownership, ordering, recovery, and concurrency cases remain.

Why This Change Was Made

Replay the ten audited campaign shards in batch d189 onto main, consolidating related cases into tables, sharing local fixtures, and removing redundant assertions and executions. All ten commits applied in the requested order; none were skipped. There were no content conflicts or manually dropped hunks. Main's newer auth-fixture repair and the three delayed synchronous wake-acknowledgment cases were retained.

No changed path matches the current CODEOWNERS rules. No changelog or production contracts changed.

Evidence

  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • node_modules/.bin/oxfmt --write <54 changed files>: passed; no formatting follow-up needed.
  • git diff --check <base>: passed.
  • node_modules/.bin/oxlint -c .oxlintrc.json <changed files>: exit 0 before each replay commit and on the complete batch.
  • Independent autoreview against the pinned base: both review passes returned no findings at the default P0 threshold. A separate bounded review of the five secrets-test changes and their production owners found no lost security boundary contract.
  • Fresh remote validation gap: Blacksmith Testbox lease tbx_01m42qgd1mpa82sz2wr0x61srk remained queued for approximately 15 minutes with no runner URL and no test command executed. The attempted command was node scripts/crabbox-wrapper.mjs run --id <lease> --timing-json --shell -- "CI=1 pnpm install --frozen-lockfile --prefer-offline >/dev/null && CI=1 pnpm test <all 54 changed test files>", with an exact-head assertion before execution.
  • OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <all changed paths> was also attempted through the wrapper; at publication it had not reached remote execution. Neither attempt produced a failing test or check result. These are infrastructure gaps, not passing fresh validation; the original shard runs below passed, and hosted CI must validate this PR head.

Replay base: dac9277a4126b87f2c0b6e0fcca1de9565dc66d7. Reviewed head: a2d9d4736a63156c1569557029b3a612e3a34dc6.

Shard inventory and original campaign coverage

Coverage below is the original in-shard before/after evidence, not a new aggregate coverage run. Declaration totals include untouched files owned by each shard; LOC changes describe the replayed commit. Every shard met the ≤1% covered-statement/branch loss gate. Reduction quotas were not used to delete distinct regression, authority, storage, ordering, or security cases.

u0291

Test LOC: +269/−364 (net -95); declarations: 57 → 51.

Files: src/state/openclaw-state-db-readonly.worker-lifecycle.test.ts, src/state/openclaw-state-lease-acquisition.test.ts, src/state/openclaw-state-lease-async.maintenance.test.ts, src/state/openclaw-state-lease-async.timer.test.ts.

covered statements 3508 -> 3508 (0); branches 1785 -> 1785 (0); functions 745 -> 745 (0)

u0286

Test LOC: +184/−254 (net -70); declarations: 53 → 43.

Files: src/state/agent-deletion-journal.snapshot.test.ts, src/state/agent-deletion-journal.startup.test.ts, src/state/backup-run-records.test.ts, src/state/database-runtime-schema-checks.test.ts, src/state/openclaw-agent-canonical-validation-receipt.test.ts, src/state/openclaw-agent-db-readonly-scope.test.ts.

covered statements 4863 -> 4863 (0); branches 2774 -> 2774 (0); functions 999 -> 999 (0)

u0279

Test LOC: +415/−876 (net -461); declarations: 43 → 30.

Files: src/secrets/model-egress.test.ts, src/secrets/runtime-auth-store-admission.test.ts, src/secrets/runtime-external-channel-audit.test.ts, src/secrets/store/secret-store.redaction.test.ts, src/secrets/store/secret-store.test.ts.

covered statements 1615 -> 1615 (0); branches 918 -> 918 (0); functions 356 -> 356 (0)

u0295

Test LOC: +274/−478 (net -204); declarations: 24 → 15.

Files: src/state/user-profiles.avatar-worker.test.ts, src/status/status-model-auth.test.ts, src/status/status-model-endpoint.test.ts.

covered statements 3037 -> 3024 (-13); branches 1610 -> 1601 (-9); functions 654 -> 650 (-4)

u0245

Test LOC: +646/−741 (net -95); declarations: 68 → 53.

Files: src/infra/sqlite-readonly-location.copy.test.ts, src/infra/sqlite-readonly-location.owned-native.test.ts, src/infra/sqlite-readonly-location.worker.test.ts, src/infra/sqlite-readonly-worker.model-auth.test.ts, src/infra/sqlite-schema-contract.snapshot.test.ts.

covered statements 5171 -> 5170 (-1); branches 2635 -> 2635 (0); functions 971 -> 971 (0)

u0293

Test LOC: +588/−851 (net -263); declarations: 67 → 45.

Files: src/state/openclaw-state-read-worker.test.ts, src/state/openclaw-state-read.quarantine-cleanup.test.ts, src/state/openclaw-state-read.worker.test.ts, src/state/openclaw-state-worker-error.test.ts.

covered statements 3587 -> 3588 (1); branches 2087 -> 2088 (1); functions 708 -> 709 (1)

u0290

Test LOC: +718/−958 (net -240); declarations: 78 → 54.

Files: src/state/openclaw-state-db-read-admission.test.ts, src/state/openclaw-state-db-read-connection.cache.test.ts, src/state/openclaw-state-db-read-connection.test.ts, src/state/openclaw-state-db-readonly.error-mapping.test.ts, src/state/openclaw-state-db-readonly.retained.test.ts, src/state/openclaw-state-db-readonly.snapshot-admission.test.ts, src/state/openclaw-state-db-readonly.test.ts.

covered statements 3250 -> 3250 (0); branches 1924 -> 1924 (0); functions 641 -> 641 (0)

u0292

Test LOC: +554/−800 (net -246); declarations: 58 → 40.

Files: src/state/openclaw-state-lease-heartbeat.diagnostics.test.ts, src/state/openclaw-state-lease-heartbeat.lifetime.test.ts, src/state/openclaw-state-lease-heartbeat.startup.test.ts, src/state/openclaw-state-lease-worker-group.test.ts, src/state/openclaw-state-lease-worker.transaction-group.test.ts, src/state/openclaw-state-maintenance-resources.test.ts, src/state/openclaw-state-read-worker.ownership.test.ts.

covered statements 3948 -> 3946 (-2); branches 2017 -> 2015 (-2); functions 801 -> 801 (0)

u0294

Test LOC: +569/−788 (net -219); declarations: 66 → 46.

Files: src/state/session-repository-workspaces.test.ts, src/state/user-channel-identities.test.ts, src/state/user-model-accounts.test.ts, src/state/user-profile-email.test.ts, src/state/user-profile-list.resident.test.ts, src/state/user-profile-writes.role.test.ts, src/state/user-profiles.avatar-admission.test.ts, src/state/user-profiles.avatar-cache.test.ts.

covered statements 3848 -> 3848 (0); branches 2276 -> 2277 (1); functions 859 -> 859 (0)

u0299

Test LOC: +720/−1217 (net -497); declarations: 72 → 47.

Files: src/video-generation/dashscope-compatible.test.ts, src/worker/launch-descriptor.test.ts, src/worker/node-supervisor-protocol.test.ts, src/worker/node-workspace-protocol.test.ts, src/worker/worker-gateway-tools.test.ts.

covered statements 465 -> 465 (0); branches 438 -> 438 (0); functions 110 -> 110 (0)

Port d759d6f6eace436521bf4235edea360b677169d3 onto the campaign lane, preserving all three delayed synchronous wake acknowledgment cases added on the lane.

Validation: 96 tests passed without skips on Blacksmith Testbox from fresh main plus the seven resolved test files; oxlint, oxfmt --check, and git diff --check passed.
@clawsweeper

clawsweeper Bot commented Oct 4, 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 4, 2026 06:08
@steipete
steipete merged commit 57d98ed into main Oct 4, 2026
108 checks passed
@steipete
steipete deleted the tcr/land-d189-1791092762 branch October 4, 2026 06:17
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 5, 2026
…law#164798)

* test(state): deslop u0291 tests

* test(state): deslop u0286 tests

* test(secrets): deslop u0279 tests

* test(state,status): deslop u0295 tests

* test(infra): deslop u0245 tests

* test(state): deslop u0293 tests

* test(state): deslop u0290 tests

* test(state): deslop u0292 tests

Port d759d6f6eace436521bf4235edea360b677169d3 onto the campaign lane, preserving all three delayed synchronous wake acknowledgment cases added on the lane.

Validation: 96 tests passed without skips on Blacksmith Testbox from fresh main plus the seven resolved test files; oxlint, oxfmt --check, and git diff --check passed.

* test(state): deslop u0294 tests

* test(core): deslop u0299 tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant