Skip to content

test: add portable three-shard free-requested interop fixture - #256

Merged
codeasier merged 1 commit into
mainfrom
test/three-shard-lifecycle-249
Oct 11, 2026
Merged

codeasier merged 1 commit into
mainfrom
test/three-shard-lifecycle-249

Conversation

@codeasier

@codeasier codeasier commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Description

  • Add a minimal, v1-compatible three-event synthetic source: allocation 0, free_requested 1, free_completed 2, each in its own shard.
  • Exercise real CLI subprocess imports in compatibility-v1 and native-v2. Verify unique event ownership, all nine physical event fields (including full stack text, stream and allocated/active/reserved counters), stable block references, and manifest-candidate discovery.
  • Demonstrate the current-shard-only consumer lookup limitation, then verify an independent lifecycle-bounded SQL oracle. Separate address-reuse and open-ended pending/allocated cases prevent incorrect associations.
  • Ship the unmodified three-shard v1 SQLite fixture with source JSON, an absent-destination-only generator, exact size/SHA256 records, provenance and aligned English/Chinese documentation. No new committed pickle or third-party implementation.

Refs #249. Related to #248 and msinsight #625; this does not fix, execute or verify the consumer.

Testing

  • New focused regression: 13 passed, including Windows/POSIX manifest keys and actual autocrlf checkout byte preservation.
  • Owning suite: 187 passed in 22.95 seconds.
    PYTHONPATH="$PWD/src" python -m pytest tests/test_fixture_provenance.py tests/test_interop_three_shard.py tests/core/test_msinsight_export.py tests/snapshot/test_sharded_replay.py tests/test_native_dataset.py tests/test_interop_acceptance.py tests/test_governance.py
  • ruff check .
  • black --check . (237 files unchanged)
  • python -m basedpyright --pythonpath <intended interpreter>: 0 errors; 1,745 existing warnings.
  • git diff --check and relative documentation-link checks.
  • Executed the documented generator CLI into an absent temporary directory. Generated inputs are only synthetic local data; no network, GPU/NPU, paid models or real sessions.
  • Full repository suite and actual GUI/C++ acceptance were not run for this PR.

Provenance and limits

Snapshot provenance decision: no-update
Snapshot provenance no-update reason: No files under src/pt_snap_cli/snapshot are changed; this adds independently authored tests, synthetic fixture data and docs. Fixture-specific provenance is recorded separately under tests/fixtures/interop/PROVENANCE.md.

Reproduction is semantic across supported Python/SQLite versions, not a claim of byte-identical artifacts: the committed fixture retains real generation timestamps/version/source metadata and its recorded hashes. Use a freshly generated original pickle adjacent to its generated .msinsight cache for any separately authorized GUI retest; do not let a mutating consumer alter the committed fixture. Existing all-replay coverage remains unchanged.

Independent review

Portability findings were fixed before publication. Final independent validation: 7 provenance tests and 155 focused/owning tests passed, including all 13 dedicated cases. Ruff, Black and diff checks passed. Windows path simulation and a real autocrlf checkout passed on Linux; native Windows execution remains separate. Remote CI is pending.

Copy link
Copy Markdown
Owner Author

检视结论:approve

对照 #249 / msinsight #625(生产侧):3 片 fixture + CLI 导入;find_requested 按 (alloc, free) 定界;复现「仅当前片」漏检 vs 跨片 oracle;地址复用与未完成生命周期覆盖到位。checksum / eol=lf / -text 正确。不修 msinsight 读端,符合边界。定向 20 passed。

可独立于 runner 扩展 PR 提前合入。本评论不 approve/merge。

@codeasier codeasier left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM,已转为正式 PR。GitHub 不允许作者账号提交 APPROVE,以本评论 + 此前检视评论作为通过记录。可独立提前合入。

@codeasier
codeasier merged commit d5cf8d6 into main Oct 11, 2026
14 checks passed
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