Skip to content

refactor(update): simplify verification typing - #140259

Merged
steipete merged 5 commits into
mainfrom
steipete/update-deslop-transaction
Sep 6, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/update-deslop-transaction

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Related: #124396, #138690, #138673, #138737, #138839, #139495.

What Problem This Solves

This maintainer-requested, behavior-neutral deslop pass removes redundant type scaffolding around transaction verification: the diagnostic list always has a headline, and the restart probe's environment merge needs neither widening casts nor a nullish spread default.

Why This Change Was Made

Represent the guaranteed nonempty diagnostic list with a tuple and remove its unreachable fallback. Infer the merged environment through a direct ProcessEnv annotation, with the explicitly approved assertion-ratchet count reduced from 9 to 7 for that file only.

The diagnostic cleanup belongs to the verification module introduced by #139495. The probe cleanup is explicitly approved by the lead. A provenance audit against the five campaign merges moved all other proposed cleanups to separate follow-ups because they came from outside those campaign hunks.

User Impact

None. Runtime output, service authority, update sequencing, rollback, protocol, configuration, schemas, and error text remain unchanged.

Evidence

Final head: 9f21eef1b85a3db8e65400a5fa91c0276445321f.

Proof Before After
Same 106 selected test files, pnpm test 2,566 passed; 3 skipped 2,566 passed; 3 skipped
Runtime prerequisite build Passed; zero ineffective dynamic-import diagnostics Passed; zero ineffective dynamic-import diagnostics

All 106 test files are byte-identical. Full pnpm check:changed passed, including the exact assertion-ratchet update, production/test types, all three zero-unused-export scans, lint, storage/import and authorization guards. git diff --check passed. Final Codex branch autoreview at high reasoning and P0/P1 scope returned scoped-clean.

git diff --numstat origin/main...HEAD: production +3/-6 (net -3); tests +0/-0; docs +0/-0. The separately approved validation-baseline edit is +1/-1 and changes only the restart-probe entry from 9 to 7. No snapshots, configuration options, schema, dependency, or changelog changes.

The original baseline setup encountered a stale checkout-local build lock before tests started; after verifying no associated writers remained, the unchanged baseline was rerun successfully. The initial changed gate required the exact assertion-count shrink, which is included under the lead's corrected policy. An obsolete test repeat was cancelled when the lead narrowed provenance scope; the final run above completed after those scope corrections.

Exact-head CI run 34044403151 completed successfully on attempt 2. The required exact-head watcher returned SUCCESS, zero pending checks, and GREEN.

Attempt 1 failed two unchanged Discord WAV-lifetime cases (left channel and replaced capture) at extensions/discord/src/voice/voice-wav-lifetime.test.ts:196, where a temporary cleanup marker remained. The focused local file passed all eight tests, and one targeted rerun of the failed CI job passed on the same head without source or test changes. The cause of that initial cleanup failure remains an unrelated follow-up; no owner repair is claimed here.

