Skip to content

feat: publish transactional native snapshot datasets (#201) - #212

Closed
codeasier wants to merge 1 commit into
fix/issue-200-chain-67e26f4from
fix/issue-201-chain-67e26f4
Closed

codeasier wants to merge 1 commit into
fix/issue-200-chain-67e26f4from
fix/issue-201-chain-67e26f4

Conversation

@codeasier

Copy link
Copy Markdown
Owner

📝 Description

Part of the #198–#205 dependency stack, based on fix/issue-200-chain-67e26f4 (stacked on #200). Merge in issue order; after the parent merges, retarget this PR to main.

  • Transactional native-v2 dataset import: output is staged and replay-validated before publication, and an existing destination is never replaced; a requested focus update is included in rollback handling.
  • Carrier/checkpoint safety: rollback requires a verified old target or the original previous+restore bytes, otherwise it fails explicitly; foreign carrier contents are never deleted; same-inode checkpoint mutation restores the exact focus bytes; outcomes are re-checked after late restore exceptions, checkpoint bytes are compared with the immutable old buffer before rename, and focus bytes are re-checked after ordinary returns.
  • Native non-WAL reader policy and the P0 schema are unchanged; compatibility WAL transport is deliberately deferred to [FEATURE] 输出当前 msinsight 可直接复用的兼容分片产物 #202.

Commits in this PR:

26 files changed, 2525 insertions(+), 83 deletions(-):

README.md
README_zh.md
docs/en/database.md
docs/en/focus-management.md
docs/en/quickstart.md
docs/en/sharded-snapshotdb.md
docs/zh/database.md
docs/zh/focus-management.md
docs/zh/quickstart.md
docs/zh/sharded-snapshotdb.md
src/pt_snap_cli/cli.py
src/pt_snap_cli/core/dataset_files.py
src/pt_snap_cli/core/dataset_import_backend.py
src/pt_snap_cli/core/dataset_resolver.py
src/pt_snap_cli/core/focus_service.py
src/pt_snap_cli/core/import_metadata.py
src/pt_snap_cli/core/import_metadata_contract.py
src/pt_snap_cli/core/import_service.py
src/pt_snap_cli/core/models.py
src/pt_snap_cli/core/native_dataset_contract.py
src/pt_snap_cli/core/overview_service.py
src/pt_snap_cli/core/query_service.py
tests/core/test_dataset_import.py
tests/core/test_dataset_import_failures.py
tests/test_dataset_import_cli.py
tests/test_native_dataset.py

🔗 Related Issue

Refs #201 — deliberately no auto-closing keywords; the issue stays open because GUI/C++/installed-wheel acceptance is human-deferred.

Review comment: #201 (comment)

🧪 Testing

  • Tests added/updated
  • Manual testing completed

Transactional import, rollback/restore and publish-without-replace paths exercised locally, including the foreign-carrier and same-inode checkpoint regressions that produced the hardening.

  • Owning focused run: 720 passed (after an initial 717+1 failure fixed scope-preservingly).
  • Owning full suite: 1738 passed; coverage with branches enabled 92.18%; critical floors 91.89/90.27/85.45.
  • basedpyright 0 errors (909 informational warnings); staged governance: 27 passed; post-commit regression: 129 passed.
  • Independent parent verification: fixture provenance 7 + native import/failure/CLI-API/governance 160, all passed.

✅ Checklist

  • Code follows project guidelines
  • Documentation updated (if applicable)
  • No new warnings introduced
  • Changes tested locally

"No new warnings" keeps the pre-existing external pytest-asyncio startup deprecation and existing informational type warnings unchanged rather than hidden; ResourceWarning / PytestUnraisableExceptionWarning remain errors.

Snapshot Runtime Provenance

  • Snapshot provenance evaluation completed when snapshot runtime files change
    No snapshot runtime files change in this PR, so no provenance declaration is required.

📸 Screenshots (if applicable)

Not applicable — no user-interface or C++ changes in this PR.

📋 Additional Notes

Head SHA: ad6d4b8f736319b483c66bae7715eca1025055ce; branch fix/issue-201-chain-67e26f4. All checks above were recorded locally on this exact head; the C++/GUI consumer and installed-wheel profile remain untested and unclaimed.

@codeasier

Copy link
Copy Markdown
Owner Author

Superseded by #216 — the complete #198–#205 chain (including this PR’s commits) was merged into main via #216 (rebase merge) after retargeting. This PR stays as the per-issue review record; the linked issue remains open pending the human-deferred GUI acceptance.

@codeasier codeasier closed this Oct 6, 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