Skip to content

fix(migrations): match native portable receipt boolean layout - #2217

Closed
AlexStocks wants to merge 2 commits into
oceanbase:codex/issue-2154-full-server-upgradefrom
AlexStocks:codex/2084-portable-receipt-layout
Closed

AlexStocks wants to merge 2 commits into
oceanbase:codex/issue-2154-full-server-upgradefrom
AlexStocks:codex/2084-portable-receipt-layout

Conversation

@AlexStocks

@AlexStocks AlexStocks commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Refs #2084, #2154 and #2168. This independent fork contribution targets the upgrade feature branch for the original author to review and integrate.

Rationale for this change

At 8f10c560776b, the interrupted-initialization preflight fix allows recovery to continue, but both real seekDB and OceanBase then stop at the new s1402 receipt-table DDL with incompatible_schema: Actual MySQL schema is not a controlled next-revision DDL state.

The registered DDL uses projections_ready BOOL NOT NULL. Both backends return projections_ready tinyint(1) NOT NULL from SHOW CREATE TABLE, while the frozen expected layout records ["bool", []]. A direct native reflection comparison finds this column type to be the only receipt-table difference on both backends.

What changes are included in this PR?

Record ["tinyint", ["1"]] as the expected native type in the s1402 layout. The DDL, persisted data, existing revision resources and strict schema comparator are unchanged. No general type-alias relaxation is introduced.

Also apply Ruff formatting to the newly added tests/test_bub_compose_startup.py. The mandatory full hook run fails on this file before formatting. Its Python AST is identical before and after formatting.

Synchronize the managed persistence digest and rationale in release/upgrade-support.json with the corrected receipt layout. The upgrade-required policy and twelve-case acceptance matrix are preserved.

Are there any user-facing changes?

Remote initialization can complete s1402 instead of rejecting its own newly created receipt table. This correction is for the pending, unreleased revision; normal bundle/evidence identity checks remain enforced.

How was this change tested?

  • The existing tests/builtin/persistence/test_mysql_migration_runner.py::test_mysql_full_server_resumes_interrupted_initialization_before_manifest_seed fails on both real seekDB and real OceanBase before this correction and passes on both afterward: 2 passed, zero failures/errors/skips. This runs through public plan/apply/verify, retains original maintenance evidence and verifies repeat apply without changes.
  • pytest tests/builtin/persistence/test_mysql_initialization_preflight.py tests/builtin/persistence/test_portable_storage_migration.py tests/builtin/persistence/test_mysql_migration_schema.py -q: 65 passed, 3 disabled native seekDB probes skipped. The separate two-case run above enables both native backends.
  • Native receipt-table probes on seekDB and OceanBase confirm the exact reflected type.
  • UV_NO_SYNC=1 prek run -a: all hooks passed in the existing WSL environment with explicit Linux Git paths and the shared virtual environment.
  • scripts/upgrade_release_gate.py passed; pytest tests/test_upgrade_release_gate.py tests/test_upgrade_publication.py -q: 70 passed.
  • git diff --check passed. The PR changes the native schema resource, its compatibility review metadata and formatting in one test file; an AST comparison confirms that formatting does not change test semantics.

These results establish the selected source recovery paths. Installed-release native recovery and the complete CI upgrade gate remain separate acceptance requirements.

AI usage statement

Implemented and validated with OpenAI Codex under maintainer direction.

seekDB and OceanBase reflect BOOL as TINYINT(1). Freeze that actual type in s1402 so the strict post-DDL recovery check accepts its own receipt table. Apply required Ruff formatting to the new Compose regression test.

Constraint: Preserve strict schema comparison, the existing DDL and all historical layouts.
Scope-risk: Unreleased s1402 receipt-column expectation and formatting-only Compose test changes.
Tested: Existing native initialization recovery test (seekDB/OceanBase: 2 failed before, 2 passed after); focused pytest (65 passed, 3 disabled native probes skipped); UV_NO_SYNC=1 prek run -a (all passed).
Record the managed persistence digest and native receipt type correction in the release compatibility review.

Constraint: Preserve upgrade-required mode and the twelve-case acceptance matrix.
Scope-risk: Compatibility review metadata only; no runtime changes.
Tested: scripts/upgrade_release_gate.py; pytest tests/test_upgrade_release_gate.py tests/test_upgrade_publication.py (70 passed); UV_NO_SYNC=1 prek run -a (all passed).
@AlexStocks

Copy link
Copy Markdown
Contributor Author

Superseded by the target author's commit c3d642da. Closing this independent contribution to avoid duplicate changes.

The target now records the same native TINYINT(1) expected layout, makes that type explicit in the unreleased DDL, includes the same Compose-test formatting, updates the compatibility review, and adds regression coverage. This PR's source correction and formatting are therefore redundant.

Evidence from this contribution: the original interrupted-initialization test failed on real seekDB and OceanBase before the correction and passed on both afterward (2 passed); focused checks passed 65 tests with 3 disabled native probes skipped; compatibility-policy tests passed 70; all hooks passed. These results apply to this PR's tested source and do not establish acceptance of the target author's newer commit or its installed-release CI gate.

All commits in this contribution were pushed only to AlexStocks/powercontext. No target-branch writes, target-PR edits or target-thread resolutions were performed.

@AlexStocks AlexStocks closed this Oct 24, 2026
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