Skip to content

chore: gate startup upgrades against prior-release state - #144659

Merged
obviyus merged 4 commits into
mainfrom
test/upgrade-state-corpus
Sep 11, 2026
Merged

obviyus merged 4 commits into
mainfrom
test/upgrade-state-corpus

Conversation

@obviyus

@obviyus obviyus commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #144626.

What Problem This Solves

Startup tests with empty state could miss upgrades that lose sessions, credentials, scheduled jobs, or Control UI preferences, or leave an old database schema in place.

Why This Change Was Made

Generated state from releases 2026.9.2 and 2026.9.3 is tested with sanitized operator configurations through the existing Doctor and Gateway startup owners. Repeated repair checks preserve data and verify current database schemas and integrity.

User Impact

No runtime behavior changes. Required validation now checks upgrade-state preservation. The state matrix covers Linux-generated state and skips Windows; fixture inventory runs on all platforms. Credentials and data are synthetic.

Evidence

Both release snapshots passed all 15 configuration combinations. The final Linux state suite passed 31 tests. Real Gateway startup, model listing, retained history, /status, and resume checks passed for all 15 shapes with frozen state and one previous-stable control. Channels, scheduled jobs, and browser services were disabled; inference was not requested. Doctor retained warnings for synthetic credentials and intentionally unreachable services. Database integrity also passed after shutdown.

@clawsweeper

clawsweeper Bot commented Sep 11, 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 size: XL maintainer Maintainer-authored PR labels Sep 11, 2026
@obviyus
obviyus merged commit 2128a60 into main Sep 11, 2026
162 of 164 checks passed
@obviyus
obviyus deleted the test/upgrade-state-corpus branch September 11, 2026 05:26
@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

Landed with the guarded merge after current-head CI and independent review passed.

  • Coverage gap: the existing config corpus started with empty state and could not catch prior-release state loss.
  • Change: two generated release snapshots now exercise the existing migration and startup owners across 15 config shapes. Production code and schemas are unchanged.
  • Proof: the 56-test corpus and sibling selection passed; affected corrections passed again, including all 31 Linux state tests. Sixteen real Gateway scenarios passed readiness, model listing, retained history and session resume through /status. All 90 retained databases passed post-shutdown integrity checks.
  • Limits: the state matrix skips Windows because these snapshots contain POSIX paths. Strict Doctor reports fixture warnings; CrossClaw and Peanutto also report unreachable fake tool-server URLs. Some fake telemetry endpoints produce shutdown errors. No inference, external CLI authentication or channel-delivery claim is made.
  • CI: https://github.com/openclaw/openclaw/actions/runs/34564928397

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
…4659)

Related: openclaw#144626.

## What Problem This Solves

The config startup corpus uses empty state. It cannot detect an upgrade that loses existing sessions, auth profiles, cron jobs, or Control UI preferences, or leaves a prior-release SQLite schema behind.

## Why This Change Was Made

Add generated state snapshots from stable 2026.9.2 and frozen 2026.9.3 source, then cross them with the config corpus through the existing Doctor and Gateway startup owners. Check preserved session text, credential payloads, cron behavior, preferences, current schema versions, and database integrity after two repair passes. Add the five distinct sanitized operator config shapes instead of relying on two consolidated examples. Keep the combined container fixture’s built-in references resolvable so its wildcard allowlist still exposes models.

The Linux-generated snapshots retain POSIX cron partition keys. The state matrix skips Windows; fixture inventory still runs on every platform. Windows upgrade coverage requires Windows-generated state. The fixtures contain only generated data and fake credentials. Production code and schemas are unchanged. Both selected releases already use SQLite sessions and shared auth storage; this corpus tests their upgrade and preservation contracts, not older JSON transcript imports or external CLI authentication.

## User Impact

No runtime behavior changes. Future changes gain a required upgrade-state check beside the existing config corpus check.

## Evidence

- Both required release snapshots passed all 15 config combinations, preserving session identity/text, fake profile payloads, complete cron behavior, preferences, target schema versions and SQLite integrity after repeat Doctor repair.
- The complete 56-test corpus/sibling selection passed on an isolated Testbox. After the CI correction, all 16 config tests and the exact unused-file scan passed again. The three affected container-fixture cases and its real Gateway flow also passed after correcting inherited placeholder references. A deliberate wrong expected session ID failed the preservation assertion; the original manifest was restored.
- Real Gateway proof passed for all 15 config shapes with frozen state, plus previous-stable state with `operator-host`: readiness, `models list`, retained history, completed `/status` turn, and history after resume. Outbound channels, cron and browser services were disabled; no inference was requested.
- Strict read-only Doctor completed with exit 1 for fixture warnings (loopback binding and fake plaintext credentials). CrossClaw and Peanutto also report the intentionally unreachable `.invalid` tool-server URLs. These diagnostics remain visible; no production suppression was added.
- The full 31-test Linux state suite passed again after the platform-scope correction. Post-shutdown SQLite integrity also passed across the retained Gateway scenarios. Formatting, focused lint, workflow checks, assertion safety, and file-size guards passed. Runtime proof used intake main `83e1842a8a86b1a03cb1d247f6506679832cc1f0`; source review confirmed the final rebase leaves the exercised paths unchanged.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant