Skip to content

3.x.x: run the 2.x.x migration lifecycle weekly on a real node: migrate, mine, reconcile, isolated-restore rollback (#545) - #565

Merged
Anatolie merged 3 commits into
3.x.xfrom
walleye-s20-migration-lifecycle
Sep 29, 2026
Merged

Anatolie merged 3 commits into
3.x.xfrom
walleye-s20-migration-lifecycle

Conversation

@Anatolie

@Anatolie Anatolie commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Closes #545 (#487 S20), except the manifest criterion (see below).

What

A weekly real-node scenario that takes a scaled 2.x.x ledger through the whole of docs/prism-rust-migration.md#recovery-and-rollback, the one-way migration with isolated-restore reconciliation #287 settled.

Seed. Built from the frozen schema_2x release SQL, scaled up from the 3 rows migration_rollback uses:

  • 60,000 ledger rows, including 2.x.x rejects;
  • 250 Zipf-weighted recipients;
  • 36 found blocks, each with a signed audit bundle, rotating through the three historical body layouts (sidecar only, external file, inline);
  • chained carry-forward rows and drained candidate rows.

The legacy pool blocks are real blocks on the regtest chain and are mature under the tip. The native observer checks the latest mature block against the node, and a block the node lacks is a fatal state.

Runbook steps, in order:

  1. Step 2: source evidence (scripts/prism-recovery-evidence.{sql,py}) and a pg_dump backup.
  2. Step 3, pre-ACK rollback: isolated restore. Its evidence must equal the source exactly, and it has no native tables.
  3. Steps 4–5: qbit-prism-server migrate and import-audits. Evidence is unchanged, both completeness counts are 0, and after the source files are deleted every artifact is still served byte for byte, with its ETag, from PostgreSQL.
  4. Native mining: both servers mine on the migrated ledger until each lands at least 3 of its own blocks. Then:
    • the 2.x.x rows are unchanged, compared on their 2.x.x columns;
    • the share sequence and publication order continue past the 2.x.x values;
    • qbit_carry_forward_integrity_report() is clean across the cutover, and native carry rows build on 2.x.x balances;
    • native audit bundles verify against the node's real coinbase;
    • self-check reports complete history.
  5. Step 6, post-ACK boundary:
    • the runbook's tail query returns exactly the native shares;
    • the isolated restore still equals the source and holds none of the native shares or blocks;
    • the legacy ordinal revert refuses the native schema and names the procedure.

Where it runs

Verification (local: pinned qbitd 1.0.0, PostgreSQL 16.15)

  • Weekly scenario: passes in about 65–80 s. From one run: seed 21.6 s, evidence 1.8 s, dump 0.6 s, restore 2.7 s, migrate 1.8 s, import 4.9 s, native mining 11–16 s, self-check 1.5 s.
  • check_gate_manifest.py --expected test/prism-weekly-gated-tests.txt: all 1 expected test executed.
  • Full per-PR live_regtest (non-ignored): 56 passed, 3 ignored.
  • cargo fmt --check, cargo clippy -p qbit-prism-server --all-targets -D warnings and actionlint pass, as do the test_docs_lab_prism_references and test_check_gate_manifest unit tests.

Open items

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…te, mine, reconcile, isolated-restore rollback (#545)

#487 S20. A 2.x.x ledger built from the frozen schema_2x release SQL and
scaled up (60,000 ledger rows with rejects, 250 Zipf-weighted recipients,
36 found blocks with signed audit bundles in all three historical body
layouts, chained carry-forward rows, drained candidates) goes through
docs/prism-rust-migration.md#recovery-and-rollback, the one-way migration
with isolated-restore reconciliation #287 settled:

- the drained source's evidence and a pg_dump backup;
- an isolated restore that reconciles exactly before any native ACK;
- migrate and import-audits, with evidence unchanged and every historical
  artifact served byte for byte from PostgreSQL;
- both native servers mining their own blocks on the real regtest node over
  the migrated history: 2.x.x rows untouched, share sequence and publication
  order continued, the carry chain replayed across the cutover, native
  audits verified against the node's coinbase, self-check complete;
- the post-ACK boundary: the runbook's tail query is exactly the native
  shares, the isolated restore still equals the source and holds none of
  them, and the legacy revert refuses the native schema.

The legacy pool blocks are real blocks on the regtest chain, mature under
the tip, because the native observer checks the latest mature block against
the node and a missing one is a fatal state.

The scenario is an #[ignore] live_regtest test listed in the new
test/prism-weekly-gated-tests.txt. prism-load-nightly.yml gains a Sunday
schedule and a live-weekly job that runs that list and proves it executed
with check_gate_manifest.py; the weekly schedule runs only that job, and
dispatch can add it with `weekly`. Fixture gains open_with_inputs and
server_command so the scenario can take PostgreSQL's tools through the gate
and run operator subcommands with a frontend's settings.

Refs #545, #487

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T20:52:28.657757Z 0eb1c33 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4bd89d977

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…io (#545)

60,000 rows over 36 blocks left 24 unwritten: the first
LEGACY_SHARES % LEGACY_BLOCKS blocks now take one more row, and the seed
refuses a count other than LEGACY_SHARES.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e25dd461f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…he lifecycle scenario (#545)

Runbook step 4 runs the forward migration and the audit import against the
isolated restore. A second restore of the same backup now takes them and
must reconcile exactly with the source and serve every artifact, before the
cutover runs the same commands on the source. The first restore stays the
pre-migration database the rollback checks read. Fixture::tool takes the
database it runs against.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Anatolie
Anatolie merged commit 2f90744 into 3.x.x Sep 29, 2026
21 checks passed
Anatolie added a commit that referenced this pull request Sep 29, 2026
…from 3.x.x (#565, #561) (#583)

* main: sync the PRISM load-harness nightly workflow from 3.x.x (#565)

Schedules run from the default branch's copy of this workflow, so #565's
weekly 2.x.x migration-lifecycle schedule (Sunday 03:43 UTC) and its
schedule-specific job conditions only fire once main carries them. The
file is copied byte for byte from 3.x.x; jobs still build and test the
`ref` input (3.x.x by default).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* main: copy the PRISM load-harness runner probe workflow from 3.x.x (#561)

GitHub dispatches a workflow only when its file is on the default
branch, so #561's dispatch-only runner probe can't run until main
carries it, and #541's runs are blocked on that. The file is copied
byte for byte from 3.x.x at e961113; every job that uses a repository
file checks out the `ref` input (3.x.x by default) first.

Refs #589

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: Anatolie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant