-
-
Notifications
You must be signed in to change notification settings - Fork 6
emergent_testing: the sequential plan, and the second sharing attempt's record #1759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+841
−185
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
61f990e
emergent_testing: the browser runs the shared traversal
claude 6f0f721
changelog: name the entry by its real PR number
claude 8f86c14
Merge remote-tracking branch 'origin/main' into claude/todo-unificati…
claude 93171a7
emergent_testing: read each browser proof export exactly once
claude a1c4cd8
emergent_testing: join a walk's outcomes once, not pairwise
claude 7cd8db9
emergent_testing: follow the example for the browser catch, and recon…
claude 961e885
emergent_testing: join a walk's records as a rope, not an array
claude 1580f06
emergent_testing: drop the unused list import
claude da878ca
emergent_testing: a run that fails as a runner still reports
claude 74202d5
effects/browser: the runner keeps the effect's types
claude 3480379
effects/browser: assert through the shared helper
claude 1724d9a
Merge branch 'main' into claude/todo-unification-runners-7wvd1q
sergey-shandar 668eee0
effects/browser: an extra operation may not claim a core one
claude a98bbb8
emergent_testing: the todo says one thing about the operation list
claude cb40800
effects/browser: carry extra handlers by descriptor
claude affbc2f
effects/browser: read the extra map once
claude bb14a50
emergent_testing: record where progress rendering would belong
claude cab8ce0
effects/browser: give the thread back on a frame budget
claude d3c9ac1
Merge branch 'main' into claude/todo-unification-runners-7wvd1q
sergey-shandar 763ee3b
emergent_testing: a run starts after its promise is published
claude 69895e2
emergent_testing: the todo says one thing about browser scheduling
claude 4eb7012
effects/browser: charge every operation to the frame budget
claude 7387fb1
effects: record the argument limit on `all`
claude f6e00d2
effects: name every spread that shares the `all` ceiling
claude ac07427
effects/browser: prove the charging by ordering, not by coincidence
claude 5d14d55
Merge branch 'main' into claude/todo-unification-runners-7wvd1q
sergey-shandar 4188b18
emergent_testing: revert the sharing code, keep everything it taught
claude 80ed2d9
todo: the plan says one thing everywhere
claude 727cc73
todo: linking is before the skeleton, not a part of it
claude 15b6384
todo: the duration gap outlives the concurrency that named it
claude c12fe18
todo: one home for `all`, and loading is outside the timer
claude 7e3840c
todo: three more one-answer fixes from the requested review
claude ec31c71
todo: Await gets its policy, and the all migration names its break
claude c3183d0
todo: the sequential decision reaches the issues that link here
claude 9384320
todo: three more edges of the same decisions
claude 703cd1e
todo: two corrections and one honest application of my own test
claude 63da0e4
todo: All passes the test too, and 7b names its ordering change
claude c5f74d2
todo: two claims caught describing the reverted code as current
claude 0853658
todo: reconcile the re-export test and the tree walker with the seque…
claude ebd418a
todo: the start record is a complete line, not an open one
claude 8654c2a
todo: the port is a behavior change for the page, named as such
claude 75f5aca
DESIGN, todo: separation forbids the combination, not a fixed order
claude 6db0651
DESIGN: the workflow's 'behaviour unchanged' is as of the port
claude 36267c2
Merge branch 'main' into claude/todo-unification-runners-7wvd1q
sergey-shandar fda6231
Merge branch 'main' into claude/todo-unification-runners-7wvd1q
sergey-shandar ae5da84
todo: errorExit passes the re-export test; the code counts, not just …
claude e9f2ff5
Merge branch 'claude/todo-unification-runners-7wvd1q' of https://gith…
claude 35dd71b
Merge branch 'main' into claude/todo-unification-runners-7wvd1q
sergey-shandar 5c7ec93
todo: 7a's sequential contract needs a proof that fails when work ove…
claude 8cac4ce
Merge branch 'claude/todo-unification-runners-7wvd1q' of https://gith…
claude 2731990
todo: allVoid is born list-shaped, not migrated
claude bd4cf24
todo: name both callables so allVoid builds in every permitted branch
claude 6eeaf05
todo: allReduce is built on allOk with a parameterized error channel
claude 2aa7eba
todo: cancellation boundaries and the timing experiment follow sequen…
claude f71f6fe
todo: the re-export test runs post-move; cancellation checks precede …
claude f40d23e
todo: prove the run-failure guard in 7b, through a minimal seam
claude ee99192
todo: the browser start handler yields before the proof runs
claude 9ff8ad2
todo: the yields and the guard get ordering proofs, one per route
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| ## all-argument-limit. `all` cannot fan out more siblings than the engine allows arguments | ||
|
|
||
| **Priority:** P3 | ||
| **Status:** open | ||
|
|
||
| ### Problem | ||
|
|
||
| `All` is declared variadic — `readonly['all', <T, E>(...effects: Effect<never, T, E>[]) => …]` — so | ||
| every fan-out reaches it as a spread, and each one is a separate instance of the same | ||
| ceiling. Every site in the repository today: | ||
|
|
||
| | site | what it fans out | | ||
| |-|-| | ||
| | `emergent_testing/module.f.mjs` `walkEntries` | one module's sibling leaves | | ||
| | `emergent_testing/module.f.mjs` `runModuleMap` | the modules of a run | | ||
| | `emergent_testing/module.f.mjs` `registerModule` ×2, `registerModuleMap` | the same two, for the framework-registration path | | ||
| | `dev/module.f.mjs` ×2 | files to load, and their imports | | ||
|
|
||
| They fail independently: a suite of a hundred thousand *modules* breaks the outer spread | ||
| however few leaves each holds, and one module of a hundred thousand leaves breaks the inner | ||
| one however few modules there are. A fix has to be the operation's, not a site's. | ||
|
|
||
| A spread is a call, and a call has an argument limit. Measured on node 22: | ||
|
|
||
| | siblings | result | | ||
| |-|-| | ||
| | 50,000 | ok | | ||
| | 100,000 | `RangeError: Maximum call stack size exceeded` | | ||
|
|
||
| The throw is in **building** the effect, before any interpreter sees it, so no runner can | ||
| recover from it and no `catch` operation is in the path. Today only `fjs t` is on this | ||
| path, and it panics. (The reverted functionalscript#1759 briefly put the browser page on | ||
| it too, where the page's run-failure guard reported one `infrastructure-error` — the guard | ||
| working as intended, but not an answer; the current page takes the `Promise.all` path | ||
| below and never builds the effect.) | ||
|
|
||
| The ceiling applies **per fan-out**, and a run has two: one module with too many sibling | ||
| leaves breaks the inner spread, and a run with too many *modules* breaks the outer one in | ||
| `runModuleMap` — the independence the table above states. Nothing in this repository is | ||
| close to either — the browser suite is 3,461 leaves across 138 modules, three orders of | ||
| magnitude under both — so this is a real ceiling rather than a live problem, and it is | ||
| recorded rather than fixed for that reason. | ||
|
|
||
| The browser runner is immune for a reason that has nothing to do with its batching: | ||
| `Promise.all(batch.map(…))` passes one iterable argument, so no spread exists there at any | ||
| batch size — the ceiling is the *variadic operation's*, not fan-out's in general. (An | ||
| earlier version of this paragraph credited `batchSize = 25` with staying under the limit; | ||
| that was a misattribution, corrected in the pitfall catalog in | ||
| [share-browser-console-runner](../../emergent_testing/todo/share-browser-console-runner.md).) | ||
| The reverted functionalscript#1759 routed the page through the shared traversal and so | ||
| briefly gave both runners the same ceiling; the sequential plan that replaced it removes | ||
| the traversal's fan-outs entirely, which retires the `walkEntries` and `runModuleMap` rows | ||
| above. What remains then is the registration path and `dev` — still the operation's | ||
| problem, at fewer sites. | ||
|
|
||
| ### Proposal | ||
|
|
||
| Make `all` take a list rather than an argument list: | ||
|
|
||
| ```ts | ||
| export type All = readonly['all', <T, E>(effects: readonly Effect<never, T, E>[]) => OpResult<readonly Result<T, E>[]>] | ||
| ``` | ||
|
|
||
| Then `allOk(entries.map(one))` builds an array and hands it over, and no call in the path | ||
| grows with the suite. Every `all` handler changes shape — `effects/node`'s real and | ||
| virtual runners, the mock, and any fixture that supplies one — which is what makes this | ||
| its own step rather than a fix inside another change. Not a browser interpreter: under | ||
| the sequential plan the traversal performs no `all`, so no browser implements it. | ||
|
|
||
| The variadic spelling is nicer at the two-or-three-effect call sites that motivated it | ||
| (`both`, hand-written fan-outs in proofs), so a wrapper that keeps that shape over the | ||
| list-shaped operation is worth having in the same change. **Both callables get | ||
| unambiguous names, whichever branch is taken**: if the wrapper is kept it keeps | ||
| the published `all`/`allOk` names (that is what narrows the break, per the task | ||
| below) and the list-shaped operation is exported beside it under its own names | ||
| (say `allList`/`allOkList`); if the wrapper is dropped, the list shape takes | ||
| the old names. Every arbitrary-length fan-out — the traversal sites in the | ||
| table, and combinators born after this issue | ||
| ([allvoid-combinator](./allvoid-combinator.md), | ||
| [allreduce-combinator](./allreduce-combinator.md)) — calls the *list-shaped* | ||
| callable by whichever name this decision lands on, so those designs are | ||
| buildable under every permitted outcome. | ||
|
|
||
| ### Alternatives considered | ||
|
|
||
| - **Chunk the traversal.** Fan out in groups below the limit. This puts a constant back | ||
| into the shared walk, which is the mistake | ||
| [share-browser-console-runner](../../emergent_testing/todo/share-browser-console-runner.md) | ||
| spends several pages on, and it changes the concurrency of every run to work around an | ||
| argument-passing detail. No. | ||
| - **Leave it.** Defensible today, and what this issue does for now. It stops being | ||
| defensible the first time a generated suite puts tens of thousands of leaves in one | ||
| module. | ||
|
|
||
| ### Tasks | ||
|
|
||
| - [ ] Decide the list-shaped `All` signature and whether a variadic wrapper stays. | ||
| **Either way this is breaking, and the entry must say so.** Changing the | ||
| *operation* breaks every `all` handler however it is spelled at call | ||
| sites; dropping the wrapper additionally changes the published | ||
| `all`/`allOk` call shape, which reaches every fixed-arity caller | ||
| (`both`, hand-written fan-outs in proofs) and any external importer — | ||
| so the PR migrates every in-repo caller in the same change and carries | ||
| a `**BREAKING CHANGES:**` changelog entry naming what moved. Keeping | ||
| the wrapper narrows the break to the handlers, which is the argument | ||
| for keeping it. | ||
| - [ ] Move every interpreter and fixture to it in one change, and every spread site in the | ||
| table above with them. Future combinators scheduled after this issue are | ||
| consumers too, born list-shaped rather than migrated: | ||
| [allvoid-combinator](./allvoid-combinator.md) and | ||
| [allreduce-combinator](./allreduce-combinator.md) both say so in their | ||
| proposals — an arbitrary-length fan-out combinator with a spread in its | ||
| body would rebuild this ceiling inside itself. | ||
| - [ ] Prove a fan-out above the current ceiling — the number itself is engine-specific, so | ||
| the proof asserts that a large fan-out completes rather than asserting the ceiling. | ||
|
|
||
| ### Related | ||
|
|
||
| - [share-browser-console-runner](../../emergent_testing/todo/share-browser-console-runner.md) | ||
| — where the browser's accidental protection was removed, and why. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.