You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
repsel: --opt-report panics on real dependency JS — RULE2 carries two tiers and render.rs asserts one #7234
--opt-reportpanics on real dependency JS in any debug-assertions build,
because RULE2 ("rule 2 (containment)") carries two tiers in collectors/ptr_shape_report.rs — 10 records with Tier::Fixable and 3 with Tier::CompilerLimitation — and opt_report/render.rs:418 asserts that a rule
carries exactly one.
thread 'perry-main' panicked at crates/perry-codegen/src/opt_report/render.rs:418:9:
assertion `left == right` failed: rule rule 2 (containment) carries two tiers; the bucket would report only one
left: Some(CompilerLimitation)
right: Some(Fixable)
Error: perry compiler panicked: …
The assertion is #7176's own S20 guard (one_rule_carrying_two_tiers_is_a_hard_error),
added because a debug_assert nothing exercised was a green hole. It is
correct; the table it guards is not.
Reproduction
cargo build -p perry # debug — assertions ON
mkdir /tmp/r && cp <module> /tmp/r/mod.js && cd /tmp/r
PERRY_NO_AUTO_OPTIMIZE=1 <perry> compile mod.js --opt-report=json --no-link
Module: @typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js
(from real-apps/scriptc/node_modules). It emits both a Fixable rule-2
denial and a CompilerLimitation one, so the renderer's per-rule tier fold
sees two.
Why nobody has hit it
--profile perry-devinherits release, so debug_asserts are off —
every local repsel measurement in this campaign has been perry-dev and never
saw it.
The repsel-census CI job DOES build cargo build -p perry (debug), but its
corpus is benchmarks/repsel_census + benchmarks/suite, and no fixture
there lands both tiers under rule 2. Real dependency JS does, routinely.
Scope
Found while measuring #7170 R1 (PR #7233), and exonerated by in-place A/B:
with all five of that PR's production files reverted to origin/main in the
same target dir and the same package set, the panic is identical. It is
pre-existing at 46e5e377b, and it is not introduced by the three GC commits
between 65a64f428 and there — reverting to origin/main sources is what
reproduces it.
Pick one tier for rule 2. Cheaper, and loses the distinction the records
were written to carry.
Either way the fix needs a test that puts both tiers in one report, because
that is the case no existing fixture reaches — the same gap that let this ship.
Activity
fix(opt-report): a rule spanning two tiers reports two buckets instea…
fix(opt-report): a rule spanning two tiers reports two buckets instea…
proggeramlug commentedon Aug 11, 2026
Verified fixed on current
main(079e646dd). Merge commit2304290afrom #7808 is present, and the exact regression test now passes:cargo test -p perry-codegen --lib one_rule_carrying_two_tiers_reports_two_bucketsResult: 1 passed, 0 failed. The two tiers are emitted as separate buckets instead of triggering the former debug assertion. Closing as fixed by #7808.