Skip to content

fix: keep stable-upgrade validation compatible with older installs - #134002

Merged
steipete merged 2 commits into
mainfrom
codex/update-stable-survivor-lifecycle
Aug 31, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/update-stable-survivor-lifecycle

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Stable-install upgrade tests could reject historical configurations before reaching the updater, miss a running March gateway, or leave the old gateway alive during authenticated restart.

Why This Change Was Made

The survivor recipe authors canonical current inputs and adapts them to each published baseline. Agent ownership uses the exact 2026.8.1-beta.2 boundary; Discord retains the nested DM migration specimen before 2026.7.2-beta.4. This keeps old upgrade coverage while allowing current and intervening beta installations to accept the recipe.

Legacy readiness recognizes the published listening marker and verifies a real TCP listener. Current readiness still requires its ready marker and endpoint. Both restart probes now use one shared installer and the service manager that owns their later restart and stop. The old setup adopted an unmanaged foreground CLI PID, bypassing descendant cleanup. Manual startup also propagates readiness failures when called conditionally. Startup budgets and supervisor drain policy are unchanged.

CI exposed a root test importing Discord's schema. The complete eight-case table now lives in Discord's existing schema suite and uses the public SDK validator. Colocated declaration companions describe the recipe's existing JavaScript dependencies for the stricter plugin test project; no typecheck settings or runtime exports change.

User Impact

No product runtime change. Release validation reaches the real updater on older installations and reports service restart behavior reliably. Related #120703 addresses convergence retries; this change fixes fixture production and service ownership without copying its sidecar implementation.

Evidence

On isolated Crabbox/Testbox, clean committed candidate 99170bd330a2f80dbc051f58e001b35ba75d3340 passed July volume migration, May configured-plugin repair and authenticated restart, current-install authenticated restart, and March explicit repair followed by authenticated restart. March's published updater invokes advisory Doctor without --fix; the documented explicit candidate repair was exercised separately. Its repaired service restart replaced the old supervisor and passed health, readiness, and status checks.

The July scenario preserved 9,600 sessions, 152,896 events, 4,400 cron jobs, and 512 plugin KV rows through automatic migration, history readback, and restart. Idempotent Doctor took 9 seconds. The earlier campaign also passed April obsolete dependency cleanup and July cron-authority migration. Final May and March reruns with historical Discord input passed in 260.957 and 227.815 seconds; their update-owned restart phases took 59 and 90 seconds.

All three managed-service regressions, both readiness regressions, and three historical Discord specimen regressions fail before their repairs and pass afterward. The full original harness proof totals 376 passing checks. After relocating the schema table, all 88 focused architecture/recipe/Discord cases pass. The final four-file correction passed its full changed-file gate in 407.241 seconds, including plugin/script/root types, typed lint, formatting, Knip, and boundary guards. All proof leases are stopped.

The six executable tooling/recipe files on final head 7da9fba920626a198b2f64897c4b04792e3af3ab remain byte-identical to the completed live proof. Main's per-agent volume seeding and baseline SDK-store discovery improvements are retained. Executable tooling: +132/-103 (net +29); the shared service setup itself removes one net line. Declaration companions add 30 type-only lines. Tests: +317/-22 (net +295), discounting the pure eight-case move. No product option, dependency, schema, or timeout is added. Fresh full-candidate autoreview is clear at its configured P0 threshold. ClawSweeper's consolidation concern is addressed by the single setup helper and the two distinct shipped version boundaries; exact-head CI remains required before native landing.

Exact-head CI completed successfully at 7da9fba920626a198b2f64897c4b04792e3af3ab, including build artifacts, all selected test shards, and the required gate. This satisfies the remaining CI condition in ClawSweeper's latest review. The earlier Anthropic context-window timeout passed in 3 ms. Main also contains canonical #133970 and independent fixture changes from #133913, so this is combined-source validation, not a claim that this harness PR repairs provider error handling.

@steipete steipete self-assigned this Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: L maintainer Maintainer-authored PR labels Aug 31, 2026
@steipete
steipete marked this pull request as ready for review August 31, 2026 09:11
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 6:23 AM ET / 10:23 UTC.

ClawSweeper review

What this changes

The PR makes stable-upgrade test fixtures match historical configuration and readiness contracts, and starts authenticated restart probes through the managed service that later owns their restart and cleanup.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. This maintainer-authored PR remains necessary: it repairs upgrade-survivor fixture adaptation and service-manager ownership that current main does not contain, with no concrete introduced correctness or security defect found.

