Skip to content

fix: test upgrades from released PostgreSQL installs - #202109

Merged
VACInc merged 2 commits into
openclaw:mainfrom
VACInc:published-postgres-upgrade-ci
Nov 21, 2026
Merged

VACInc merged 2 commits into
openclaw:mainfrom
VACInc:published-postgres-upgrade-ci

Conversation

@VACInc

@VACInc VACInc commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

High Level TLDR

OpenClaw 2026.11.5 ships PostgreSQL shared state and agent stores. Published-driver CI now installs that npm release with both stores on PostgreSQL and checks that users can open the same session and transcript after the installed updater activates the candidate.

Root Cause

Published-driver CI seeded SQLite only. PostgreSQL migration fixtures checked individual schema changes without exercising the released npm updater and candidate activation on populated PostgreSQL stores. The operator guide still described stable PostgreSQL upgrades as inapplicable.

Real behavior proof

Ran the new fixture against disposable PostgreSQL 17 with the published 2026.11.5 npm package and a candidate built and packed with the CI artifact commands. The fixture wrote a session and transcript through the released Gateway, verified its backup, ran the installed openclaw update --yes --json --no-restart --tag <candidate.tgz>, and started the candidate Gateway. The updater recorded succeeded at finished and replaced the installed build.

node scripts/e2e/lib/upgrade-survivor/published-driver-postgres.mjs candidate.tgz artifacts
Published 2026.11.5 PostgreSQL state 36 → 40, agent 38 → 43; Gateway history preserved

The fixture requires a disposable PostgreSQL DSN in OPENCLAW_UPGRADE_TEST_POSTGRES_DSN. It checks the original store identities before opening the candidate Gateway.

Verification

  • The base workflow resolver emitted no PostgreSQL selection. The patched resolver emitted postgres=true for the 2026.11.5 candidate. Older and frozen candidates stay out of this case.

  • pnpm test test/scripts/ci-published-driver-update-plan.test.ts --maxWorkers=1 passed all 31 tests.

  • Candidate build and tarball integrity, workflow sanity, targeted formatting and lint, and git diff --check passed. The final local upgrade fixture took 4m18s.

  • The first CI run flagged the fixture's promise rejection typing. The follow-up passed the type-aware script lint and repeated the full upgrade and planner suite. Updated-head CI

  • The required PR CI gate passed. Ordinary PR CI skipped the published-driver update job by design. The PostgreSQL step has local proof above. Exact-head proof on a GitHub-hosted runner is pending. Skipped job

Evidence

Local autoreview covered the initial patch at P0 through P2 and found no actionable defects. The follow-up changes error handling types and preserves the same upgrade path. The production and full-tree unused-file scans both passed.

What was not tested

This case uses foreground Linux Gateways and synthetic RPCs. Managed service restart, PostgreSQL rollback restore, Windows package update, and paid model calls are outside this case.

@clawsweeper

clawsweeper Bot commented Nov 19, 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 gateway Gateway runtime scripts Repository scripts size: M labels Nov 19, 2026
@VACInc
VACInc marked this pull request as ready for review November 19, 2026 22:48
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR adds a published PostgreSQL upgrade scenario to CI and corrects the documented qualification scope.

Example: Upgrade populated PostgreSQL 17 stores from OpenClaw 2026.11.5 to the candidate package.

  • Before: Published-driver CI exercised SQLite and could miss PostgreSQL migration or transcript-continuity failures.
  • After: The fixture verifies state schema 36 and agent schema 38 migrate to the candidate versions while preserving store identities, the session, and its transcript.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused validation improvement with matching shipped-entry-point evidence, useful planner regression coverage, and no identified correctness defects.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The supplied Linux PostgreSQL 17 output maps to the new fixture's real npm installation, Gateway RPC seeding, installed update command, schema checks, and candidate transcript read; Windows, managed restart, rollback, and inference remain explicitly outside its scope.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: PostgreSQL upgrade regressions could escape published-driver coverage, while operators were told released PostgreSQL upgrades were inapplicable.
Reason: The released baseline now supports PostgreSQL, and the maintainer-authored direction adds focused continuity coverage without expanding product behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR adds useful released-package PostgreSQL upgrade coverage, with matching behavior evidence and green current-head CI; no actionable defects were found.

Priority: P2
Reviewed head: 607a714c90cd4ee04dba7d2e475f2b4130bb3b63

Before merge

None.

Findings

None.

Agent review details

How this fits together

The published-driver workflow consumes a checksum-verified candidate package, runs an installed released updater against disposable stores, and emits migration and Gateway continuity results.

flowchart LR
  A[Candidate package] --> B[Published driver workflow]
  B --> C[Released npm installation]
  C --> D[Populated PostgreSQL stores]
  D --> E[Installed updater]
  E --> F[Candidate Gateway]
  F --> G[Session and transcript checks]
