Skip to content

Verify rollback against the selected Stable schema (OSS-246) - #714

Merged
athNdev merged 1 commit into
mainfrom
codex/oss246-upgrade-rehearsal-schema-delta
Nov 20, 2026
Merged

athNdev merged 1 commit into
mainfrom
codex/oss246-upgrade-rehearsal-schema-delta

Conversation

@athNdev

@athNdev athNdev commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

OSS-246

The derived Stable rehearsal can include the same model tables as the candidate. The old check treated the historical migration inventory as newly created by every candidate and rejected an exact restore of Stable v2.0.1. Failed hosted rehearsal

Copy-back now uses the candidate-only table set observed for each run. Both rollback paths require the exact Stable table names. The missing-snapshot refusal must also preserve exact candidate table names. Candidate model, checksum, version, SQLite integrity, seeded row and world checks still run. The report includes the observed candidate-only table names.

Verification

  • Head 1c8a6f6c25579fb428292861c128ae7689537190 on main 86f80535011072c45f2cf951cb4078d675398f08.
  • An offline regression reproduced the false failure before the fix. It now covers Stable that already has the historical tables, an actual candidate-only table, and same-count table substitution on each rollback path.
  • python -m unittest scripts.test_upgrade_rehearsal_ci scripts.test_node_vm_upgrade passed all 17 tests. Both knowledge lint passes and git diff --check passed.
  • Local fixtures use disposable SQLite files and stub the binary launch boundary. The real-binary rehearsal runs as the hosted PR check.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Documentation
    • Clarified that rollback restores the exact Stable table set and removes only tables added in the candidate version.
  • Tests
    • Expanded upgrade rehearsal checks to verify the full table set after restore and cover candidate-only tables and rollback corruption scenarios.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Rollback validation

Layer / File(s) Summary
Exact table-set checks
scripts/upgrade_rehearsal_ci.py
The rehearsal checks for expected candidate models, verifies that forced failure leaves the upgraded table set unchanged, and requires app-level and copy-back restores to match the Stable table set. It records candidate-only table names in the case report.
Rollback regression coverage
scripts/test_upgrade_rehearsal_ci.py, knowledge/workflows/release-rules-3.md
Tests cover rollback with and without a candidate-only table and simulate corruption during restore. The rehearsal description now states that rollback restores the exact Stable table set and removes tables observed in the candidate delta.

Change: Bug fix

Merge Risk: Minimal · up to 1c8a6

The upgrade rehearsal now checks that a rollback restores the exact Stable table set, which fixes the false failure for Stable schemas that already contain historical tables. The change affects CI tooling only, and no merge-blocking risk was identified.

Security architecture risk: Minimal · up to 1c8a6

The change strengthens rollback validation without changing restore execution or expanding privileges. It detects same-count table substitutions and avoids incorrectly rejecting tables already present in Stable. No introduced or worsened architecture-level security or rollback risk was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed behavior affects rehearsal acceptance and reporting over caller-owned disposable database workspaces. The inspected change does not add a production mutation path or expand the existing binary-launch authority.

Trust Boundaries and Controls

  • observed — The routed run_service, run_restore and copy_snapshot additions are nested inside a unittest method and installed through scoped mocks. They do not expose a new request handler or externally callable service boundary.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c229cac8-feae-46b9-9860-ab832853823b
Commits

Reviewing files that changed from the base of the PR and between 86f8053 and 1c8a6f6.

Files selected for processing: 3

  • knowledge/workflows/release-rules-3.md
  • scripts/test_upgrade_rehearsal_ci.py
  • scripts/upgrade_rehearsal_ci.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@athNdev

athNdev commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Reviewed exact head 1c8a6f6c25579fb428292861c128ae7689537190. The copyback check compares exact table identities against each observed Stable snapshot and separately refuses candidate-only tables. Checksums, required candidate models, SQLite integrity, rows and world hashes remain enforced.

All 17 offline tests and seven release-planner checks passed. The hosted real-binary rehearsal succeeded for both legacy v1.0.40 and derived Stable 2.0.1 (run 44809273420). All 18 executed hosted checks passed and knowledge checks passed 40/40.

@athNdev
athNdev merged commit aea2e26 into main Nov 20, 2026
19 checks passed
@athNdev
athNdev deleted the codex/oss246-upgrade-rehearsal-schema-delta branch November 20, 2026 20:23
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