Skip to content

check: the wasm ratio ceiling's stale allowance claim, the fbw-census ring cutoff, and two inherited reds - #1492

Merged
youknowone merged 5 commits into
mainfrom
wasm-jit
Aug 26, 2026
Merged

check: the wasm ratio ceiling's stale allowance claim, the fbw-census ring cutoff, and two inherited reds#1492
youknowone merged 5 commits into
mainfrom
wasm-jit

Conversation

@youknowone

@youknowone youknowone commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Two corrections found while attributing pickle_terminal_raise_resume's
wasm/dynasm ratio, plus the two reds this branch's base was carrying.
Nothing here changes a gate or any emitted code.

WASM_MAX_DYNASM_RATIO's census paragraph named allowance-holders that do not exist

The comment excepted builtin_folds_hot and math_folds_hot from its
worst-fixture claim as the two that "still carry an allowance". Neither carries
a # pyre-check: max-wasm-ratio header, and no other fixture in pyre/bench
does either — the only in-tree occurrences are the reader, its error message,
and check.py's own test fixture.

The paragraph's ratios are left as they are, with a note that they come from a
base that has since moved. One later ubuntu run of 249 gated fixtures read
pickle_terminal_raise_resume worst at 3.26x with foriter_make_function_body
absent from the table, but under the union-of-runs rule the same comment states,
a single run is a reason to census again rather than a refutation of the 3.74x
the following paragraph's arithmetic rests on.

The wasm fbw-census printed a truncated tally with no mention of the cutoff

fbw_diag::record writes the first RING_ENTRIES walks into the ring and lets
every later one bump the totals only. The native reader prints a line per walk
it takes, so the two sides are directly diffable only while a run stays inside
the ring. pickle_terminal_raise_resume takes 79 walks and printed 24
lines, which reads like the whole population.

It now prints [fbw-census] (first 24 walks of 79) ahead of the records when
the count exceeds the ring, and nothing new for a run inside it. Verified both
directions against a freshly built guest.

Two selfcheck fixtures did not say what they need compiled