Loading

Technical review

Best possible solution:

Land the focused PostgreSQL scenario through the existing published-driver owner while retaining its explicit platform and restart limits.

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

The base workflow lacks a PostgreSQL published-package upgrade scenario, and its guide says no released package supports these stores; the released manifest directly contradicts that statement.

Is this the best way to solve the issue?

The patch uses existing workflow, process-management, readiness, and release-version owners, with distinct assertions that prevent Gateway startup from hiding missed updater migrations.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8a6d3a04ee74.

Provenance checked

  • Published-driver workflow and release selection keeps the original intent (25972a6: Exercise incompatibilities hidden when updater and candidate come from the same checkout; later changes preserve bounded CI cost and frozen-release predecessor selection.)
  • PostgreSQL qualification documentation changes intended behavior with a stated reason (169e13d: Published packages inspected at that time did not select PostgreSQL state and agent stores, so package-update qualification was deferred until one shipped.)
  • Frozen-baseline planner regression keeps the original intent (da5ebcb: Staging refs must use the candidate release train's predecessor rather than a newer incompatible npm latest.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced change and current-main boundary: The pinned introduction adds the PostgreSQL fixture and workflow integration; fetched main retains the prior workflow and does not contain this coverage. (.github/workflows/ci-published-driver-update.yml:166, 607a714c90cd)
  • Independent migration and continuity assertions: The fixture checks PostgreSQL anchors and schema versions before candidate Gateway startup, preserves both store IDs, verifies installed build identity, and reads the original session and transcript through Gateway RPC. (scripts/e2e/lib/upgrade-survivor/published-driver-postgres.mjs:251, 607a714c90cd)
  • Released baseline contract: The v2026.11.5 manifest declares PostgreSQL support for state and agent stores with schema versions 36 and 38, matching the fixture's independent baseline expectations. (package.json:4, 8a6d3a04ee74)
  • Reported production-entry-point proof: The PR body supplies a disposable PostgreSQL 17 run using npm 2026.11.5, backup verification, the installed updater, and candidate Gateway history reads, with output reporting state 36 → 40 and agent 38 → 43. (607a714c90cd)
  • Exact-head CI: The linked CI run succeeded for the reviewed head, including the aggregate gate; the published-driver job was skipped under the existing PR selection policy. (607a714c90cd)
  • Supply-chain and authority boundaries: The PostgreSQL image uses the same immutable digest as existing conformance CI; workflow contents permission remains read-only, checkout credentials remain disabled, and child commands receive an explicit isolated environment. (.github/workflows/ci-published-driver-update.yml:28, 607a714c90cd)

Likely related people:

  • Peter Steinberger: Raw commit 25972a6 adds .github/workflows/ci-published-driver-update.yml:11 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 25972a6a2837; files: .github/workflows/ci-published-driver-update.yml)
  • Dallin Romney: Raw commit da5ebcb adds .github/workflows/ci-published-driver-update.yml:59 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: da5ebcbad8b0; files: .github/workflows/ci-published-driver-update.yml)
  • Vincent Koc: Raw commit f876451 adds config/knip.config.ts:443 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: f876451576e2; files: config/knip.config.ts)

PR surface

Tests +10, Docs +16, Config +24, Other +283. Total +333 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 16 6 +10
Docs 2 26 10 +16
Config 1 26 2 +24
Generated 0 0 0 0
Other 2 283 0 +283
Total 6 351 18 +333

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Harness configuration 1 new environment variable OPENCLAW_UPGRADE_TEST_POSTGRES_DSN selects the disposable fixture database; no installed-user configuration or default changes.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The change closes a meaningful upgrade-validation gap and corrects operator guidance without changing installed-user runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 19, 2026, 6:18 PM ET / 23:18 UTC.

@VACInc
VACInc merged commit 5293ccc into openclaw:main Nov 21, 2026
129 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 22, 2026
* fix: test upgrades from released PostgreSQL installs

* fix: pass script lint in PostgreSQL upgrade fixture

---------

Co-authored-by: VACInc <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
(cherry picked from commit 3d91af2)

Release adaptation: regenerate config docs hashes for this stable tree using config:docs:gen; config:docs:check passed. No config migration or anchor rename.

Companions: no later PR or SHA mentions. Later same-path overlaps are unrelated config baseline regeneration, PostgreSQL operations/docs, or qualification tooling; #202109 is independent upgrade coverage, #202704 is a restore guide, and #202654 is a Session Share feature. Existing anchor selection and numeric aggregate fix #202629 are unchanged.

Co-authored-by: VACInc <[email protected]>

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit abc82993e59c1632ddfcaece8a02ce15c432e990)
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 gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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