Skip to content

Commit 2bd14db

Browse files
committed
test(organizations): narrow the restart pin's header to keyed seed datasets
A restart re-holds a seed person reference only where the replay matches the row it landed on before by its key (mode ignore, upsert, update). An insert or replace dataset matches no row on replay, so its first row is not held again; the header now says so instead of claiming every seed. Claude-Session: https://claude.ai/code/session_01ADHkmT4PX8G5q4d3Z7C1TF Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8f3e7e4 commit 2bd14db

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

‎packages/plugins/organizations/src/default-organization-seed-owner.wall.test.ts‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
* through its own moment rather than the walled replay's.
2626
*
2727
* The held list lives in the process, and the last leg restarts between the
28-
* seed and the person's sign-up to show that a restart loses nothing: the
29-
* durable holder is the seed declaration itself. An un-walled boot runs its
30-
* inline seed on every start; the replay meets the same unresolved person on
31-
* the row it landed on before, and holds it again. No second record of the
32-
* held references is kept.
28+
* seed and the person's sign-up. For a keyed dataset (`mode` `ignore`, `upsert`
29+
* or `update`) a restart loses nothing: the durable holder is the seed
30+
* declaration itself. An un-walled boot runs its inline seed on every start;
31+
* the replay matches the row it landed on before by its key, meets the same
32+
* unresolved person there, and holds it again. No second record of the held
33+
* references is kept. An `insert` or `replace` dataset matches no row on
34+
* replay, so its first row is not held again; that leg is not pinned here.
3335
*
3436
* ## What is real
3537
*
@@ -305,11 +307,12 @@ describe('un-walled: a held seed person reference fills only the seed’s own ro
305307
});
306308

307309
/**
308-
* A restart between the un-walled seed and the person's sign-up loses nothing.
309-
* The first process holds the reference in memory and stops before the person
310-
* exists. The second process boots cold over the same database file; its own
311-
* inline seed replays, meets the same NULL on the same row, and holds it again,
312-
* so the person's sign-up in the second process fills the row.
310+
* A restart between the un-walled seed and the person's sign-up loses nothing
311+
* for a keyed dataset (`mode: 'upsert'` here). The first process holds the
312+
* reference in memory and stops before the person exists. The second process
313+
* boots cold over the same database file; its own inline seed replays, matches
314+
* the same row by its key, meets the same NULL there, and holds it again, so
315+
* the person's sign-up in the second process fills the row.
313316
*/
314317
describe('un-walled: a restart between the seed and the person’s sign-up still fills the seed’s person columns', () => {
315318
const env = legEnv([

0 commit comments

Comments
 (0)