Skip to content

fix(test): verify workspace repair during update - #150375

Merged
steipete merged 1 commit into
mainfrom
codex/projects-startup-doctor-tooling-70b-20260916
Sep 17, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/projects-startup-doctor-tooling-70b-20260916

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Projects upgrade-survivor scenario still expects Gateway startup to repair legacy workspace metadata after #150110 moved that repair into Doctor.

User Impact

No user-visible change. The scenario now requires the normal update to finish workspace repair before Gateway startup and verifies that both starts preserve the repaired state.

Why This Change Was Made

The published 2026.9.4 updater already invokes candidate doctor --non-interactive --fix. The fixture must therefore lack the field after published import and contain exactly the registered project root after update. Both Gateway runs must report no workspace backfill and preserve the stored records. Existing import, archive, identity, transcript, sentinel, snapshot-cleanup, and shutdown checks remain; no extra Doctor recovery pass is added.

Related: #150077, #150110.

Evidence

The updated controls reproduced three failures against the original helper, including its first-start backfill expectation in both raw and rendered logs. All 13 focused tests now pass, covering staged field presence, missing or premature repair, wrong roots, unrelated mutations, and shutdown failures. The old inline snapshot timing was source-audited; its policy now belongs to the existing assertion used by the real snapshot command and pure fixtures.

Selected formatting, type, lint, boundary, and dead-export checks passed, as did independent P2 review. The corrected tooling a7acea6d passed all 29 phases with published 2026.9.4 / 3a9d69db updating to exact candidate d40b6293 (tar SHA-256 870f8907e6bbb4b75268736eae3557ab90fb74840565eb9a11f4df821802b4d7) in one application attempt. All 9,871 installed records matched. Doctor repaired the workspace during update; four snapshots verified preservation, and both starts performed zero backfills and shut down cleanly. One queued lease was replaced before any application attempt. Earlier proof remains separately attributed. Successful cleanup removes raw migration manifests and archived originals after validation; hashes, reports, backup, snapshots and logs remain privately retained.

@clawsweeper

clawsweeper Bot commented Sep 16, 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 docs Improvements or additions to documentation scripts Repository scripts labels Sep 16, 2026
@steipete
steipete marked this pull request as ready for review September 16, 2026 23:26
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Sep 16, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 7:33 PM ET / 23:33 UTC.

ClawSweeper review

What this changes

The PR updates upgrade-test assertions, regression tests, and documentation to require workspace repair during update and unchanged persisted state across both subsequent Gateway starts.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused correction to upgrade validation: current main still expects startup repair after that responsibility moved to Doctor. No actionable patch defect was found.

Priority: P2
Reviewed head: a7acea6dd74f55de08db9c2d729ae693e74880f9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused correction with meaningful negative controls and no identified correctness or security blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: The contributor-proof gate is exempt for this MEMBER-authored PR; the supplied body additionally reports the changed scenario passing a published-driver update with repair before startup and preserved state afterward.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The contributor-proof gate is exempt for this MEMBER-authored PR; the supplied body additionally reports the changed scenario passing a published-driver update with repair before startup and preserved state afterward.
Evidence reviewed 6 items Current main still needs the correction: The fetched main helper still requires one first-start backfill and an absent canonical workspace before startup. The submitted patch corrects these expectations; the verified test-merge changes only the same three intended files.
Assertions are wired into the actual scenario: The runner snapshots published import, performs the update, snapshots before startup, and then runs two start/probe/stop cycles. The changed snapshot owner requires the registered root before either startup and compares subsequent stored session and transcript values byte-for-byte with that repaired baseline.
Merged Doctor ownership: GitHub confirms #150110 merged as 091462e. Current main routes workspace repair through Doctor using doctor-fix or detect mode, supporting the revised test contract.
Findings None None.
Security None None.

How this fits together

The upgrade-survivor harness imports synthetic legacy sessions through a published OpenClaw installation, updates to a candidate package, and inspects stored state. Its snapshots and Gateway logs determine whether workspace repair and session preservation satisfy the upgrade contract.

flowchart LR
  A[Published installation] --> B[Legacy session import]
  B --> C[Update and candidate Doctor]
  C --> D[Verify workspace repair]
  D --> E[Two Gateway start and stop cycles]
  E --> F[Compare snapshots and shutdown logs]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +17, Docs +1, Other +8. Total +26 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 48 31 +17
Docs 1 6 5 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 19 11 +8
Total 3 73 47 +26

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/project-worktree-startup.mjs, serialized state: scripts/e2e/lib/upgrade-survivor/project-worktree-startup.mjs, unknown-data-model-change: scripts/e2e/lib/upgrade-survivor/project-worktree-startup.mjs. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Technical review

Best possible solution:

Keep Doctor as the repair owner and make the existing upgrade scenario enforce repair completion before startup while preserving session and transcript bytes.

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

Yes, source establishes the mismatch: current main expects missing metadata after update and a first-start backfill, while Doctor now owns repair. No tests or application code were executed during this read-only review.

Is this the best way to solve the issue?

Yes. Updating the existing scenario assertions is the narrow fix, and the new pre-startup comparison strengthens preservation checks without adding another repair path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 04ce86783632.

Labels

Label justifications:

  • P2: Repairs an obsolete expectation in a bounded upgrade-validation scenario without changing product runtime behavior.
  • 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 contributor-proof gate is exempt for this MEMBER-authored PR; the supplied body additionally reports the changed scenario passing a published-driver update with repair before startup and preserved state afterward.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a3017f7 adds scripts/e2e/lib/upgrade-survivor/project-worktree-startup.mjs:459 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a3017f76b531; files: scripts/e2e/lib/upgrade-survivor/project-worktree-startup.mjs)

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 388584f into main Sep 17, 2026
140 checks passed
@steipete
steipete deleted the codex/projects-startup-doctor-tooling-70b-20260916 branch September 17, 2026 01:34
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S 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