Exact test file list used before and after
src/cli/daemon-cli.coverage.test.ts
src/cli/daemon-cli/lifecycle-action-preflight.test.ts
src/cli/daemon-cli/lifecycle-core.config-guard.test.ts
src/cli/daemon-cli/lifecycle-core.test.ts
src/cli/daemon-cli/lifecycle-safe-restart.test.ts
src/cli/daemon-cli/lifecycle-start-readiness.test.ts
src/cli/daemon-cli/lifecycle.external-supervision.test.ts
src/cli/daemon-cli/lifecycle.test.ts
src/cli/daemon-cli/restart-health-client.test.ts
src/cli/daemon-cli/restart-health-external.test.ts
src/cli/daemon-cli/restart-health-probe.test.ts
src/cli/daemon-cli/restart-health-wait.test.ts
src/cli/daemon-cli/restart-health.test.ts
src/cli/gateway-cli/run.option-collisions.test.ts
src/cli/gateway-cli/run.supervised-lock.test.ts
src/cli/update-cli.option-collisions.test.ts
src/cli/update-cli.startup.test.ts
src/cli/update-cli.test.ts
src/cli/update-cli/progress.test.ts
src/cli/update-cli/schema-preflight.test.ts
src/cli/update-cli/shared.command-runner.test.ts
src/cli/update-cli/update-command-config-snapshot.test.ts
src/cli/update-cli/update-command-fresh-doctor.test.ts
src/cli/update-cli/update-command-handoff.test.ts
src/cli/update-cli/update-command-inference.test.ts
src/cli/update-cli/update-command-lease.test.ts
src/cli/update-cli/update-command-lifecycle.test.ts
src/cli/update-cli/update-command-migrated-windows.test.ts
src/cli/update-cli/update-command-migrated.test.ts
src/cli/update-cli/update-command-post-core.test.ts
src/cli/update-cli/update-command-post-update-recovery.test.ts
src/cli/update-cli/update-command-post-update-repair.test.ts
src/cli/update-cli/update-command-post-update.test.ts
src/cli/update-cli/update-command-repair-isolation.e2e.test.ts
src/cli/update-cli/update-command-report.test.ts
src/cli/update-cli/update-command-rollback.test.ts
src/cli/update-cli/update-command-run.test.ts
src/cli/update-cli/update-command-service-command.process.test.ts
src/cli/update-cli/update-command-service-maintenance.test.ts
src/cli/update-cli/update-command-service.integration.test.ts
src/cli/update-cli/update-command-service.test.ts
src/cli/update-cli/update-command-triage.test.ts
src/cli/update-cli/update-command-windows-task.test.ts
src/cli/update-cli/update-command-wrapper-retirement.test.ts
src/cli/update-cli/update-command.test.ts
src/cli/update-cli/update-execution.runtime.test.ts
src/cli/update-cli/update-package-executor.test.ts
src/cli/update-dry-run-state.process.test.ts
src/cli/update-finalization-output.process.test.ts
src/cli/update-result-output.process.test.ts
src/commands/doctor-maintenance.plugin-preflight.test.ts
src/commands/doctor-maintenance.schema-preflight.test.ts
src/commands/doctor-update.test.ts
src/commands/doctor-update.windows-recovery.test.ts
src/commands/status-all/diagnosis.test.ts
src/commands/status-all/report-data.test.ts
src/commands/status-overview-rows.test.ts
src/commands/status.command-report-data.test.ts
src/commands/status.command-report.test.ts
src/commands/status.command-sections.test.ts
src/commands/status.update-channel.test.ts
src/commands/status.update.test.ts
src/commands/triage-update.test.ts
src/commands/triage.test.ts
src/config/io.runtime-snapshot-write.test.ts
src/infra/package-update-steps.native-transaction.test.ts
src/infra/package-update-steps.pnpm11-guard.test.ts
src/infra/package-update-steps.recovery.test.ts
src/infra/package-update-steps.source-checkout.test.ts
src/infra/package-update-steps.staging.test.ts
src/infra/package-update-steps.test.ts
src/infra/package-update-swap.test.ts
src/infra/restart-sentinel.test.ts
src/infra/restart-sentinel.update-result.test.ts
src/infra/runtime-worker-url.test.ts
src/infra/update-candidate-canary.integration.test.ts
src/infra/update-candidate-canary.test.ts
src/infra/update-candidate-state.test.ts
src/infra/update-global-lifecycle.test.ts
src/infra/update-global.bun-owner.test.ts
src/infra/update-global.pnpm11-discovery.test.ts
src/infra/update-global.test.ts
src/infra/update-managed-service-handoff-command.test.ts
src/infra/update-managed-service-handoff-cross-process.test.ts
src/infra/update-managed-service-handoff-lifecycle.test.ts
src/infra/update-managed-service-handoff-ownership.test.ts
src/infra/update-managed-service-handoff-single-flight.test.ts
src/infra/update-runner-git-admission.test.ts
src/infra/update-runner-git-candidate.test.ts
src/infra/update-runner.test.ts
src/infra/update-startup.test.ts
src/state/openclaw-state-db-acp-replay.test.ts
src/state/openclaw-state-db-binding-targets.test.ts
src/state/openclaw-state-db-cache.retention.test.ts
src/state/openclaw-state-db-first-use-column-strict-migration.test.ts
src/state/openclaw-state-db-legacy-backfills.test.ts
src/state/openclaw-state-db-operator-approval-migration.test.ts
src/state/openclaw-state-db-readonly.test.ts
src/state/openclaw-state-db-restart-handoff-migration.test.ts
src/state/openclaw-state-db-schema-additive.test.ts
src/state/openclaw-state-db-schema-migration-required.test.ts
src/state/openclaw-state-db-subagent-bindings.test.ts
src/state/openclaw-state-db.corruption-recovery.test.ts
src/state/openclaw-state-db.permissions.test.ts
src/state/openclaw-state-db.runtime-fence.test.ts
src/state/openclaw-state-db.test.ts

@clawsweeper

clawsweeper Bot commented Sep 6, 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 marked this pull request as ready for review September 6, 2026 16:06
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 12:13 PM ET / 16:13 UTC.

ClawSweeper review

What this changes

The PR simplifies update verification typing, removes an unreachable diagnostic fallback, and lowers the assertion baseline to match two removed casts.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a focused, behavior-preserving cleanup with no actionable findings. Current main retains the redundant typing, and the maintainer-authored PR is protected from automatic closure.

