Skip to content

refactor(engine): type the captured child-boundary stack depth - #7515

Merged
matthewevans merged 1 commit into
mainfrom
ship/refactorengine-type-the-captured-child-boundary
Aug 17, 2026
Merged

refactor(engine): type the captured child-boundary stack depth#7515
matthewevans merged 1 commit into
mainfrom
ship/refactorengine-type-the-captured-child-boundary

Conversation

@matthewevans

Copy link
Copy Markdown
Member

Close FrameVec::slot_at_captured_depth, the last bare-usize door into
resolution-frame addressing, deferred by #7489.

ChildStackDepth is an opaque newtype whose tuple field is private to
frame_vec, so resolution -- its parent module -- cannot construct one.
A usize from a scan still compiles and now has nowhere to go: the only
mint is FrameVec::capture_depth, which reads the stack's own length.

Threads the type through 15 capture origins, 8 GameState wrappers, 6
ResolutionStack doors, 5 park_* helper params, 9 Ord comparison reads and
3 ResolutionStackError fields. No serialized type is affected.

The structural guard gains four conditions built on a balanced-paren
signature extractor, so a second bare-usize parameter in frame_vec.rs
fails CI even when it hides behind a closure or a generic parameter.


Rebase note. Cherry-picked onto an origin/main that had advanced 9 commits past the reviewed base (a8244e73). One conflict, in change_zone.rs, where the reviewed commit changed the depth-capture line and upstream (#7496) changed the adjacent call line to execute_zone_move_with_terminal_and_controller. Resolved keep-both. The resolved diff's added/removed lines are byte-identical to the reviewed diff (+337/-116, 11 files); only surrounding context moved. The boundary guard passes on the rebased tree.

Close FrameVec::slot_at_captured_depth, the last bare-`usize` door into
resolution-frame addressing, deferred by #7489.

ChildStackDepth is an opaque newtype whose tuple field is private to
`frame_vec`, so `resolution` -- its parent module -- cannot construct one.
A `usize` from a scan still compiles and now has nowhere to go: the only
mint is FrameVec::capture_depth, which reads the stack's own length.

Threads the type through 15 capture origins, 8 GameState wrappers, 6
ResolutionStack doors, 5 park_* helper params, 9 Ord comparison reads and
3 ResolutionStackError fields. No serialized type is affected.

The structural guard gains four conditions built on a balanced-paren
signature extractor, so a second bare-`usize` parameter in frame_vec.rs
fails CI even when it hides behind a closure or a generic parameter.
@matthewevans
matthewevans enabled auto-merge August 17, 2026 14:01
@matthewevans
matthewevans added this pull request to the merge queue Aug 17, 2026
@github-actions

Copy link
Copy Markdown

Generated for head 57c51f022678004b643aa5863597cb825c7913e2.

Parse changes introduced by this PR

✓ No card-parse changes detected.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

Merged via the queue into main with commit d013272 Aug 17, 2026
15 checks passed
@matthewevans
matthewevans deleted the ship/refactorengine-type-the-captured-child-boundary branch August 17, 2026 14:36
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