Skip to content

test(update,backup,doctor): remove low-value tests (batch d077) - #159952

Merged
steipete merged 10 commits into
mainfrom
tcr/land-d077-1790547820
Sep 27, 2026
Merged

steipete merged 10 commits into
mainfrom
tcr/land-d077-1790547820

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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

  • Rebased candidate: 4dac775c1ab99852209c65ffab21880d0c8826ca, based on e74690a70ca826da3c40e745099482e8c9401da6.
  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • Targeted oxfmt --write, plain oxlint -c .oxlintrc.json on all 51 changed files, and git diff --check: passed; plain lint rechecked before push.
  • Blacksmith Testbox focused proof: 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, lease tbx_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, lease tbx_01m3jhtbgdvtwfb7fyf232g25b, stopped after success.
  • The focused runner reported a portal-sync timeout after successful execution; the command result and timing receipt both confirm exit 0. Cold local source staging was slow, but no validation was skipped and no retry was needed for a failing check.
  • Hosted required CI and independent autoreview run after publication under the authorized campaign workflow.

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/test calls in changed files, including support registration; each parameterized declaration counts once. Executed cases come from each full original shard report.

Shard Test/support LOC added / deleted (net) Declarations before → after Original executed cases
s699 +268 / -353 (-85) 21 → 21 (0) 81 → 56 (-25)
s695 +156 / -350 (-194) 39 → 36 (-3) 109 → 90 (-19)
s697 +123 / -172 (-49) 19 → 18 (-1) 108 → 90 (-18)
s702 +284 / -421 (-137) 39 → 36 (-3) 179 → 110 (-69)
s704 +154 / -305 (-151) 44 → 40 (-4) 93 → 76 (-17)
s701 +79 / -172 (-93) 24 → 24 (0) 86 → 62 (-24)
s698 +90 / -244 (-154) 35 → 33 (-2) 165 → 137 (-28)
s706 +159 / -353 (-194) 31 → 30 (-1) 91 → 76 (-15)
s705 +190 / -351 (-161) 35 → 32 (-3) 113 → 90 (-23)
s711 +316 / -416 (-100) 12 → 11 (-1) 49 → 45 (-4)
Total +1,819 / -3,137 (-1,318) 299 → 281 (-18) 1,074 → 832 (-242)

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/ means src/cli/update-cli/, C/ means src/commands/, and every abbreviated filename ends in .test.ts unless explicitly shown otherwise.

Shard Files touched
s699 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-recovery
s695 U/update-command-foreground, U/update-command-freebsd-pkg, U/update-command-fresh-preview, U/update-command-fresh-runtime
s697 U/update-command-install-layout, U/update-command-invalid-config, U/update-command-legacy-finalize, U/update-command-legacy-service-stop, U/update-command-metadata-diagnostics
s702 U/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-handoff
s704 U/update-command-target.n1-prefix, U/update-command-task-delivery, U/update-command-terminal-outcome, U/update-command-terminal-record, U/update-command-terminal-triage
s701 U/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-cleanup
s698 U/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-recovery
s706 C/backup-capture-privacy, C/backup-shared.namespace-path, C/backup-verify-completeness, C/backup-verify-manifest.update-recovery
s705 U/update-command-terminal-unreported, U/update-command-timeouts, U/update-command-verification-report, U/update-command-verification, U/update-recovery-guidance, U/update-repair-history
s711 C/doctor-gateway-services.writer-order, C/doctor-lint-process, C/doctor-lint.config-snapshot
Shard Exact coverage totals from original report
s699 covered statements 1649 -> 1649 (0); branches 1233 -> 1233 (0); functions 265 -> 265 (0)
s695 covered statements 2406 -> 2405 (-1); branches 1826 -> 1824 (-2); functions 421 -> 421 (0)
s697 covered statements 1483 -> 1483 (0); branches 1153 -> 1153 (0); functions 238 -> 238 (0)
s702 covered statements 1375 -> 1374 (-1); branches 1069 -> 1067 (-2); functions 218 -> 218 (0)
s704 covered statements 1187 -> 1187 (0); branches 940 -> 940 (0); functions 177 -> 177 (0)
s701 covered statements 1310 -> 1310 (0); branches 1078 -> 1073 (-5); functions 209 -> 209 (0)
s698 covered statements 2399 -> 2397 (-2); branches 1823 -> 1821 (-2); functions 377 -> 377 (0)
s706 covered statements 1509 -> 1509 (0); branches 883 -> 883 (0); functions 297 -> 297 (0)
s705 covered statements 2265 -> 2263 (-2); branches 1827 -> 1823 (-4); functions 385 -> 385 (0)
s711 covered statements 1646 -> 1646 (0); branches 995 -> 995 (0); functions 318 -> 318 (0)

@clawsweeper

