Skip to content

Commit a7b19f7

Browse files
committed
test(signals): pin #4629 frame (4) as a D-26 known deviation
The second guess should show at once beside the screen's issues (a plain read in lane work of a parent-held node is the screen's value, D-26); today it waits for action 1's re-ask. Pinned it.fails with a D-26 status note. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0117BoWNSSgtemsSYsaX2hXE
1 parent f21241d commit a7b19f7

3 files changed

Lines changed: 48 additions & 36 deletions

File tree

‎packages/signals/docs/RULES-DERIVED.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ What is rendered from a display-ahead read reveals together with it: an async me
216216

217217
A held display-ahead world ("a lane") is a hold seen from the outside. A render effect _off_ it that reads what it is revealing — mounted mid-hold, or re-run by an unrelated sync write — shows the committed value (what is on screen), publishes now, entangles nothing, and re-derives at the release: `Late: 0` at the mount, `Details: 1 | Late: 1 | Value: 1` at the release. `latest()` is not special here: a `createOptimistic` source behaves the same. A reader whose removal is staged in a live hold is still on screen and keeps holding the lane while visible; `latest()` read in such a branch peers through to the proposal. A direct leaf reading a lane's derivation shows the lane's revealed value and re-derives at the reveal (control and content never disagree); a derivation between (a memo, a boundary's tree) carries the future and is born held with its mount (D-2). The same holds for a render effect that reads an optimistic value before its lane is judged: if the lane holds on a derivation's flight, the effect shows the committed value and `latest()` of the guess shows the guess beside it, whether the two reads share one render effect or not — `1 x1 / 5`, then `5 x5 / 5` at the landing (#4284). **Inside the lane, "sees the parent's landings" is about computing, not showing (clarified 2026-10-28):** a lane derivation that reads a value the parent holds joins that hold (D-1) — it computes now, so async downstream of it starts without waiting for the commit, and its result shows at the commit as the hold's work. What lane work _displays_ is the screen plus the lane's own values: its guesses, or what its `latest()` reads asked for. A plain read in lane work of a node the parent holds and the lane does not show ahead is the screen's value, in a verdict lane as in an optimistic one (F-6: "a plain read beside it is a read"); `[s(), L()]` with `L = createMemo(() => latest(s))` shows `v:0 l:1`, as the inline `[s(), latest(s)]` does. A15 #3460's sentence is the computing half.
218218

219-
**Collapses:** [A15](./SPEC-ASYNC-SEMANTICS.md#a15-transition-entanglement-is-graph-driven-lanes-settle-as-one-reveal) lanes corollary (#3460, #3463, #3479, #3662, #3698), #3444, the fuzzer-finding F8 ruling (2026-10-05, #3806), the adopted-staging ruling. **Status:** standing; fuzzer finding F5b ("a stale reader of a held re-guess shows the revealed guess") pinned `it.fails`. Grouping: `tests/lane-render-effect-grouping-4284.test.ts`.
219+
**Collapses:** [A15](./SPEC-ASYNC-SEMANTICS.md#a15-transition-entanglement-is-graph-driven-lanes-settle-as-one-reveal) lanes corollary (#3460, #3463, #3479, #3662, #3698), #3444, the fuzzer-finding F8 ruling (2026-10-05, #3806), the adopted-staging ruling. **Status:** standing; fuzzer finding F5b ("a stale reader of a held re-guess shows the revealed guess") pinned `it.fails`. Grouping: `tests/lane-render-effect-grouping-4284.test.ts`. Known deviation (#4629, 2026-11-02): a second action's guess into a slot whose earlier action's `refresh()` is in flight waits for that re-ask to land instead of showing now beside the screen's value of the re-asked node (the plain read in lane work above); pinned `it.fails` in `tests/projection-second-guess-4629.test.ts`.
220220

221221
### D-27. A verdict reader's mount is a mainline mount
222222

‎packages/signals/docs/RULES-INDEX.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul
5959
| A12 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:199` | — | createOptimistic.test.ts×2 spec-async-semantics.test.ts×1 | [ruled, amended in place] Resting optimistic nodes report pending like a plain memo — A resting optimistic node reports pending via exactly the causes a plain async memo does (A19) — a reverting optim… |
6060
| A13 | ruled | `docs/SPEC-ASYNC-SEMANTICS.md:207` | — | spec-async-semantics.test.ts×7 | [ruled 2026-07-06 (promoted from B1)] Resting optimistic ≡ plain async memo at every checkpoint — (was B1) A resting optimistic node (no active override) is observationally identical to a plain async … |
6161
| A14 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:215` | — | spec-async-semantics.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B2)] Companion nodes get child lanes that do not merge with the owner — (was B2) `isPending`/`latest` companion nodes get child lanes that do not mer… |
62-
| A15 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:251` | async.ts×2 constants.ts×1 core.ts×4 effect.ts×1 lanes.ts×6 scheduler.ts×16 seat.ts×1 verdict.ts×4 store.ts×1 | async-chain-supersession.test.ts×1 boundary-output-frame-reader.test.ts×1 create-deferred-3710.test.ts×2 first-observer-stale-reader.test.ts×1 fuzz-findings-l2.test.ts×17 held-restore.test.ts×1 hold-recovers-landing-reruns-4469.test.ts×1 l2-contract.test.ts×7 l2-fuzz-existing-rules.test.ts×2 lane-contract.test.ts×1 lane-hold-on-observation.test.ts×1 lane-outside-view.test.ts×1 lane-pass-stamped-effect-3662.test.ts×1 latest-memo-inline-parity.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×1 loading-fallback-in-flush-3540.test.ts×4 mount-over-foreign-hold-3761.test.ts×2 overlapping-flights.test.ts×3 posture-born-held-and-observation.test.ts×4 posture-store-parity.test.ts×2 projection-second-guess-4629.test.ts×1 reveal-carve-out.test.ts×2 shared-effect-no-entangle.test.ts×1 show-stale-child-in-action-4137.test.ts×1 spec-async-semantics.test.ts×2 stale-read-uninitialized-cross-transition.test.ts×1 superseded-source-blocks-3462.test.ts×2 tick-scoped-pass-transaction.test.ts×1 tracked-effect-staged-dep-4606-4607.test.ts×1 treeshake.test.ts×4 unread-derive-midflight-mount-4491.test.ts×1 verdict-memo-flight-no-reask.test.ts×1 verdict-memo-held-branch-4544.test.ts×1 verdict-shortcut-pending-source-liveness.test.ts×1 visibility-oracle-store.states.ts×6 visibility-oracle.states.ts×7 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B3)] Transition entanglement is graph-driven; lanes settle as one reveal — (was B3) Transition entanglement is graph-driven: writes whose async work … |
62+
| A15 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:251` | async.ts×2 constants.ts×1 core.ts×4 effect.ts×1 lanes.ts×6 scheduler.ts×16 seat.ts×1 verdict.ts×4 store.ts×1 | async-chain-supersession.test.ts×1 boundary-output-frame-reader.test.ts×1 create-deferred-3710.test.ts×2 first-observer-stale-reader.test.ts×1 fuzz-findings-l2.test.ts×17 held-restore.test.ts×1 hold-recovers-landing-reruns-4469.test.ts×1 l2-contract.test.ts×7 l2-fuzz-existing-rules.test.ts×2 lane-contract.test.ts×1 lane-hold-on-observation.test.ts×1 lane-outside-view.test.ts×1 lane-pass-stamped-effect-3662.test.ts×1 latest-memo-inline-parity.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×1 loading-fallback-in-flush-3540.test.ts×4 mount-over-foreign-hold-3761.test.ts×2 overlapping-flights.test.ts×3 posture-born-held-and-observation.test.ts×4 posture-store-parity.test.ts×2 reveal-carve-out.test.ts×2 shared-effect-no-entangle.test.ts×1 show-stale-child-in-action-4137.test.ts×1 spec-async-semantics.test.ts×2 stale-read-uninitialized-cross-transition.test.ts×1 superseded-source-blocks-3462.test.ts×2 tick-scoped-pass-transaction.test.ts×1 tracked-effect-staged-dep-4606-4607.test.ts×1 treeshake.test.ts×4 unread-derive-midflight-mount-4491.test.ts×1 verdict-memo-flight-no-reask.test.ts×1 verdict-memo-held-branch-4544.test.ts×1 verdict-shortcut-pending-source-liveness.test.ts×1 visibility-oracle-store.states.ts×6 visibility-oracle.states.ts×7 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B3)] Transition entanglement is graph-driven; lanes settle as one reveal — (was B3) Transition entanglement is graph-driven: writes whose async work … |
6363
| A16 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:223` | scheduler.ts×1 | caught-reactive-read-diagnostic.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×2 spec-async-semantics.test.ts×1 strict-read-pending-store.test.ts×2 uninitialized-visibility.test.ts×1 visibility-oracle-store.states.ts×2 visibility-oracle.states.ts×2 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B5)] `isPending` never throws in untracked contexts — (was B5) `isPending` never throws in untracked contexts — thunks that throw real errors or read… |
6464
| A17 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:71` | async.ts×3 constants.ts×1 lanes.ts×7 scheduler.ts×2 seat.ts×1 verdict.ts×1 map.ts×1 optimistic.ts×1 store.ts×3 | create-deferred-3710.test.ts×1 fuzz-findings-l2.test.ts×6 lane-uninitialized-landing-3648.test.ts×5 optimistic-over-held-row-3796.test.ts×1 optimistic-read-lane-not-transaction-3698.test.ts×2 optimistic-undefined-override.test.ts×1 posture-store-parity.test.ts×1 refresh-await.test.ts×1 reveal-gating-contract.test.ts×3 spec-async-semantics.test.ts×10 createOptimisticStore.test.ts×2 kanban-a17-fixture.test.ts×3 optimistic-list-mutation-matrix.test.ts×1 optimistic-maparray-index-frame-f1.test.ts×1 optimistic-untracked-reads-f3-f5.test.ts×1 signal-store-twins-qd.test.ts×1 treeshake.test.ts×1 until.test.ts×1 visibility-oracle-store.states.ts×24 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×20 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from C4)] An active override is the displayed value until its transaction commits, and the graph's value until its own source answers — **Statement (curre… |
6565
| A18 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:81` | action.ts×1 async.ts×2 core.ts×3 lanes.ts×8 scheduler.ts×2 types.ts×1 verdict.ts×1 map.ts×1 optimistic.ts×1 projection.ts×1 | body-end-supersession-visibility.test.ts×4 createOptimistic.test.ts×3 l2-fuzz-existing-rules.test.ts×2 lane-contract.test.ts×1 lane-frame-deferred-run-3662.test.ts×1 lane-outside-view.test.ts×1 lane-uninitialized-landing-3648.test.ts×5 optimistic-move-duplicate-3548.test.ts×2 optimistic-read-lane-not-transaction-3698.test.ts×4 posture-store-parity.test.ts×5 spec-async-semantics.test.ts×5 flight-owned-transaction.test.ts×1 lane-authority-twins.test.ts×1 optimistic-list-mutation-matrix.test.ts×1 optimistic-untracked-reads-f3-f5.test.ts×1 signal-store-twins-qd.test.ts×1 unchanged-presence-no-hold-3743.test.ts×2 superseded-before-first-commit.test.ts×4 visibility-oracle-store.states.ts×8 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×19 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-07 (promoted from B4)] An override lives exactly as long as its own transaction; a newer truth from the source supersedes it in the graph immediately, on screen at com… |

‎packages/signals/tests/projection-second-guess-4629.test.ts‎

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
* Action 1 is accepted and its `refresh(issues)` is in flight when action 2
55
* guesses into the same log.
66
*
7-
* The overlay's lane pass reads `issues`, which action 1's re-ask holds: a
8-
* lane's derivation that hits async holds the lane (F-6: "async derived from
9-
* a display-ahead read opens a hold of its own, in that lane"; F-1/F-2 apply
10-
* inside it), and the two guesses share one slot, so their lanes reveal as
11-
* one (D-33, A15 lanes corollary). So action 2's guess waits for action 1's
12-
* re-ask to land, then shows — `[#4 dana]` at (4), `[#4 guest]` at (5) —
13-
* and holds until its own action is answered (F-11).
7+
* (4) The overlay's lane pass reads `issues`, which action 1's re-ask holds.
8+
* `issues` is not derived from the guess, so F-6's lane hold does not apply:
9+
* a plain read in lane work of a node the parent holds is the screen's value
10+
* (D-26, clarified 2026-10-28), and the lane displays the screen plus its own
11+
* guesses — `[#4 guest]` now, in both shapes. Today both shapes hold the
12+
* guess until action 1's re-ask lands (`[#4 dana]`): a known deviation,
13+
* pinned `it.fails` below.
1414
*
15-
* Through the projection the guess never showed before the server's answer:
16-
* the derive's pass that ran as the landing's (the frame's) work and was
17-
* judged leaked wrote the row's leaf through the reconcile channel as a
15+
* (5) Through the projection the guess never showed before the server's
16+
* answer: the derive's pass that ran as the landing's (the frame's) work and
17+
* was judged leaked wrote the row's leaf through the reconcile channel as a
1818
* staging of that frame, not as the lane's derivation; the lane's re-derive
1919
* then wrote an equal value, which staged nothing, and the screen kept the
2020
* committed `dana` until the frame landed. An adoption's leaf write in a lane
@@ -106,34 +106,46 @@ function run(proj: boolean) {
106106
}
107107

108108
describe("#4629: a second guess into a log while the first action's refresh is in flight", () => {
109-
for (const proj of [false, true])
110-
it(proj ? "through a keyed projection" : "through the overlay memo", async () => {
111-
const t = run(proj);
112-
flush();
113-
await tick();
114-
await t.settle("issues", t.snap());
115-
expect(t.screen).toBe("[#3 -][#4 dana]");
116-
t.assign(3);
117-
await tick();
118-
expect(t.screen).toBe("[#3 guest][#4 dana]");
119-
t.server[0].a = "guest";
120-
await t.settle("assign:3", {});
121-
// action 1's refresh(issues) is in flight
122-
t.assign(4);
123-
await tick();
124-
const f4 = t.screen;
125-
await t.settle("issues", t.snap());
126-
const f5 = t.screen;
127-
t.server[1].a = "guest";
128-
await t.settle("assign:4", {});
129-
await t.settle("issues", t.snap());
130-
const f6 = t.screen;
131-
expect([f4, f5, f6]).toEqual([
132-
"[#3 guest][#4 dana]",
109+
const frames = async (proj: boolean) => {
110+
const t = run(proj);
111+
flush();
112+
await tick();
113+
await t.settle("issues", t.snap());
114+
expect(t.screen).toBe("[#3 -][#4 dana]");
115+
t.assign(3);
116+
await tick();
117+
expect(t.screen).toBe("[#3 guest][#4 dana]");
118+
t.server[0].a = "guest";
119+
await t.settle("assign:3", {});
120+
// action 1's refresh(issues) is in flight
121+
t.assign(4);
122+
await tick();
123+
const f4 = t.screen;
124+
await t.settle("issues", t.snap());
125+
const f5 = t.screen;
126+
t.server[1].a = "guest";
127+
await t.settle("assign:4", {});
128+
await t.settle("issues", t.snap());
129+
const f6 = t.screen;
130+
return [f4, f5, f6];
131+
};
132+
133+
for (const proj of [false, true]) {
134+
const name = proj ? "through a keyed projection" : "through the overlay memo";
135+
it(`${name}: the guess shows once action 1's re-ask lands`, async () => {
136+
const [, f5, f6] = await frames(proj);
137+
expect([f5, f6]).toEqual(["[#3 guest][#4 guest]", "[#3 guest][#4 guest]"]);
138+
});
139+
140+
// Known deviation (D-26): the guess waits on action 1's re-ask.
141+
it.fails(`${name}: the guess shows at once, beside the screen's issues (D-26)`, async () => {
142+
expect(await frames(proj)).toEqual([
143+
"[#3 guest][#4 guest]",
133144
"[#3 guest][#4 guest]",
134145
"[#3 guest][#4 guest]"
135146
]);
136147
});
148+
}
137149

138150
it("through a keyed projection: a rejected second action reverts its row", async () => {
139151
const t = run(true);

0 commit comments

Comments
 (0)