Skip to content

feat(snapshot): finalize continuous native shard replay (#199) - #210

Closed
codeasier wants to merge 1 commit into
fix/issue-198-09244150from
fix/issue-199-chain-67e26f4
Closed

codeasier wants to merge 1 commit into
fix/issue-198-09244150from
fix/issue-199-chain-67e26f4

Conversation

@codeasier

Copy link
Copy Markdown
Owner

📝 Description

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

  • simulate/simulate.py reuses the existing full replay loop for position-based pauses (deliberately not an ID threshold).
  • New tools/adaptors/sharded_replay.py: native-v2 multi-writer staging, original-object lifecycle tracking, negative left-boundary rows, transactional batch-ID/free_completed/stack-source backfill and final validation; new shared core/sharded_replay_service.py producer boundary.
  • tools/adaptors/snapshot2db.py and database/snapshot_db.py close connections on constructor/commit failure while preserving the original single-DB data contract.
  • Unknown allocations keep device-local negative identities without upstream compaction; all writers close before finalization. No incremental readiness, compatibility manifest, cache/publication, CLI or structured-frame changes.

Commits in this PR:

12 files changed, 1037 insertions(+), 26 deletions(-):

README.md
README_zh.md
docs/en/sharded-snapshotdb.md
docs/zh/sharded-snapshotdb.md
src/pt_snap_cli/core/sharded_replay_service.py
src/pt_snap_cli/snapshot/PROVENANCE.md
src/pt_snap_cli/snapshot/simulate/simulate.py
src/pt_snap_cli/snapshot/tools/adaptors/database/snapshot_db.py
src/pt_snap_cli/snapshot/tools/adaptors/sharded_replay.py
src/pt_snap_cli/snapshot/tools/adaptors/snapshot2db.py
tests/core/test_sharded_replay_service.py
tests/snapshot/test_sharded_replay.py

🔗 Related Issue

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

Review comment: #199 (comment)

🧪 Testing

  • Tests added/updated
  • Manual testing completed

Replay, staging, backfill and finalization behavior exercised through the owning suites and the shared replay-service checks.

  • Owning focused run: 463 passed.
  • Owning full suite: 1586 passed; coverage with branches enabled 92.06%.
  • Staged governance: 27 passed; post-commit regression: 73 passed.
  • Independent parent verification: fixture provenance + sharded replay/service + governance, 80 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
    Snapshot provenance decision: updated
    Provenance entries are append-only; this PR adds its entry to src/pt_snap_cli/snapshot/PROVENANCE.md.

📸 Screenshots (if applicable)

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

📋 Additional Notes

Head SHA: b9456c25755b1a9ec8bebb5df25f09baf9a71d2f; branch fix/issue-199-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