|
4 | 4 | * Action 1 is accepted and its `refresh(issues)` is in flight when action 2 |
5 | 5 | * guesses into the same log. |
6 | 6 | * |
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. |
14 | 14 | * |
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 |
18 | 18 | * staging of that frame, not as the lane's derivation; the lane's re-derive |
19 | 19 | * then wrote an equal value, which staged nothing, and the screen kept the |
20 | 20 | * committed `dana` until the frame landed. An adoption's leaf write in a lane |
@@ -106,34 +106,46 @@ function run(proj: boolean) { |
106 | 106 | } |
107 | 107 |
|
108 | 108 | 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]", |
133 | 144 | "[#3 guest][#4 guest]", |
134 | 145 | "[#3 guest][#4 guest]" |
135 | 146 | ]); |
136 | 147 | }); |
| 148 | + } |
137 | 149 |
|
138 | 150 | it("through a keyed projection: a rejected second action reverts its row", async () => { |
139 | 151 | const t = run(true); |
|
0 commit comments