Skip to content

Commit c2d7903

Browse files
ryansolidClaude via Cursorcursoragent
committed
chore(size): re-measure the lane-authority stack against next
Floor 21,994 -> 22,457 (+463 B; budget 22,500) and the scenario caps re-stated against next @ 4935c7d rather than the #3337 stack the notes were written on: core 8188 -> 8369, createStore 15012 -> 15318, isPending/latest 10253 -> 10667, hydrating + stores 27608 -> 28208. Co-authored-by: Claude via Cursor <[email protected]> Co-authored-by: Cursor <[email protected]>
1 parent 356a229 commit c2d7903

2 files changed

Lines changed: 65 additions & 43 deletions

File tree

‎packages/signals/tests/treeshake.test.ts‎

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,13 @@ describe("pay-for-use tree-shaking (#2883)", () => {
173173
// to where lanes live (optimistic.ts ORs LANE_RUN into the run `type`,
174174
// as does effect()'s creation-time immediate run). contestEffect inlined
175175
// into its single call site in recompute. Measured at 21,890 post-change.
176-
// CONSCIOUS BUMP (2026-09-10): +~160B for the lane-authority fixes
177-
// (#3335, #3334, #3331, #3330). Reveal-hold: read()'s pending branch
176+
// (`next` @ 4935c7dd measures 21,994 after #3350/#3351.)
177+
//
178+
// CONSCIOUS BUMP (2026-09-11, lane authority on `next`): +463 B over
179+
// `next`'s 21,994 for the lane-authority fixes (#3335, #3334, #3331,
180+
// #3330, the A15 re-rule; ported from #3347, which sat on #3337's A28
181+
// write path — here the landing branch dispatches eagerly, as `next`
182+
// does). Reveal-hold: read()'s pending branch
178183
// drops the stale/foreign-transaction carve-out (-), asyncWrite's
179184
// settleTransition routes a lane-owned landing to the waiting transaction
180185
// (waitingTransition, which laneHeld shares). Override supersession: the
@@ -196,22 +201,20 @@ describe("pay-for-use tree-shaking (#2883)", () => {
196201
// CONFIG_OPTIMISTIC dispatch gains the authoritative-write case — an
197202
// override test plus one engine hook call (`_landOnOverride`, one
198203
// GlobalQueue slot); the landing itself (staging, companions,
199-
// supersession) lives in optimistic.ts and shakes out (+15 B). The
204+
// supersession) lives in optimistic.ts and shakes out. The
200205
// stale-reader term of read()'s three value selections becomes
201206
// `heldFromStale`: a reader served the committed value of a node another
202207
// live transaction staged is recorded for that transaction's commit
203208
// replay unless the transaction computed it — the commit is silent, and
204209
// a reader that linked after the staging walk otherwise never learns of
205-
// the reveal (+111 B; the record is core-retained because the read
206-
// visibility seam is). A settle that reverts optimism re-derives its
207-
// contested effects (#3322) after the revert, not ahead of the heap run
208-
// (~+40 B, finalizePureQueue): between commitPendingNodes and
209-
// _resolveOptimistic the truth is committed but the overrides still
210-
// display, and a re-derive there composed the two (the #3164 tear —
211-
// surfaced by deep() over an optimistic store whose held adoption was
212-
// eagerly visible to the committing transaction's own readers). Measured
213-
// at 22,638.
214-
// CONSCIOUS BUMP (2026-09-10, review on #3347): +99 B. The reveal
210+
// the reveal (the record is core-retained because the read visibility
211+
// seam is). A settle that reverts optimism re-derives its contested
212+
// effects (#3322) after the revert, not ahead of the heap run
213+
// (finalizePureQueue): between commitPendingNodes and _resolveOptimistic
214+
// the truth is committed but the overrides still display, and a
215+
// re-derive there composed the two (the #3164 tear — surfaced by deep()
216+
// over an optimistic store whose held adoption was eagerly visible to
217+
// the committing transaction's own readers). A15 re-rule: the reveal
215218
// carve-out returns, gated on input visibility (A15 reveal corollary,
216219
// re-ruled): read()'s pending branch tests three node bits
217220
// (uninitialized, CONFIG_INPUTS_PUBLISHED, CONFIG_HAS_LANE → one engine
@@ -220,9 +223,10 @@ describe("pay-for-use tree-shaking (#2883)", () => {
220223
// a still-pending node's inputs published, notifyStatus clears the mark
221224
// on a fresh flight; recompute drops an effect's stale replay recording
222225
// when it recomputes under the recording transaction (one Set.delete).
223-
// The lane predicate itself (`resolveLane`) shakes out. Measured at
224-
// 22,737; 13 bytes of headroom.
225-
expect(minifiedBytes).toBeLessThan(22_750);
226+
// The lane predicate itself (`resolveLane`) shakes out. On the #3337
227+
// stack the same fixes measured +485 B (22,381 -> 22,866). Measured at
228+
// 22,457; 43 bytes of headroom.
229+
expect(minifiedBytes).toBeLessThan(22_500);
226230
});
227231

228232
it("plain stores shed the verdict layer, affects, boundaries, and map", async () => {

‎scripts/size/.size-limit.js‎

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,10 @@ module.exports = [
169169
// unobserved sweep drops now leaves the chain in O(1) instead of being
170170
// retained (with its last value) for the projection's lifetime.
171171
//
172-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 8.29 ->
173-
// 8.51 KB, measured at 8482 B. Core-retained seams of the lane fixes:
172+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
173+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 8.19 -> 8.37 KB, measured at
174+
// 8369 B against `next`'s 8188 (+181 B). Core-retained seams of the lane
175+
// fixes:
174176
// read()'s override arm (superseded-node selection hook), the reveal
175177
// carve-out gated on input visibility (three bit tests, one lane hook,
176178
// `heldFromStale` recording late readers for the commit replay),
@@ -183,7 +185,7 @@ module.exports = [
183185
// comparison, lane demotion, replay gating, the landing) lives in
184186
// optimistic.ts and shakes out of this floor. In-package floor 22,252 ->
185187
// 22,737.
186-
limit: "8.51 KB",
188+
limit: "8.40 KB",
187189
modifyEsbuildConfig
188190
},
189191
{
@@ -382,14 +384,16 @@ module.exports = [
382384
// lookup helper, the stamp filter in the ownKeys trap / snapshot /
383385
// membership diff / key walks, and the trap guards. 340 -> ~178 ns.
384386
//
385-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 14.91 ->
386-
// 15.29 KB, measured at 15262 B. The core seams (see the core floor note)
387+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
388+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 15.01 -> 15.32 KB, measured
389+
// at 15318 B against `next`'s 15012 (+306 B). The core seams (see the
390+
// core floor note)
387391
// plus the store twins: held adoption under a live transaction on
388392
// optimistic families (`heldMaskView`, `stageHeldAdoptions`),
389393
// `notifyOptimisticWrites` judging against the view readers see, and
390394
// the authoritative landing on an override-covered node dispatching to
391395
// the engine.
392-
limit: "15.42 KB",
396+
limit: "15.35 KB",
393397
modifyEsbuildConfig
394398
},
395399
{
@@ -474,15 +478,17 @@ module.exports = [
474478
// Firewall child chain doubly linked (#3351, 2026-09-10): 10.27 -> 10.32 KB,
475479
// measured at 10.272. Core cost; see the core-floor note.
476480
//
477-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 10.40 ->
478-
// 10.85 KB, measured at 10822 B. The core seams (see the core floor note)
481+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
482+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 10.25 -> 10.67 KB, measured
483+
// at 10667 B against `next`'s 10253 (+414 B). The core seams (see the
484+
// core floor note)
479485
// plus the engine they dispatch to, which this scenario retains:
480486
// override supersession with action provenance (`supersedeOverride`,
481487
// `supersededRead`, the same-value stamp renewal), the authoritative
482488
// store landing (`landOnOverride`), the per-node merged-lane hold
483489
// (`laneHeld` over `waitingTransition`), `laneLive`, and the
484490
// lane-routed settle entering the waiting transaction.
485-
limit: "10.85 KB",
491+
limit: "10.70 KB",
486492
modifyEsbuildConfig
487493
},
488494
{
@@ -551,10 +557,12 @@ module.exports = [
551557
// scenarios both shrank on the same build, so the +29 B here is brotli
552558
// layout drift, not retained code.
553559
//
554-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 11.05 ->
555-
// 11.27 KB, measured at 11242 B — the core seams (see the core floor note)
560+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
561+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 10.92 -> 11.12 KB, measured
562+
// at 11121 B against `next`'s 10924 (+197 B) — the core seams (see the
563+
// core floor note)
556564
// and, where the app retains lanes, the engine they dispatch to.
557-
limit: "11.27 KB",
565+
limit: "11.15 KB",
558566
modifyEsbuildConfig
559567
},
560568
{
@@ -637,10 +645,12 @@ module.exports = [
637645
// plus a 65-compare pre-probe in updateKeyedMap; identity-keyed mode
638646
// only. Lands in every scenario that bundles <For>.
639647
//
640-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 18.42 ->
641-
// 18.65 KB, measured at 18628 B — the core seams (see the core floor note)
648+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
649+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 18.30 -> 18.53 KB, measured
650+
// at 18529 B against `next`'s 18295 (+234 B) — the core seams (see the
651+
// core floor note)
642652
// and, where the app retains lanes, the engine they dispatch to.
643-
limit: "18.65 KB",
653+
limit: "18.56 KB",
644654
modifyEsbuildConfig
645655
},
646656
{
@@ -760,14 +770,16 @@ module.exports = [
760770
// Ownership stamp (#3360 part two, 2026-09-10): 27.57 -> 27.66 KB,
761771
// measured at 27.608 (was 27.518). The createStore arm; see that note.
762772
//
763-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 27.56 ->
764-
// 28.16 KB, measured at 28138 B. The core seams (see the core floor note)
773+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
774+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 27.61 -> 28.21 KB, measured
775+
// at 28208 B against `next`'s 27608 (+600 B). The core seams (see the
776+
// core floor note)
765777
// plus the store twins: held adoption under a live transaction on
766778
// optimistic families (`heldMaskView`, `stageHeldAdoptions`),
767779
// `notifyOptimisticWrites` judging against the view readers see, and
768780
// the authoritative landing on an override-covered node dispatching to
769781
// the engine.
770-
limit: "28.16 KB",
782+
limit: "28.24 KB",
771783
modifyEsbuildConfig
772784
},
773785
{
@@ -821,10 +833,12 @@ module.exports = [
821833
// 13.75 KB, measured at 13.70 on the rebased tree (+630 B over 13.07).
822834
// See the hydrating (no stores) note; same cost, every <For> scenario.
823835
//
824-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 13.84 ->
825-
// 14.03 KB, measured at 14009 B — the core seams (see the core floor note)
836+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
837+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 13.74 -> 13.92 KB, measured
838+
// at 13921 B against `next`'s 13738 (+183 B) — the core seams (see the
839+
// core floor note)
826840
// and, where the app retains lanes, the engine they dispatch to.
827-
limit: "14.03 KB",
841+
limit: "13.95 KB",
828842
modifyEsbuildConfig
829843
},
830844
{
@@ -874,10 +888,12 @@ module.exports = [
874888
// chunks, and the new name compresses worse. Mangler noise, not cost —
875889
// the pre-mangle bundle is byte-identical.
876890
//
877-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 15.23 ->
878-
// 15.49 KB, measured at 15461 B — the core seams (see the core floor note)
891+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
892+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 15.04 -> 15.27 KB, measured
893+
// at 15269 B against `next`'s 15037 (+232 B) — the core seams (see the
894+
// core floor note)
879895
// and, where the app retains lanes, the engine they dispatch to.
880-
limit: "15.49 KB",
896+
limit: "15.30 KB",
881897
modifyEsbuildConfig: observeEsbuildConfig
882898
},
883899
{
@@ -947,10 +963,12 @@ module.exports = [
947963
// a one-call swap that dropped a flag test; the CSR observe scenario on
948964
// the same artifacts did not move, so this is brotli layout drift.
949965
//
950-
// Lane authority (#3335, #3334, #3330, #3331; #3347, 2026-09-10): 26.75 ->
951-
// 26.99 KB, measured at 26968 B — the core seams (see the core floor note)
966+
// Lane authority (#3335, #3334, #3330, #3331, A15 re-rule; ported from
967+
// #3347 onto `next` @ 4935c7dd, 2026-09-11): 26.65 -> 26.82 KB, measured
968+
// at 26819 B against `next`'s 26652 (+167 B) — the core seams (see the
969+
// core floor note)
952970
// and, where the app retains lanes, the engine they dispatch to.
953-
limit: "26.99 KB",
971+
limit: "26.85 KB",
954972
modifyEsbuildConfig: observeEsbuildConfig
955973
},
956974
{

0 commit comments

Comments
 (0)