Priority: P2
Reviewed head: 7da9fba920626a198b2f64897c4b04792e3af3ab

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong source-level boundary coverage and supplied real harness evidence support a clean, focused repair; exact-head CI remains the normal landing gate.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nonetheless supplies linked isolated Testbox evidence for the changed upgrade, readiness, and managed-restart flows, while this read-only review did not rerun it.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nonetheless supplies linked isolated Testbox evidence for the changed upgrade, readiness, and managed-restart flows, while this read-only review did not rerun it.
Evidence reviewed 7 items Introduced configuration owner: The adapter now converts canonical agent and Discord fixture shapes only below their respective prerelease cutoffs, preserving the current fixture for newer baselines.
Version contract and fixture boundary: The shared comparator orders prereleases, while current agent and Discord schemas establish why the canonical fixture must be adapted for older installs; focused tables cover the boundary cases.
Managed lifecycle owner: Both restart preparation paths call the shared installer, which obtains readiness from the PID published by the systemctl fixture rather than adopting a foreground gateway process.
Findings None None.
Security None None.

How this fits together

The upgrade-survivor harness installs published OpenClaw baselines, writes representative configuration, then updates and restarts a gateway to validate upgrade safety. Its recipe adapter feeds baseline-specific config into the updater and its service fixture verifies the managed gateway lifecycle.

flowchart LR
  A[Published baseline] --> B[Upgrade fixture recipe]
  B --> C[Version-specific configuration]
  C --> D[Baseline validation]
  D --> E[Updater and managed gateway]
  E --> F[Release verification results]
Loading

Before merge

  • Resolve merge risk (P1) - The changed release-validation automation should merge only after the still-running exact-head checks establish that it remains sound with current main; historical tag source could not be independently reopened in this partial clone because the promisor remote was unreachable.
  • Complete next step (P2) - No repair job is needed: no actionable patch defect was found, and the remaining action is routine exact-head CI completion and maintainer landing review.
Agent review details

Security

None.

PR surface

Tests +295, Other +59. Total +354 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 317 22 +295
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 8 160 101 +59
Total 12 477 123 +354

Review metrics

Metric Value Why it matters
Production versus test delta release tooling +29 net, declaration-only +30, tests +295 net The runtime product does not grow; the tooling increase consolidates baseline adaptation and manager-owned startup while most change is focused regression coverage.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/config-recipe.mts, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/config-recipe/agents.json, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/config-recipe/channels-discord.json, serialized state: scripts/e2e/lib/upgrade-survivor/config-recipe.mts, unknown-data-model-change: scripts/e2e/lib/upgrade-survivor/config-recipe.mts, unknown-data-model-change: scripts/e2e/lib/upgrade-survivor/run.sh, and 1 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Merge-risk options

Maintainer options:

  1. Complete exact-head harness validation (recommended)
    Let the remaining exact-head checks complete before landing so the changed upgrade-validation and managed-restart paths are verified together on current main.

Technical review

Best possible solution:

Retain one version-aware fixture adapter and the single manager-owned probe installer, then land after exact-head validation confirms the combined release harness.

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

Yes, source-reproducible: the prior implementation's baseline fixture shapes and foreground PID adoption are visible in current main, and focused tests model the historical version and readiness boundaries. The supplied PR evidence also reports after-fix isolated release-harness runs.

Is this the best way to solve the issue?

Yes. Adapting canonical fixtures at the recipe boundary and using the service manager's own PID fixes the harness where incompatible state is produced, rather than adding runtime compatibility behavior or retaining a second launch path.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • P2: This improves release-upgrade validation reliability without changing the shipped product runtime.
  • merge-risk: 🚨 automation: The PR changes the release harness's fixture generation, readiness decision, and managed-service lifecycle, so a regression could make upgrade validation falsely pass or fail.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nonetheless supplies linked isolated Testbox evidence for the changed upgrade, readiness, and managed-restart flows, while this read-only review did not rerun it.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-31T09:20:31.504Z sha 1354ba1 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 31, 2026
@steipete
steipete merged commit 1c33687 into main Aug 31, 2026
179 of 181 checks passed
@steipete
steipete deleted the codex/update-stable-survivor-lifecycle branch August 31, 2026 10:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
…penclaw#134002)

* test(update): preserve stable fixtures and managed gateway lifecycle

* test: keep survivor schema checks with the Discord plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: L 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