Repository navigation
fix(query): normalize missing callstack attribution - #166
Merged
Merged
Conversation
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
[missing callstack]in both SQL layouts ofactive_memory_callstack_at_event.top_n, preserving bytes, requested bytes, block counts, and category. Use an explicit normalized grouping key to avoid SQLite resolvingGROUP BY callstackto the source column. Nonempty v1 groups use text; v2 groups use callstackId per repository guidance.semantics_versionto 2 because merging affects ranked groups and percentages. Document whitespace/literal-label boundaries and that display labels are not unique identities.🔗 Related Issue
Fixes #163
🧪 Testing
All local Python commands used
/Users/test1/liuyekang/miniconda3/bin/python, with this worktree’ssrcfirst on PYTHONPATH. Pytest ran from the worktree root with an isolated HOME and the existing user site retained; no editable install was changed.python -m pytest tests/test_fixture_provenance.py -q— 7 passed before deserializing suites.python -m pytest tests/query tests/core/test_query_service.py tests/core/test_capability_service.py tests/core/test_report_service.py tests/test_cli.py tests/test_cli_json.py tests/test_api.py tests/test_contract_cli_api.py tests/skills tests/test_bundled_skills.py -q— 555 passed.python -m ruff check .— passed.python -m black --check .— 155 files unchanged.python -m basedpyright --pythonpath /Users/test1/liuyekang/miniconda3/bin/python --outputjson— 61 files analyzed, 0 errors, 831 informational/non-gating warnings.git diff --check— passed.Coverage includes both layouts, mixed empty/NULL/dangling/missing joins, normal stacks, whitespace and literal-label boundaries, static/preexisting separation, bytes/requested-bytes/block conservation, top_n, min_size, max_rows percentage denominators, and CLI/API capabilities/template-info/result consistency.
✅ Checklist
Snapshot Runtime Provenance
Snapshot provenance decision: no-update
Snapshot provenance no-update reason: Only one query YAML, regression tests, and peak skill interpretation copies change; snapshot runtime, import behavior, and database schema are untouched.
📸 Screenshots (if applicable)
Not applicable.
📋 Additional Notes
pt-snap-helperand the diagnostic skills contradict each other on prerequisite probing #162:skills/pt-snap-memory-peak-breakdown/SKILL.mdandsrc/pt_snap_cli/bundled_skills/pt-snap-memory-peak-breakdown/SKILL.md. This PR edits only the static/preexisting/dynamic interpretation paragraph, away from the preflight changes.