Repository navigation
test(update,backup,doctor): remove low-value tests (batch d077) - #159952
Conversation
|
🦞👀 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: blocked before merge. Reviewed September 27, 2026, 7:23 PM ET / 23:23 UTC. ClawSweeper reviewWhat this changesThe branch consolidates fixtures and removes cases from OpenClaw’s updater, backup, and Doctor test suites without changing production code. Merge readiness⛔ Blocked before merge - 4 items remain Keep open. The cleanup has focused validation, but it removes the updater’s caller-level checks for plugin persistence after update authority is revoked. The retained generic lease tests do not exercise that call site. Priority: P3 Review scores
Verification
How this fits togetherThese maintenance tests feed staged state and failures into the update, backup, and Doctor commands. Their assertions tell CI whether recovery, privacy, ownership, and configuration behavior remains protected. flowchart LR
A[Update scenarios] --> D[Maintenance tests]
B[Backup scenarios] --> D
C[Doctor scenarios] --> D
D --> E[Boundary assertions]
E --> F[CI results]
Before merge
Findings
Agent review detailsSecurityNeeds attention: No production or supply-chain code changes, but the diff removes updater-level regression checks for revoked authority over plugin persistence. PR surfaceTests -1318. Total -1318 across 51 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the shared fixture cleanup, and retain updater-level assertions for revocation both before the index write and during config commit. Do we have a high-confidence way to reproduce the issue? Yes. Comparing the pinned base and head shows that the retained updater test never revokes its owner, while the two removed cases did so at distinct persistence points. Is this the best way to solve the issue? No. Consolidating the fixture is useful, but the updater-specific revocation cases protect a separate call-site invariant and should remain. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b1694b364c65. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…claw#159952) * test(update): deslop s699 tests * test(update): deslop s695 tests * test(update): deslop s697 tests * test(update-cli): deslop s702 tests * test(cli): deslop s704 tests * test(update): deslop s701 tests * test(update): deslop s698 tests * test(commands): deslop s706 tests * test(update): deslop s705 tests * test(doctor): deslop s711 tests
What Problem This Solves
Update, backup, and Doctor suites contain repeated matrix cases and fixture setup that duplicate stronger retained boundary coverage.
User Impact
No user-visible behavior changes. This batch reduces test maintenance and execution work while retaining distinct recovery, ownership, privacy, cancellation, and cleanup regressions. Production code and installed-update behavior are unchanged.
Why This Change Was Made
Replay the ten validated d077 campaign commits onto current main, pruning redundant cases and consolidating fixtures. All ten commits applied unchanged in intent, with no content conflicts, skipped commits, or dropped hunks. No baseline changes or production seams are involved. No changed paths match the current CODEOWNERS rules.
Production LOC: +0 / -0. Test LOC: +1,814 / -3,055 (net -1,241). Test-support LOC: +5 / -82 (net -77). Total: +1,819 / -3,137 (net -1,318) across 50 tests and one test-support file.
Evidence
4dac775c1ab99852209c65ffab21880d0c8826ca, based one74690a70ca826da3c40e745099482e8c9401da6.pnpm install --frozen-lockfile --prefer-offline: passed.oxfmt --write, plainoxlint -c .oxlintrc.jsonon all 51 changed files, andgit diff --check: passed; plain lint rechecked before push.CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <all 50 changed test files>: 702 tests / 50 files passed, six routed Vitest shards in 350.47 seconds. Remote command: 428.79 seconds, exit 0. Testbox run, leasetbx_01m3jfwezy77hxg7w05kpchz7p, stopped and verified completed.OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <all 51 changed paths>: passed on Blacksmith Testbox, exit 0. All three test typecheck graphs (commands, commands-doctor, cli-update), ratchets, guard checks, dead-export scans, and changed-file lint passed; lint reported zero warnings and zero errors. Remote command: 441.20 seconds. Testbox run, leasetbx_01m3jhtbgdvtwfb7fyf232g25b, stopped after success.The original shard coverage comparisons below all satisfy the campaign's maximum 1% covered-statement/branch loss. These are in-shard before/after measurements, not a fresh aggregate coverage measurement on current main. Coverage groups overlap and must not be summed. Below-target LOC reductions were retained where further deletion would remove distinct regression protection.
Per-shard changes, counts, and original coverage evidence
Declarations count syntactic
it/testcalls in changed files, including support registration; each parameterized declaration counts once. Executed cases come from each full original shard report.For s698, test LOC is +85/-162 (net -77), and support LOC is +5/-82 (net -77). Other shards change only test files.
In this table,
U/meanssrc/cli/update-cli/,C/meanssrc/commands/, and every abbreviated filename ends in.test.tsunless explicitly shown otherwise.U/update-command-plugin-caller,U/update-command-plugin-preflight,U/update-command-plugins.degradation,U/update-command-plugins.persistence,U/update-command-readiness.windows,U/update-command-recoveryU/update-command-foreground,U/update-command-freebsd-pkg,U/update-command-fresh-preview,U/update-command-fresh-runtimeU/update-command-install-layout,U/update-command-invalid-config,U/update-command-legacy-finalize,U/update-command-legacy-service-stop,U/update-command-metadata-diagnosticsU/update-command-service-admission,U/update-command-service-command,U/update-command-service-custody,U/update-command-service-drain,U/update-command-service-inspection-settlement,U/update-command-service-maintenance-handoffU/update-command-target.n1-prefix,U/update-command-task-delivery,U/update-command-terminal-outcome,U/update-command-terminal-record,U/update-command-terminal-triageU/update-command-rollback-report,U/update-command-run-service-ownership,U/update-command-runtime-channel,U/update-command-runtime-destination,U/update-command-runtime-preview,U/update-command-runtime,U/update-command-schema-cleanupU/update-command-original-service-current.test-support.ts,U/update-command-original-service,U/update-command-package-doctor,U/update-command-package,U/update-command-pending-recoveryC/backup-capture-privacy,C/backup-shared.namespace-path,C/backup-verify-completeness,C/backup-verify-manifest.update-recoveryU/update-command-terminal-unreported,U/update-command-timeouts,U/update-command-verification-report,U/update-command-verification,U/update-recovery-guidance,U/update-repair-historyC/doctor-gateway-services.writer-order,C/doctor-lint-process,C/doctor-lint.config-snapshotcovered statements 1649 -> 1649 (0); branches 1233 -> 1233 (0); functions 265 -> 265 (0)covered statements 2406 -> 2405 (-1); branches 1826 -> 1824 (-2); functions 421 -> 421 (0)covered statements 1483 -> 1483 (0); branches 1153 -> 1153 (0); functions 238 -> 238 (0)covered statements 1375 -> 1374 (-1); branches 1069 -> 1067 (-2); functions 218 -> 218 (0)covered statements 1187 -> 1187 (0); branches 940 -> 940 (0); functions 177 -> 177 (0)covered statements 1310 -> 1310 (0); branches 1078 -> 1073 (-5); functions 209 -> 209 (0)covered statements 2399 -> 2397 (-2); branches 1823 -> 1821 (-2); functions 377 -> 377 (0)covered statements 1509 -> 1509 (0); branches 883 -> 883 (0); functions 297 -> 297 (0)covered statements 2265 -> 2263 (-2); branches 1827 -> 1823 (-4); functions 385 -> 385 (0)covered statements 1646 -> 1646 (0); branches 995 -> 995 (0); functions 318 -> 318 (0)