Repository navigation
feat: add pt-snap memory fragmentation skill - #107
Merged
Merged
Conversation
codeasier
commented
Aug 24, 2026
codeasier
commented
Aug 24, 2026
codeasier
commented
Aug 24, 2026
codeasier
left a comment
Owner
Author
There was a problem hiding this comment.
验收结论(基于 661e958):
已修复项(2/2)
- 负数合成事件污染峰值:
memory_peak/allocator_gap已默认带{"start_id":<range_start>}(默认0),并补充了合成行可赢峰值、不能用于active_memory_callstack_at_event的allocEventId <= event_id动态归因的说明;护栏已要求“先拒掉负数峰值再归因”。已在SKILL.md:100-111,307-315验证。 - 事件范围未贯穿:峰值、分配曲线、4 类 segment 事件分页与可选 raw-SQL 聚合现均以同一套
<range_start>/<range_end>约束(start_id/end_id、min_id/max_id、id >= <range_start> AND id <= <range_end>),并在核验清单中固化一致性。已在SKILL.md:122-210,329-331验证。
回归检查
pytest tests/test_memory_fragmentation_skill.py tests/test_setup_skill.py7 passed;ruff check通过;git diff --check无空白问题;无src/变更,无行为回归。
两条行内线程已回复并处于 resolved 状态(PRRT_kwDOR8IVYc6bmA96/97)。
codeasier
force-pushed
the
feat/skill-memory-fragmentation
branch
from
August 24, 2026 14:41
661e958 to
adba1c6
Compare
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
pt-snap-memory-fragmentationworkflow for read-only allocator-gap, segment-retention, and segment-churn diagnosis.🔗 Related Issue
Fixes #105
🧪 Testing
Commands run:
PYTHONPATH=src pytest(700 passed, 1 xfailed)pytest tests/test_memory_fragmentation_skill.py(5 passed)ruff check AGENTS.md skills/AGENTS.md skills/pt-snap-memory-fragmentation/SKILL.md tests/AGENTS.md tests/test_memory_fragmentation_skill.pyblack --check tests/test_memory_fragmentation_skill.py✅ Checklist
Snapshot Runtime Provenance
Snapshot provenance decision: no-update
Snapshot provenance no-update reason: This PR changes only agent skill, navigation documentation, and tests;
src/pt_snap_cli/snapshot/**is unchanged.📸 Screenshots (if applicable)
Not applicable.
📋 Additional Notes
The workflow intentionally treats allocator gaps as pressure indicators rather than a definitive fragmentation ratio or OOM root cause.