Skip to content

!poolmap draws the map, but never said what the walk missed - #182

Merged
glslang merged 1 commit into
mainfrom
fix/poolmap-coverage-summary
Sep 24, 2026
Merged

glslang merged 1 commit into
mainfrom
fix/poolmap-coverage-summary

Conversation

@glslang

@glslang glslang commented Sep 24, 2026

Copy link
Copy Markdown
Owner

!dbgscope.poolmap is already a shim over the shared walk — it calls query::prepare_index, resolves no types of its own, and shares the snapshot caches. But the walk's own assessment stopped at the library boundary: render_pool_map listed every diagnostic verbatim and rendered none of complete, unplaced_bytes, stalls or refused_chunks. The operator got a picture with no statement of how much of the pool was not in it.

Measured on a live 29671 kernel (windbg-mcp FOLLOWUPS.md item 100): the structured surface reported coverage: partial with gaps.unplaced_bytes: 15,626,240 for a walk whose map said nothing — under 3,616 diagnostic lines that say what went wrong without ever saying what it cost.

What changed

render_pool_map takes the PoolSnapshotReport for the walk behind the index and appends:

--- pool walk ---
chunks walked: 1 (1 allocated), coverage: INCOMPLETE - the walk did not reach everything it set out to, and more time changes nothing
not decoded: 0xee6000 bytes the walk could not place a chunk boundary in
1 diagnostic, listed above.

Three decisions worth the review:

  • On the empty-map path too, which is the case this is really for. With nothing to draw, "no allocation matches" and "the walk never reached the pool" are otherwise the same two lines. A --address miss carries it as well, including when coverage is complete — that is what turns the miss into a real negative rather than a shrug.
  • The report comes from query::report_of, now pub(crate), not from the index's fields. coverage is three states collapsed from two flags, and re-deriving that in the renderer is precisely how the two surfaces would drift apart — which is the whole point of the extension being a shim.
  • It is the walk's report, not the rendered index's. The filter path rebuilds the index from retained spans, so a summary taken after --paged would report the filtered count as the number of chunks walked. The extension takes the report before filtering.

Gap lines appear only when nonzero, so a clean walk stays quiet and the line means something when it shows up.

Verification

cargo test: 430 passed, 0 failed, 13 ignored. cargo fmt --all --check clean. cargo clippy --all-targets -- -D warnings reports 12 errors, all pre-existing — confirmed by running it against pristine HEAD in a separate worktree, which reports the same 12, none in the three files this touches.

All five new tests were mutation-verified, with the edit confirmed applied rather than assumed:

Mutation Test that caught it
Drop summary from the normal map path states_a_walk_that_fell_short
Drop summary from the empty-map path empty_map_still_carries_the_walk
Collapse BudgetExpired into Partial separates_an_expired_budget_from_a_partial_walk
Derive the report from the filtered index filtered_map_reports_the_whole_walk (reports chunks walked: 1 against 2)

🤖 Generated with Claude Code

https://claude.ai/code/session_01MUhLUt9rB6zd42Y25btB3h

The extension is already a shim over the shared walk -- it calls
query::prepare_index, resolves no types of its own, and shares the
snapshot caches -- but the walk's own assessment stopped at the library
boundary. render_pool_map listed every diagnostic verbatim and rendered
none of complete, unplaced_bytes, stalls or refused_chunks, so an
operator got a picture with no statement of how much of the pool was
not in it.

Measured on a live 29671 kernel (windbg-mcp FOLLOWUPS.md item 100): the
structured surface reported coverage: partial with
gaps.unplaced_bytes 15,626,240 for a walk whose map said nothing, under
3,616 diagnostic lines that say what went wrong without ever saying what
it cost.

render_pool_map now takes the PoolSnapshotReport for the walk behind the
index and appends a --- pool walk --- summary, on the empty-map path
too, which is the case this is really for: with nothing to draw, "no
allocation matches" and "the walk never reached the pool" are otherwise
the same two lines. A --address miss carries it as well, including when
coverage is complete, since that is what turns the miss into a real
negative.

The report comes from query::report_of, now pub(crate), rather than from
the index's fields. Coverage has three states collapsed from two flags,
and re-deriving that in the renderer is exactly how the two surfaces
would drift apart -- which is the whole point of the extension being a
shim.

It is the walk's report, not the rendered index's, because the filter
path rebuilds the index from retained spans: a summary taken after
--paged would report the filtered count as the number of chunks walked.
A test pins that, and mutating the call to derive from the rendered
index reports "chunks walked: 1" against 2 and fails it.

All five new tests were mutation-verified: dropping the summary from
either path, collapsing BudgetExpired into Partial, and deriving the
report from the filtered index are each caught by the test that claims
them, with the edit confirmed applied rather than assumed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUhLUt9rB6zd42Y25btB3h
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 12a95289-6e30-4856-9aab-e8b69ca58f2f


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@glslang
glslang merged commit 07c0fe9 into main Sep 24, 2026
7 checks passed
@glslang
glslang deleted the fix/poolmap-coverage-summary branch September 24, 2026 14:19
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