4630ebc397a (#1479) added a_profiler_installed_from_a_call_event_keeps_c_events
and a_raising_trace_hook_still_owes_the_leave_event carrying a bare
# pyre-check: selfcheck marker and no directive, which synth_selfcheck_compiles
rejects outright — it kills the whole synthetic suite rather than the one fixture.
They were the only two in the tree in that shape.

PYRE_LOOP_CENSUS=1 prints [loop-census] loop hot for both on dynasm and on
wasm, so both now declare selfcheck-compiles=hot. Validated through check.py's
own reader and by running the pattern.

PYRE_GC_SIZE_AUDIT was read from the environment with no triage entry

cef6ccd9334 (#1489) added the size audit's std::env::var_os read in
majit-gc's collector without a row, so every_live_gate_has_a_triage_entry
failed on all three hosts. It is inert unless set, which puts it in §6c; the
section's stated count was 72 against 74 names already listed, so it now reads
75. The prose notes that it is the one entry there that aborts rather than
reports.

Summary by CodeRabbit

  • Diagnostics

    • Added an optional garbage-collection size audit that detects undersized blocks and reports failures.
    • Improved diagnostic output when recorded walks exceed the display capacity, clarifying that only the first 24 are shown.
  • Testing

    • Added compilation checks for additional hot-mode benchmark scenarios.
  • Documentation

    • Updated WebAssembly ratio-ceiling guidance and revised diagnostic and census counts.

`WASM_MAX_DYNASM_RATIO`'s census paragraph excepted builtin_folds_hot and
math_folds_hot from its worst-fixture claim as the two that "still carry an
allowance". Neither carries a `# pyre-check: max-wasm-ratio` header, and no
other fixture in `pyre/bench` does either -- the only in-tree occurrences are
the reader, its error message, and check.py's own test fixture.

Record what the paragraph's numbers are relative to: they come from a base that
has moved, and a later single ubuntu run of 249 gated fixtures read
pickle_terminal_raise_resume worst at 3.26x with foriter_make_function_body
absent from the table. Under the union-of-runs rule the same comment states,
one run is a reason to census again rather than a refutation of the 3.74x the
following paragraph's arithmetic rests on, so that arithmetic is left alone.

Assisted-by: Claude
`fbw_diag::record` writes the first `RING_ENTRIES` walks into the ring and lets
every later one bump the totals only, while the native reader prints a line per
walk it takes. The runner printed the ring's contents with no mention of the
cutoff, so a run past it handed back a tally that reads like the whole
population: `pickle_terminal_raise_resume` takes 79 walks and printed 24 lines.

Print `(first 24 walks of 79)` ahead of the records when the count exceeds the
ring. A run inside the ring prints nothing new.

Assisted-by: Claude
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 18ba3287-dbd6-4002-a640-4d81bde98e0e

📥 Commits

Reviewing files that changed from the base of the PR and between 1579a6a and e025d0e.

📒 Files selected for processing (5)
  • pyre/bench/synth/a_profiler_installed_from_a_call_event_keeps_c_events.py
  • pyre/bench/synth/a_raising_trace_hook_still_owes_the_leave_event.py
  • pyre/check.py
  • pyre/gate-triage.md
  • pyre/pyre-wasm-runner/src/main.rs

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


Walkthrough

The changes add hot-mode selfcheck directives, document PYRE_GC_SIZE_AUDIT, revise wasm ratio-ceiling census notes, and report truncated FBW walk output.

Changes

Wasm diagnostics and validation

Layer / File(s) Summary
Hot-mode selfcheck directives
pyre/bench/synth/a_profiler_installed_from_a_call_event_keeps_c_events.py, pyre/bench/synth/a_raising_trace_hook_still_owes_the_leave_event.py
Both benchmark files now require hot-mode selfcheck compilation.
Gate diagnostic inventory and GC audit
pyre/gate-triage.md
The diagnostic count increases from 72 to 75. PYRE_GC_SIZE_AUDIT is listed and its GC block size checks are documented.
Wasm census and FBW reporting
pyre/check.py, pyre/pyre-wasm-runner/src/main.rs
The wasm census notes describe unioned gated observations. FBW output reports when walks exceed the ring capacity of 24 entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to e025d

This PR corrects stale census documentation and clarifies truncated diagnostic output without changing gates or emitted code, so no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit checks the hot-mode gate,

Counts each walk before it’s late.
GC sizes line up true,
Census notes get clearer too,
And twenty-four tracks mark the trail.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main changes: correcting the WASM ratio-ceiling documentation, reporting FBW census ring truncation, and addressing two inherited selfcheck failures.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wasm-jit

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.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown

🤖 Codex parity review

Static analysis of this diff vs the local RPython/PyPy sources (commit 2aebf47).
Updated: 2026-08-26T06:29:07.049Z

Files in the reviewed diff
pyre/bench/synth/a_profiler_installed_from_a_call_event_keeps_c_events.py
pyre/bench/synth/a_raising_trace_hook_still_owes_the_leave_event.py
pyre/check.py
pyre/gate-triage.md
pyre/pyre-wasm-runner/src/main.rs

1. Regressions to PyPy parity introduced by this patch

None.

2. Other mismatches introduced by this patch

None.

3. Pre-existing mismatches (already present before this patch)

None.

4. Structural adaptations

  • pyre/pyre-wasm-runner/src/main.rs:875 adds a host-side notice when its fixed 24-entry diagnostic ring is truncated. This is wasm-host diagnostic plumbing with no RPython/PyPy semantic counterpart; it does not affect Python execution or JIT decisions.

Both fixtures carry the bare `# pyre-check: selfcheck` marker and no
`selfcheck-compiles=`/`selfcheck-interpreted`, which `synth_selfcheck_compiles`
rejects, so `pyre/check.py` errors out before it runs the synthetic suite.

`PYRE_LOOP_CENSUS=1` prints one line for each: `[loop-census] loop hot`, on
dynasm and on wasm alike. Both fixtures warm `hot` and then arm the hook, and
their invariant is about what the compiled loop does once profiled, so the
`loop` arm's `hot` is the shape to declare rather than the interpreted opt-out.

Assisted-by: Claude
`cef6ccd9334` added the size audit's `std::env::var_os("PYRE_GC_SIZE_AUDIT")`
read in `majit-gc`'s collector without a triage row, so
`every_live_gate_has_a_triage_entry` failed on every host.

It is inert unless set, which puts it in §6c. The section's stated count was
72 against 74 names already listed; it now reads 75.

Assisted-by: Claude
@youknowone youknowone changed the title check: the wasm ratio ceiling's stale allowance claim, and the fbw-census walks the ring drops check: the wasm ratio ceiling's stale allowance claim, the fbw-census ring cutoff, and two inherited reds Aug 26, 2026
@youknowone
youknowone merged commit 6520b30 into main Aug 26, 2026
5 checks passed
@youknowone
youknowone deleted the wasm-jit branch August 26, 2026 05:37
youknowone added a commit that referenced this pull request Aug 26, 2026
`6ad2595c699` added a §7 row for it and #1492 added a §6c listing plus a
paragraph, so the merge of the two left one gate filed under two sections
whose criteria differ: §6c is the list of gates that are inert unless set,
§7 the table that states polarity and a retirement condition per gate.

The §7 row is kept and the §6c listing dropped; its paragraph said what the
row says. §6c names 74 gates again, which its heading now states.

Assisted-by: Claude
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