Skip to content

fix(skills): match complete peak and final block identities - #168

Merged
codeasier merged 1 commit into
mainfrom
fix/issue-161-leak-identity
Oct 3, 2026
Merged

codeasier merged 1 commit into
mainfrom
fix/issue-161-leak-identity

Conversation

@codeasier

Copy link
Copy Markdown
Owner

📝 Description

  • Add bounded JSON active_blocks_at_event queries at the active peak and final event to source and bundled leak Step 4, and include the template in the capability checklist.
  • Match (id, allocEventId) within the same database/device. Collect each event from offset 0 until has_more=false; explain why terminal offset pages can still have truncated=true.
  • Separate sampled evidence from complete-set survival/new/released counts, define denominators, and preserve category separation and lifecycle verification.
  • Reuse the existing synthetic query fixture for four CLI JSON regressions: genuine survival and equal-aggregate address replacement, each with 1 and 501 blocks. Add a focused skill contract.

🔗 Related Issue

Fixes #161

🧪 Testing

  • Tests added/updated
  • Manual testing completed

Using /Users/test1/liuyekang/miniconda3/bin/python and PYTHONPATH=<worktree>/src; verified the imported package path. No editable reinstall.

  • Fixture provenance before deserializing suites: 7 passed.
  • Focused leak/bundled/peak-template checks: 36 passed.
  • pytest tests/skills tests/test_bundled_skills.py tests/query tests/core/test_skill_service.py -q: 383 passed.
  • Full pytest -q with isolated temporary HOME and retained existing user-site path: 1029 passed, 1 xfailed.
  • ruff check . and black --check .: passed.
  • basedpyright --pythonpath /Users/test1/liuyekang/miniconda3/bin/python: 0 errors, 831 informational warnings in unchanged source.
  • Existing pytest-asyncio unset-loop-scope deprecation warning remains. No live-model or real-snapshot diagnostic evaluation was run.

✅ Checklist

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

Snapshot Runtime Provenance

  • Snapshot provenance evaluation completed when snapshot runtime files change
    Snapshot provenance decision: no-update
    Snapshot provenance no-update reason: Only leak skill instructions and synthetic/static tests changed; no snapshot runtime files or executable fixtures changed.

📸 Screenshots (if applicable)

Not applicable.

📋 Additional Notes

Based on origin/main c85a357. Aggregate template semantics are unchanged. Peak-breakdown already uses active_blocks_at_event; this fixes the missing leak Step 4 procedure.
Potential parallel-work overlap: source/bundled leak SKILL.md and tests/skills/test_memory_leak_contract.py (#160/#162/#164), plus tests/query/test_peak_memory_templates.py (#163). Skill edits touch Step 4 and only add one required-template catalog item; Step 2, Step 7, output iteration rules, and other preflight text are unchanged. Query tests are appended without reorganizing existing tests.

@codeasier
codeasier merged commit 9720a3c into main Oct 3, 2026
6 checks passed
@codeasier
codeasier deleted the fix/issue-161-leak-identity branch October 3, 2026 19:18
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.

Step 4 requires identity matching, but the prescribed template returns no block id

1 participant