Repository navigation
Commit 5add969
test(web): async-gen refetch oracle counts only answers the payload carried (#4446)
* test(web): async app generator — generated Loading/Errored/Show trees over async memos, with safety and liveness oracles
An opt-in campaign (ASYNC_GEN=1, pnpm async-gen) that generates small apps
(signals, sync and async memos with manual flights, latest()/isPending()
reads, Loading / Errored / Show / leaves with grouped or split attribute
effects) and scripts (writes, actions, settling flights in any order,
flush / microtask / task). Oracles: nothing throws or logs, no unhandled
rejection, no hole shows undefined/NaN, and once every flight has settled
the screen equals a fresh synchronous render of the final inputs. Survey,
shrink and minimize modes; the minimizer reduces the app as well as the
script.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWKJDzwaZPgaGWE181b
* test(web): async-gen equivalence pairs (grouping, identity memo, inert Errored, store twin, flush mode, owned memos)
ASYNC_GEN_PAIRS=E1,E2,E2e,E3,E6,E7 runs each scenario a second time
rewritten without changing its meaning and compares the screens at every
settle point (after the first render, each task step and the end);
differences are grouped by what each side shows. Scenarios also choose
whether memos are created at module level or inside the root component.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWKJDzwaZPgaGWE181b
* test(web): async-gen regression gate against a recorded baseline
1,500 generated scenarios (seed 3289, ~15 s) run with the web suite; each
case's safety and liveness laws are compared to baseline.json. A case that
newly breaks a law fails the suite (a change broke a neighbouring shape);
a recorded failure that no longer reproduces is reported, and
ASYNC_GEN_UPDATE=1 records it. The baseline holds today's 20 failing cases
(#4362-#4367 shapes).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWKJDzwaZPgaGWE181b
* test(web): async-gen hydration phase
Each generated scenario is emitted as a TSX module, rendered through
renderToStream (server half), then hydrated chunk by chunk (client half).
Oracles: no refetch of a read memo before the first write, no
console.error or hydration warning, hydrated screen equals a fresh CSR
render, then the scenario's steps and final liveness. Opt-in via
ASYNC_GEN_HY=1 (pnpm async-gen:hydrate); minimize-hydration.mts reduces a
failing case through both halves.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWKJDzwaZPgaGWE181b
* test(web): async-gen differential mode; fix test-types
ASYNC_GEN_RECORD on a reference build writes every case's screens, final
screen and broken laws; ASYNC_GEN_DIFF on a candidate build replays the
same seed and fails on any difference. Both the client campaign and the
hydration campaign take it: the gate for the reader-seat carve. Same-build
record/diff is clean (client 500 cases, hydration 300).
minimize-hydration.mts loads minimize.ts through a computed specifier so
tsc (no allowImportingTsExtensions) accepts it; runCase's return type
names screens/final.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWKJDzwaZPgaGWE181b
* test(web): async-gen pairs E8 (birth seat) and E9 (latest in a derive)
E8 re-creates the tree's readers in the flush that applies each write and
compares screens where nothing is in flight; E9 reads each latest(x) the
tree makes through a memo of it. Both from the carve audit's seat pairs.
First run (1,000 cases): #4377, #4378.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWKJDzwaZPgaGWE181b
* test(web): async-gen refetch oracle counts only answers the payload carried
A first ask of a memo the server never streamed is not a refetch (#4313,
#4414): the emitted app reports each memo's hydration id before creating
it, and the hydration campaign counts an ask only when the shell or a
chunk carries that id's answer. Re-run on next: the one remaining
hydration finding (m2 after an errored root) goes away; 251 of 561
memos are served and still checked.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWKJDzwaZPgaGWE181b
* test(web): quote the no-refetch rule in the hydration oracle
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWKJDzwaZPgaGWE181b
---------
Co-authored-by: Claude <[email protected]>1 parent e56a4a0 commit 5add969
2 files changed
Lines changed: 25 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | | - | |
60 | | - | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | | - | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | | - | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | 95 | | |
111 | 96 | | |
112 | 97 | | |
| |||
170 | 155 | | |
171 | 156 | | |
172 | 157 | | |
| 158 | + | |
| 159 | + | |
173 | 160 | | |
174 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
175 | 166 | | |
176 | 167 | | |
177 | 168 | | |
| |||
206 | 197 | | |
207 | 198 | | |
208 | 199 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
213 | 205 | | |
214 | 206 | | |
215 | 207 | | |
| |||
0 commit comments