Repository navigation
fix(types): check snapshot runtime at the basedpyright error gate - #155
Merged
Merged
Conversation
codeasier
commented
Sep 19, 2026
codeasier
left a comment
Owner
Author
There was a problem hiding this comment.
Cross-Review 结果(3 位独立审阅者,quorum 2,父会话仲裁)
审阅者:volceapi/qwen3.8-flash、opencode-go/deepseek-v4.1-flash、opencode-go/muse-spark-1.3-contributor,针对 PR head 快照独立评审后由仲裁会话逐条验证。
发现(已验证)
- [高 · CI 阻断]
src/pt_snap_cli/snapshot/PROVENANCE.md:189改写了既有行(append-only 违规),provenance 守卫实跑 exit 1,详见行内评论。修复:恢复该行为 base 原文,仅保留新增条目。 - [低 · 文档] CHANGELOG 新条目落在
[0.5.0]段而 PR 描述写的是[0.4.0],见行内评论。
已独立复现的非问题
- basedpyright 实测 0 errors / 831 warnings(
failOnWarnings=false,与 PR 声明一致)。 - 聚焦测试实测 228 passed, 1 xfailed(
tests/snapshot/ tests/test_governance.py tests/test_fixture_provenance.py)。 DeviceSnapshot.__init__(原为无__init__的普通类,调用点均为无参构造后赋属性)、_format_frame逐元素分发、int | None字段(读取方均 None-aware)、cast(int, getattr(event, "device", 0))、import-cycle 直连导入(无残留snapshot_lookup./snapshot_mutator.引用)、SliceDumpHooker.dump的 RuntimeError 守卫(正常回放流先经pre_undo_event置prev_segments)——均无行为回归。
遗留测试缺口(不阻断)
- Full
pytest套件与 manual testing 在 PR 描述中未勾选。 - 混合
Frame/dict帧列表、build_from_event携带device属性分支缺一行式用例。
结论:变更本体健全;仅发现 1 必须修复(PROVENANCE.md:189 恢复原文),否则 snapshot-provenance CI 必失败。
The snapshot-provenance guard rejects rewritten existing lines; this puts the accidental extra spaces back so the 2026-09-19 entry is the only insertion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Complete issue 122 phase 3: annotate the first-party snapshot runtime so the snapshot-only basedpyright
executionEnvironmentsdowngrade list can be removed. Phases 1–2 already landed in #130. Replay, import, and split behavior is unchanged.Removed downgrades:
reportMissingTypeArgument,reportAssignmentType,reportAttributeAccessIssue,reportUninitializedInstanceVariable,reportArgumentType,reportIndexIssue,reportImportCycles.🔗 Related Issue
Fixes #122
Related to the Agent-friendly parent roadmap (issue 136) only. This slice must not auto-close that parent.
🧪 Testing
python -m basedpyright --pythonpath "$(python -c 'import sys; print(sys.executable)')"— 0 errorsPYTHONPATH=src pytest tests/test_fixture_provenance.py tests/snapshot/ tests/test_governance.py— 228 passed, 1 xfailedruff checkandblack --checkon touched Python pathspytestsuite✅ Checklist
Snapshot Runtime Provenance
Snapshot provenance decision: updated
📋 Additional Notes
CHANGELOG.mdunder[0.5.0]. Parallel with the sibling-database skill PR; rebase the later merge on that file.