clawsweeper Bot commented Sep 27, 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.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes commands Command implementations size: XL labels Sep 27, 2026
@steipete
steipete enabled auto-merge (squash) September 27, 2026 23:16
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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 Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 27, 2026, 7:23 PM ET / 23:23 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 4dac775c1ab99852209c65ffab21880d0c8826ca

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The cleanup has substantial focused validation, but one distinct updater authority regression check was pruned.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only branch changes no production owner or stored-data contract. The reported focused Testbox run validates the retained suites, while the removed updater revocation cases remain a review finding.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only branch changes no production owner or stored-data contract. The reported focused Testbox run validates the retained suites, while the removed updater revocation cases remain a review finding.
Evidence reviewed 7 items Introduced test gap: The pinned PR change replaces three updater plugin-persistence cases—revocation before the index write, revocation during config commit, and an ordinary config failure—with only the ordinary failure case.
Updater persistence boundary: The updater carries its current-owner check into the combined plugin-index and config commit, including a check after the asynchronous before-commit hook.
Different retained test owner: The retained lease tests fence a nested plugin-index write, but do not call the updater’s combined config-and-index commit path.
Findings 1 actionable finding [P2] Retain the updater's revoked-owner persistence cases
Security Needs attention Revoked-owner persistence checks removed: The retained updater test covers a live-owner failure only; it no longer checks that plugin persistence is fenced when updater authority is revoked at either commit point.

How this fits together

These 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]
Loading

Before merge

  • Retain the updater's revoked-owner persistence cases (P2) - The replacement case only throws an ordinary config error while the owner remains live. Removing the index and config abort cases leaves no updater-level check that revocation before the index write leaves it untouched, or that revocation during config commit preserves config without unauthorized compensation. Generic lease tests do not exercise this combined updater call path.
  • Resolve security concern: Revoked-owner persistence checks removed - The retained updater test covers a live-owner failure only; it no longer checks that plugin persistence is fenced when updater authority is revoked at either commit point.
  • Resolve merge risk (P1) - After this deletion, a future updater change could persist plugin config or index state after its update owner is revoked without the retained updater suite detecting it.
  • Complete next step (P2) - Restore the updater-level revoked-authority cases and validate the focused suite before merge.

Findings

  • [P2] Retain the updater's revoked-owner persistence cases — src/cli/update-cli/update-command-plugins.persistence.test.ts:43
  • [medium] Revoked-owner persistence checks removed — src/cli/update-cli/update-command-plugins.persistence.test.ts:43
Agent review details

Security

Needs attention: No production or supply-chain code changes, but the diff removes updater-level regression checks for revoked authority over plugin persistence.

PR surface

Tests -1318. Total -1318 across 51 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 51 1811 3129 -1318
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 51 1811 3129 -1318

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Retain both revocation timings (recommended)
    Restore the two updater-level abort cases while reusing the consolidated fixture, then validate the focused suite.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore updater-level cases that revoke ownership before the plugin-index write and during config beforeCommit; assert the expected config bytes and persisted index state in each case while retaining the shared fixture.

Technical review

Best 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:

  • [P2] Retain the updater's revoked-owner persistence cases — src/cli/update-cli/update-command-plugins.persistence.test.ts:43
    The replacement case only throws an ordinary config error while the owner remains live. Removing the index and config abort cases leaves no updater-level check that revocation before the index write leaves it untouched, or that revocation during config commit preserves config without unauthorized compensation. Generic lease tests do not exercise this combined updater call path.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b1694b364c65.

Labels

Label changes:

  • add P3: This is test maintenance with no direct user-facing production change.
  • add merge-risk: 🚨 security-boundary: The removed updater cases are caller-level regression checks for owner-held authority over plugin persistence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored, test-only branch changes no production owner or stored-data contract. The reported focused Testbox run validates the retained suites, while the removed updater revocation cases remain a review finding.

Label justifications:

  • P3: This is test maintenance with no direct user-facing production change.
  • merge-risk: 🚨 security-boundary: The removed updater cases are caller-level regression checks for owner-held authority over plugin persistence.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored, test-only branch changes no production owner or stored-data contract. The reported focused Testbox run validates the retained suites, while the removed updater revocation cases remain a review finding.

Evidence

Security concerns:

  • [medium] Revoked-owner persistence checks removed — src/cli/update-cli/update-command-plugins.persistence.test.ts:43
    The retained updater test covers a live-owner failure only; it no longer checks that plugin persistence is fenced when updater authority is revoked at either commit point.
    Confidence: 0.88

Acceptance criteria:

  • [P1] pnpm test src/cli/update-cli/update-command-plugins.persistence.test.ts --maxWorkers=1.
  • [P1] node scripts/check-changed.mjs -- src/cli/update-cli/update-command-plugins.persistence.test.ts.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore the two updater revocation timings and validate the focused persistence suite.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 2a27298 into main Sep 27, 2026
125 of 126 checks passed
@steipete
steipete deleted the tcr/land-d077-1790547820 branch September 27, 2026 23:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant