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: promotion census — make "zero values promoted" a visible, gated state instead of an invisible one #7106
--opt-report (#6952) can tell you, for one build, which values got an unboxed
representation and which did not. What it cannot do is tell you that the answer changed — or that it has been zero all along.
#7034 established the state of things by hand-instrumenting the compiler:
Ptr<Shape> promotes nothing at all on benchmarks/app-patterns/kernels/batch.ts,
the object/property-heavy program that representation exists for. PERRY_PTR_SHAPE_LOCALS=0 versus the default produced a byte-identical
binary (4,294,904 bytes, __text 3,804,424).
Across benchmarks/suite, only 3 files promote a shape local, and each
promotes exactly one.
Nobody knew any of that until somebody went looking. That is the failure to
make impossible to repeat.
Ask
A per-workload, per-representation census recorded as a ratcheted baseline,
so a drop turns a build red.
Per representation, not aggregated: the interesting signal is Ptr<Shape> = 0 while canonical Str ≠ 0. One total hides exactly that.
The hard part
CLAUDE.md, "★ Four ways a gate can be unable to fail", case 4 — the gate runs
but its subject never did. A census that faithfully reports Ptr<Shape>: 0
and exits green is worth nothing: that is the state the project is in
today. So the census needs, beyond floors:
floors that can actually be violated (the honest floor for Ptr<Shape> on
real code is zero, and a zero floor can never fail);
a liveness assertion on the instrument itself — a fixture that definitely
promotes, which fails the census if its count reads zero, so that "zero
because nothing promoted" is distinguishable from "zero because nobody
increments the counter";
The census's first verdict is measured and written up in #7128.
Headline for this issue specifically: the census works, and its selected/consumed split (#7117/#7119) is what made the result honest.
Corpus-wide canonical-i32 went 13 → 64 and from promoting in 2 of 18 real
workloads to 17 of 18 — and it changes the emitted object on 2 of them.
Without the consumed column the answer would have read "64 promotions, looks
great".
Also from that run, four instrumentation defects worth tracking here:
PERRY_CANONICAL_I32_LOCALS=0 is not representation-isolating — it also
disables allPtr<Shape> consumption (repsel_context_allows_ptr_shape: repsel_allows). Under that knob the census reads ptr-shape 7 selected /
0 consumed with all six sites NEVER FIRES.
PERRY_CANONICAL_STR_LOCALS=0 is not scoped to Str locals either (it gates nanbox_string_ref_boxed), so 24 of 26 workloads emit differently under it.
every __pshape clone has zero call sites and is dead-stripped before the
object, so the 8 consumed_receiver entries count consumption inside
functions that never ship.
Ptr<NumArray>: 6 selected, and turning it off leaves every real workload
byte-identical.
And one that affects the census's own method: object emission is nondeterministic on Linux (the module name embeds pid + nanotime), so
object-hash A/B is macOS-only today.
Delivered: benchmarks/repsel_census/baseline.json, scripts/compiler_output_harness/repsel_census.py, tests/test_repsel_census.py, and a repsel-census job in test.yml with floors and sabotage checks.
One follow-up remains and is tracked separately: the job is not yet in branch protection's required contexts, so it cannot turn a merge red.
Activity
docs: point the census at its own tracking issue (#7106, not #7035)
test(repsel): promotion census with a ratcheted, falsifiable floor (#…
test(repsel): make "no analysis ran" a visible, gated state
test(repsel): make "no analysis ran" a visible, gated state (#7113)
test(repsel): count CONSUMED promotions, not selected ones
test(repsel): count CONSUMED promotions, not selected ones (#7117)
docs(repsel): CI site-coverage assertion and changelog
test(repsel): gate per-site consumption coverage, and review follow-u…
proggeramlug commentedon Jul 31, 2026
The census's first verdict is measured and written up in #7128.
Headline for this issue specifically: the census works, and its
selected/consumedsplit (#7117/#7119) is what made the result honest.Corpus-wide
canonical-i32went 13 → 64 and from promoting in 2 of 18 realworkloads to 17 of 18 — and it changes the emitted object on 2 of them.
Without the consumed column the answer would have read "64 promotions, looks
great".
Also from that run, four instrumentation defects worth tracking here:
PERRY_CANONICAL_I32_LOCALS=0is not representation-isolating — it alsodisables all
Ptr<Shape>consumption (repsel_context_allows_ptr_shape: repsel_allows). Under that knob the census readsptr-shape7 selected /0 consumed with all six sites
NEVER FIRES.PERRY_CANONICAL_STR_LOCALS=0is not scoped toStrlocals either (it gatesnanbox_string_ref_boxed), so 24 of 26 workloads emit differently under it.__pshapeclone has zero call sites and is dead-stripped before theobject, so the 8
consumed_receiverentries count consumption insidefunctions that never ship.
Ptr<NumArray>: 6 selected, and turning it off leaves every real workloadbyte-identical.
And one that affects the census's own method: object emission is
nondeterministic on Linux (the module name embeds pid + nanotime), so
object-hash A/B is macOS-only today.
proggeramlug commentedon Aug 5, 2026
Delivered:
benchmarks/repsel_census/baseline.json,scripts/compiler_output_harness/repsel_census.py,tests/test_repsel_census.py, and arepsel-censusjob intest.ymlwith floors and sabotage checks.One follow-up remains and is tracked separately: the job is not yet in branch protection's required contexts, so it cannot turn a merge red.