Repository navigation
fix(attribution): GRAPH_GROWTH also requires what outlived each navigation to climb (#4007) - #4020
Conversation
…ation to climb (#4007) GRAPH_GROWTH compared the whole graph's size at each settle of a route pattern, so a page whose correctly owned content is bigger on each visit (/rows/1, /rows/3, /rows/5) read as a leak although leaving disposed it. While graphGrowth is on, a non-initial navigation now walks the graph as it opens and adds every node to a WeakSet; its settle's walk also counts the nodes from that set still alive (an edge when both ends are) and drops the set. A series reports only when it climbs in the totals, as before, and in that survived count. A navigation that stays on the route pattern the app is on continues the visit and is not compared. The finding's data gains `survived` beside `history`; the message shows both. Engine-only: prod artifacts byte-identical. The observe + attribution size scenario grows +230 B brotli (+594 B minified); cap raised with an audit note pending the maintainer's acceptance. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NcUAu8BQ6Xsf8XRBhr9V1w
🦋 Changeset detectedLatest commit: 4f1df5e The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size (brotli, eager entry chunk)
Bundled with Rolldown (what Vite ships), brotli q11, decimal KB. A scenario fails only when it is over its brotli cap and its minified size is more than 20 B over the minified recorded with the cap; over the cap within that allowance is brotli layout noise and passes with a warning. Caps and their recorded minified in |
Generated by Claude Code |
Coverage Report for CI Build 38440670300Coverage remained the same at 77.429%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Merging this PR will not alter performance
|
Generated by Claude Code |
Generated by Claude Code |
…-w8qjvi-4007 Resolves the attribution scenario cap conflict with #4027: keeps next's #4010 note and re-measures this PR on top of it (28,984 -> 29,230 B, cap 29.24 KB), accepted by the maintainer 2026-10-13. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NcUAu8BQ6Xsf8XRBhr9V1w
Requested by Ryan · project thread
Summary
Fixes #4007.
Before:
GRAPH_GROWTHcompared the whole graph size at each arrival on a route pattern. A page whose correctly owned content is bigger on each visit (/rows/1,/rows/3,/rows/5) was reported as a leak.After: a series reports only when it climbs both in the totals and in what outlived each navigation. Content that differs per visit stays quiet. A root, effect or signal that a visit leaves behind still reports, even when the page's content shrinks.
How (the design proposed in the issue, in
packages/signals/src/core/attribution.ts):graphGrowthis on, a non-initial navigation snapshots the live graph into aWeakSetas it opens.survived; an edge counts when both ends are), then drops the set.Public API changes
No export, option, type or diagnostic code changes. Diagnostic surface changes to review:
GRAPH_GROWTH'sdatagainssurvivedbesidehistory(additive).owners 3 → 5 → 7 (of 6 → 10 → 14).Size
Prod and the observe core are byte-identical.
The "observe tier + attribution engine" scenario grows from 28,984 to 29,230 B brotli (+246 B) and from 87,305 to 87,899 B minified (+594 B), measured against
next@ c9027a9. Its cap goes 29.00 → 29.24 KB. The Size-Exception note inscripts/size/scenarios.jsrecords the maintainer's acceptance on 2026-10-13. The cap is higher than the 29.17 KB first proposed because #4010 (#4027) used up that scenario's headroom onnext; this PR's own growth is unchanged.How did you test this change?
packages/signals/tests/attribution-graph-growth.test.ts:signalsandedges.next. All 19 in the file pass, including both fix(attribution): count GRAPH_GROWTH after a held navigation's landing commits #3994 held-arrival cases.next: 5197 / 20 / 2).08-dev-diagnostics.mdand the skill'sGRAPH_GROWTHsection updated; changeset added.🤖 Generated with Claude Code
https://claude.ai/code/session_01NcUAu8BQ6Xsf8XRBhr9V1w
Generated by Claude Code