Skip to content

test(compiler): measure host stack headroom instead of assuming ten times - #212

Merged
julia-script merged 2 commits into
mainfrom
claude/wasm-shadow-stack-apple-silicon-9ycd0x
Aug 16, 2026
Merged

test(compiler): measure host stack headroom instead of assuming ten times#212
julia-script merged 2 commits into
mainfrom
claude/wasm-shadow-stack-apple-silicon-9ycd0x

Conversation

@julia-script

Copy link
Copy Markdown
Owner

The host-control case of the shadow-stack bound asserted that a frameless
recursion carries ten times the reporting depth before V8 refuses. That
multiplier is an engine constant in disguise: V8 sizes its execution stack
differently across versions and platforms, and node 26 on darwin/arm64 no
longer fits ten thousand frameless frames (this container's node 22 fits
about 10,400 — the old assertion was passing by under five percent).

The control now takes its depth as an exported parameter, so one instance
proves the fact the test actually needs: the exact depth whose reservation
reported completes framelessly, and doubling the depth until the host
refuses shows at least twofold headroom. The headroom is measured off the
running engine like every other depth in the file is measured off the
emitted module, instead of being written down.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01BiBYbB23Jj8GKS2AEVEHX4

claude added 2 commits August 16, 2026 01:45
…imes

The host-control case of the shadow-stack bound asserted that a frameless
recursion carries ten times the reporting depth before V8 refuses. That
multiplier is an engine constant in disguise: V8 sizes its execution stack
differently across versions and platforms, and node 26 on darwin/arm64 no
longer fits ten thousand frameless frames (this container's node 22 fits
about 10,400 — the old assertion was passing by under five percent).

The control now takes its depth as an exported parameter, so one instance
proves the fact the test actually needs: the exact depth whose reservation
reported completes framelessly, and doubling the depth until the host
refuses shows at least twofold headroom. The headroom is measured off the
running engine like every other depth in the file is measured off the
emitted module, instead of being written down.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiBYbB23Jj8GKS2AEVEHX4
…atalog

Five codes — PAR0002, SEM0054, SEM0089, SEM0094, SEM0103 — had an empty
"Reported as" cell in the generated diagnostic index because the extractor
only understood `message:` followed by one string literal. Their wording
was therefore ungated by documentation:check, undermining the rule that
tests assert codes while the catalog gates wording.

The extractor now walks the message expression by nesting rather than by
pattern: a conditional contributes every branch's complete template (the
condition's literals are discriminants, not wording), and an expression
with no literal of its own resolves the message helper it calls and takes
the templates its return statements produce. A code with several templates
lists each, and a template containing a backtick uses the padded
double-backtick span form.

Two factories are restructured so each variant is a complete literal
instead of hiding wording inside an interpolation hole — PAR0002's
expectation/context fragments and SEM0089's `&mut` access marker. Every
produced message stays byte-identical.

All 151 codes now carry at least one pinned template, and perturbing any
of the five previously unpinned wordings fails documentation:check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiBYbB23Jj8GKS2AEVEHX4
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@julia-script
julia-script merged commit f73419b into main Aug 16, 2026
2 checks passed
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