Priority: P3
Reviewed head: 9f21eef1b85a3db8e65400a5fa91c0276445321f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with appropriate reported validation and no actionable source findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored cleanup changes only typing and unreachable scaffolding in verification and probe setup; the external-contributor proof gate does not apply, and no material authority change triggers additional proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored cleanup changes only typing and unreachable scaffolding in verification and probe setup; the external-contributor proof gate does not apply, and no material authority change triggers additional proof.
Evidence reviewed 6 items Pinned introduced patch: The independently inspected merge-base-to-head diff matches the supplied three-file introduction evidence: two casts removed, a nonempty tuple annotation added, an unreachable fallback removed, and the baseline reduced from 9 to 7.
Diagnostic invariant: The diagnostic array starts with an unconditional string and is never emptied or passed to a mutating consumer before index zero is logged. The tuple expresses that existing guarantee.
Environment semantics preserved: The direct environment annotation preserves process-first, caller-override spread order. Spreading an undefined environment remains a no-op; configuration and credential resolution consume the same merged values.
Findings None None.
Security None None.

How this fits together

Update verification checks the restarted Gateway and returns a success or failure result to update and repair orchestration. The restart probe combines the process and service environments to resolve its configuration and credentials.

flowchart TD
  A[Update or repair] --> B[Gateway verification]
  C[Process and service environment] --> D[Restart probe configuration]
  D --> B
  B --> E{Healthy and ready}
  E -->|Yes| F[Verified result]
  E -->|No| G[Failure diagnostics]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -3, Other 0. Total -3 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 3 6 -3
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 3 4 7 -3

Review metrics

None.

Technical review

Best possible solution:

Retain the existing verification flow while expressing its nonempty diagnostics and environment types directly.

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

Not applicable: this PR removes redundant typing rather than repairing a reported runtime failure; source inspection supports equivalent behavior.

Is this the best way to solve the issue?

Yes: direct annotations capture the existing invariants without adding an abstraction or changing verification policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3b90108d098e.

Labels

Label changes:

  • add P3: This is a small typing cleanup with no intended user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored cleanup changes only typing and unreachable scaffolding in verification and probe setup; the external-contributor proof gate does not apply, and no material authority change triggers additional proof.

Label justifications:

  • P3: This is a small typing cleanup with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored cleanup changes only typing and unreachable scaffolding in verification and probe setup; the external-contributor proof gate does not apply, and no material authority change triggers additional proof.

Evidence

What I checked:

  • Pinned introduced patch: The independently inspected merge-base-to-head diff matches the supplied three-file introduction evidence: two casts removed, a nonempty tuple annotation added, an unreachable fallback removed, and the baseline reduced from 9 to 7. (config/assertion-safety-baseline.txt:2298, 9f21eef1b85a)
  • Diagnostic invariant: The diagnostic array starts with an unconditional string and is never emptied or passed to a mutating consumer before index zero is logged. The tuple expresses that existing guarantee. (src/cli/update-cli/update-command-verification.ts:158, 9f21eef1b85a)
  • Environment semantics preserved: The direct environment annotation preserves process-first, caller-override spread order. Spreading an undefined environment remains a no-op; configuration and credential resolution consume the same merged values. (src/cli/daemon-cli/restart-health-probe.ts:301, 9f21eef1b85a)
  • Still distinct from current main: Fetched main retains the unannotated diagnostic array and nullish fallback; its restart probe also retains both casts. The related merged campaign PRs provide surrounding functionality rather than superseding this cleanup. Release-file inspection was unavailable, so no shipped implementation claim is made. (src/cli/update-cli/update-command-verification.ts:158, 3b90108d098e)
  • Merged feature history: Current-main history and source-line blame connect the verification module to the merged feat(update): recover failed updates with bounded repair #139495. The raw recorded parent is d8922d3, whose tree has no verification-module entry. (src/cli/update-cli/update-command-verification.ts:159, 76bf977faefe)
  • Validation and review limits: The complete supplied PR body identifies the reviewed head and reports identical before/after results of 2,566 passing tests and three skips, plus successful changed checks and builds. These are contributor-reported supplemental results, not tests executed by this review. Network access failed, and some deeper history/test-merge objects were unavailable; the supplied pinned introduction and verified test-merge metadata remain the ownership evidence. (9f21eef1b85a)

Likely related people:

  • Peter Steinberger: Raw commit 76bf977 adds src/cli/update-cli/update-command-verification.ts:159 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 76bf977faefe; files: src/cli/update-cli/update-command-verification.ts)

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 55d979e into main Sep 6, 2026
373 of 375 checks passed
@steipete
steipete deleted the steipete/update-deslop-transaction branch September 6, 2026 16:27
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
* refactor(update): simplify Git candidate preparation

* refactor(update): consolidate restart health checks

* refactor(update): trim transaction handoff scaffolding

* refactor(update): retain probe casts under the existing baseline

* refactor(update): limit deslop to campaign verification hunks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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