Skip to content

Commit a59f92f

Browse files
committed
docs(objectql): name the row whose value actually survives the divergence blind spot
The new module's "What is NOT covered" paragraph said the residue applies "the first row's value to every matched row", and the residue pin's own title said "row 1's value". Both are contradicted by the assertions directly beneath them: per-row rewrites accumulate onto ONE payload in dispatch order, so the LAST assignment to a key is what the single SET clause carries. The pins already measure it — `bulk-write-per-row-hooks.test.ts`'s D3 case reads `['stamped-2','stamped-2']`, and the residue pin reads `low` on the row whose own dispatch derived `high`. Prose only; no behaviour, no assertion and no exported symbol changes. The ruling's verbatim quotation is untouched — the correction is stated beside it, naming what the ruling said and what the engine does, because a docblock that names the wrong row sends the next author hunting for a per-row seam that does not exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
1 parent 1bac457 commit a59f92f

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

packages/objectql/src/multi-update-hook-key-divergence.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ describe('[#14099] a row-invariant rewrite is never refused, however its values
333333
* ──────────────────────────────────────────────────────────────────────────── */
334334

335335
describe('[#14099] same key + per-row VALUES still passes — D3’s declared cost', () => {
336-
it('a per-row derived value is NOT refused, and row 1’s value reaches every row', async () => {
336+
it('a per-row derived value is NOT refused, and the LAST dispatch’s value reaches every row', async () => {
337337
// ⚠️ This is the ruling's named blind spot, pinned so it cannot change by
338338
// accident in either direction. It is filed as its own finding with a
339339
// measured instance; ⛔ it is NOT widened into this card, and ⛔ the fix is

packages/objectql/src/multi-update-hook-key-divergence.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,20 @@
6060
* ## What is NOT covered, named rather than hidden
6161
*
6262
* A hook that writes the SAME key on every row but with per-row VALUES (a
63-
* per-row derived priority, say) passes this test and still applies the first
64-
* row's value to every matched row. That is D3's cost by design; the ruling
65-
* carries it openly and points at the prescription below as the exit. This
66-
* module does not widen to cover it, and a future author reaching for a value
67-
* comparison to close it must re-read the two measurements above first.
63+
* per-row derived priority, say) passes this test and still applies ONE row's
64+
* value to every matched row. The ruling's own sentence says "the first row's
65+
* value"; the engine's MEASURED behaviour is the LAST dispatch's, because the
66+
* per-row rewrites accumulate onto one payload in dispatch order and the last
67+
* assignment to a key is what the single `SET` clause carries. Pinned in both
68+
* suites — `bulk-write-per-row-hooks.test.ts`'s D3 case reads
69+
* `['stamped-2','stamped-2']`, and this module's own residue pin reads `low`
70+
* on the row whose own dispatch derived `high`. Which row wins changes nothing
71+
* about the ruling's verdict; it is corrected here because a docblock naming
72+
* the wrong row sends the next author hunting for a per-row seam that does not
73+
* exist. That is D3's cost by design; the ruling carries it openly and points
74+
* at the prescription below as the exit. This module does not widen to cover
75+
* it, and a future author reaching for a value comparison to close it must
76+
* re-read the two measurements above first.
6877
*
6978
* ## Divergence is `union` minus `intersection`
7079
*

0 commit comments

Comments
 (0)