Skip to content

feat: use metadata driven stack traces - #148

Closed
djolertrk wants to merge 6 commits into
nextfrom
feat/frame-start-end
Closed

djolertrk wants to merge 6 commits into
nextfrom
feat/frame-start-end

Conversation

@djolertrk

@djolertrk djolertrk commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

This replaces event-based frame tracking with the VM’s frame resolver, using existing debug info and execution state. No new package metadata is needed.
Optimized exec frames sometimes require a best-effort guess, so we label those [inferred]. Callers we can’t identify are left out rather than shown as reliable frames.

@djolertrk

djolertrk commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Use assembler-generated frame metadata for local and DAP backtraces
and step-out behavior. Stop using legacy compiler frame events to
construct the call stack, while accepting those events as no-ops.

Preserve physical invocation identity and attach inherited inline scopes
to their callers. Add event-free frame and return-boundary regressions.

Use the sibling VM checkout for the new version 4 debug-info contract,
and adapt execution output handling to its VM 0.34 API. Replace these
local dependency paths with a published revision before sharing the PR.
Check exact frame names, order, and counts for tail calls, recursion,
adjacent invocations, and static and dynamic calls without frame events.
Deserialize package fixtures in DAP tests to exercise the wire contract.

Fix DAP step-out to compare invocation identities instead of only stack
depth, so consecutive calls at the same depth are not skipped.

Validation: 342 workspace tests and 29 non-Python lit tests pass, along
with Clippy and formatting checks against the local VM 0.34 checkout.
Replace sibling VM path dependencies with the walnuthq/miden-vm
feat/frame-start-end branch. Pin the resolved revision in Cargo.lock
so CI can build the frame metadata integration without a local checkout.

Verify all 26 VM packages resolve from Git, the workspace check passes,
and all three DAP stack-trace regressions pass.
Use the VM's cached resolver to recover frames from existing debug
metadata without requiring new serialized procedure-frame ranges.

Label inferred frames in local and DAP backtraces and explain that
optimized callers may be missing. Refresh frame evidence while
preserving invocation identity, and update regression coverage.

Validated against the local VM implementation using a temporary Cargo
patch; the fork dependency still needs the corresponding VM update.
Add lit regressions for conditional branches, loop invocations, nested
exec/dynexec unwinding, identical procedure bodies, and session reload.
Assert frame identity, ordering, inference labels, and final results.
Update split test modules for metadata-driven frame tracking and DAP
frame identities. Remove obsolete event-based call-depth assertions,
keeping regression coverage for replay ignoring legacy frame events.
@github-actions

Copy link
Copy Markdown
Contributor

Line coverage: 78.51% (8,740 / 11,133 lines). Required: 75%.

Coverage CI run

@bitwalker

Copy link
Copy Markdown
Collaborator

Closing as superceded by #162

@bitwalker bitwalker closed this Oct 21, 2026
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.

2 participants