@substrat-run/contract-tests 0.139.0 → 0.141.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/attachment-text-suite.d.ts.map +1 -1
  2. package/dist/attachment-text-suite.js +12 -4
  3. package/dist/attachment-text-suite.js.map +1 -1
  4. package/dist/capability-attachment-suite.d.ts.map +1 -1
  5. package/dist/capability-attachment-suite.js +84 -4
  6. package/dist/capability-attachment-suite.js.map +1 -1
  7. package/dist/capability-expiry-suite.d.ts.map +1 -1
  8. package/dist/capability-expiry-suite.js +6 -2
  9. package/dist/capability-expiry-suite.js.map +1 -1
  10. package/dist/capability-suite.d.ts.map +1 -1
  11. package/dist/capability-suite.js +9 -0
  12. package/dist/capability-suite.js.map +1 -1
  13. package/dist/caused-by-suite.d.ts.map +1 -1
  14. package/dist/caused-by-suite.js +54 -10
  15. package/dist/caused-by-suite.js.map +1 -1
  16. package/dist/connect-link-suite.d.ts +19 -0
  17. package/dist/connect-link-suite.d.ts.map +1 -0
  18. package/dist/connect-link-suite.js +215 -0
  19. package/dist/connect-link-suite.js.map +1 -0
  20. package/dist/entity-state-migration-suite.d.ts +16 -0
  21. package/dist/entity-state-migration-suite.d.ts.map +1 -0
  22. package/dist/entity-state-migration-suite.js +305 -0
  23. package/dist/entity-state-migration-suite.js.map +1 -0
  24. package/dist/entity-state-module.d.ts +183 -0
  25. package/dist/entity-state-module.d.ts.map +1 -1
  26. package/dist/entity-state-module.js +139 -1
  27. package/dist/entity-state-module.js.map +1 -1
  28. package/dist/entity-state-suite.d.ts.map +1 -1
  29. package/dist/entity-state-suite.js +35 -12
  30. package/dist/entity-state-suite.js.map +1 -1
  31. package/dist/entity-trash-module.d.ts +439 -0
  32. package/dist/entity-trash-module.d.ts.map +1 -0
  33. package/dist/entity-trash-module.js +287 -0
  34. package/dist/entity-trash-module.js.map +1 -0
  35. package/dist/entity-trash-suite.d.ts +59 -0
  36. package/dist/entity-trash-suite.d.ts.map +1 -0
  37. package/dist/entity-trash-suite.js +568 -0
  38. package/dist/entity-trash-suite.js.map +1 -0
  39. package/dist/erasure-module.d.ts +259 -0
  40. package/dist/erasure-module.d.ts.map +1 -0
  41. package/dist/erasure-module.js +251 -0
  42. package/dist/erasure-module.js.map +1 -0
  43. package/dist/index.d.ts +13 -1
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +13 -1
  46. package/dist/index.js.map +1 -1
  47. package/dist/job-run-suite.d.ts.map +1 -1
  48. package/dist/job-run-suite.js +29 -15
  49. package/dist/job-run-suite.js.map +1 -1
  50. package/dist/list-suite.d.ts.map +1 -1
  51. package/dist/list-suite.js +101 -1
  52. package/dist/list-suite.js.map +1 -1
  53. package/dist/membership-executor-suite.d.ts.map +1 -1
  54. package/dist/membership-executor-suite.js +60 -9
  55. package/dist/membership-executor-suite.js.map +1 -1
  56. package/dist/migration-comments-suite.d.ts +3 -0
  57. package/dist/migration-comments-suite.d.ts.map +1 -0
  58. package/dist/migration-comments-suite.js +92 -0
  59. package/dist/migration-comments-suite.js.map +1 -0
  60. package/dist/migration-comments.d.ts +3 -0
  61. package/dist/migration-comments.d.ts.map +1 -0
  62. package/dist/migration-comments.js +50 -0
  63. package/dist/migration-comments.js.map +1 -0
  64. package/dist/migration-digest-suite.d.ts +3 -0
  65. package/dist/migration-digest-suite.d.ts.map +1 -0
  66. package/dist/migration-digest-suite.js +175 -0
  67. package/dist/migration-digest-suite.js.map +1 -0
  68. package/dist/modules.d.ts +542 -0
  69. package/dist/modules.d.ts.map +1 -1
  70. package/dist/modules.js +167 -7
  71. package/dist/modules.js.map +1 -1
  72. package/dist/peer-suite.d.ts +2 -1
  73. package/dist/peer-suite.d.ts.map +1 -1
  74. package/dist/peer-suite.js +103 -1
  75. package/dist/peer-suite.js.map +1 -1
  76. package/dist/permission-suite.d.ts.map +1 -1
  77. package/dist/permission-suite.js +515 -2
  78. package/dist/permission-suite.js.map +1 -1
  79. package/dist/schedule-suite.d.ts +4 -1
  80. package/dist/schedule-suite.d.ts.map +1 -1
  81. package/dist/schedule-suite.js +150 -2
  82. package/dist/schedule-suite.js.map +1 -1
  83. package/dist/scope-host-suite.d.ts.map +1 -1
  84. package/dist/scope-host-suite.js +215 -2
  85. package/dist/scope-host-suite.js.map +1 -1
  86. package/dist/split-cases.d.ts +12 -0
  87. package/dist/split-cases.d.ts.map +1 -0
  88. package/dist/split-cases.js +59 -0
  89. package/dist/split-cases.js.map +1 -0
  90. package/dist/subject-erasure-suite.d.ts +6 -0
  91. package/dist/subject-erasure-suite.d.ts.map +1 -0
  92. package/dist/subject-erasure-suite.js +287 -0
  93. package/dist/subject-erasure-suite.js.map +1 -0
  94. package/dist/switch-audit-fault.d.ts +48 -0
  95. package/dist/switch-audit-fault.d.ts.map +1 -0
  96. package/dist/switch-audit-fault.js +80 -0
  97. package/dist/switch-audit-fault.js.map +1 -0
  98. package/dist/system-switch-suite.d.ts +2 -1
  99. package/dist/system-switch-suite.d.ts.map +1 -1
  100. package/dist/system-switch-suite.js +90 -0
  101. package/dist/system-switch-suite.js.map +1 -1
  102. package/dist/vertical-events-suite.d.ts +41 -0
  103. package/dist/vertical-events-suite.d.ts.map +1 -1
  104. package/dist/vertical-events-suite.js +55 -0
  105. package/dist/vertical-events-suite.js.map +1 -1
  106. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAYL,CAAC,EAMF,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAUL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,eAAO,MAAM,cAAc;aACzB,KAAK,EAAE,OAAO;aACd,OAAO,EAAE,OAAO;aAChB,MAAM;iBACJ,KAAK;qBAAI,EAAE;yBAAI,WAAW,EAAE,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS5B,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,EAAE,kBASvB,CAAC;AAsBF,eAAO,MAAM,cAAc,EAAE,kBAU5B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAMjC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAM7B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,kBAM5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAM1B,CAAC"}
package/dist/modules.js CHANGED
@@ -7,9 +7,12 @@
7
7
  * validates) draw from this one source. The assertions live in the suites; the
8
8
  * artifacts live here.
9
9
  */
10
- import { dataSubjectId, moduleManifest, operationInputsOf, operationConcurrencyOf, operationIdempotencyOptOutsOf, IDEMPOTENCY_RESULT_LIMIT, permissionKey, principalId, assertTransition, nameRefusedRecord, z, KERNEL_AUTHORED_EVENT_TYPES, substratError, } from '@substrat-run/contracts';
10
+ import { dataSubjectId, moduleManifest, operationInputsOf, operationConcurrencyOf, operationIdempotencyOptOutsOf, IDEMPOTENCY_RESULT_LIMIT, permissionKey, pageVisible, principalId, assertTransition, nameRefusedRecord, z, KERNEL_AUTHORED_EVENT_TYPES, substratError, } from '@substrat-run/contracts';
11
11
  import { membershipFixtureMod } from './membership-module.js';
12
- import { stateMod } from './entity-state-module.js';
12
+ import { rebuildMod, stateMod } from './entity-state-module.js';
13
+ import { trashMod } from './entity-trash-module.js';
14
+ import { erasureMod, erasureOtherMod } from './erasure-module.js';
15
+ import { commentedDdlMod } from './migration-comments.js';
13
16
  import { assertAllowed, readAttachmentText, readHistory, readTimeline, readScopeTimeline, readScopeHistory, ulid, } from '@substrat-run/kernel';
14
17
  /**
15
18
  * #1744: the machine `test/move` walks, in the form `model.json` emits — what the suite
@@ -586,6 +589,8 @@ export const contractTestBareOps = {
586
589
  ctx.requestPlatform({ kind: input.kind, payload: { rolled: 'back' } });
587
590
  throw new Error('boom after requestPlatform');
588
591
  }),
592
+ // #2102: the outcome events a settle wrote, as the spine holds them.
593
+ 'platform/outcome-events': ((ctx) => ctx.sql.query("SELECT type, actor, entity_type, entity_id, payload FROM _substrat_outbox WHERE type LIKE 'email.%' ORDER BY id")),
589
594
  'platform/read-requests': ((ctx) => ctx.sql.query('SELECT * FROM _substrat_platform_requests ORDER BY id')),
590
595
  // #618: the SUPPORTED read of the same rows — what a vertical uses to tell a user its
591
596
  // signing request never left, instead of the hand-written SELECT above.
@@ -766,6 +771,8 @@ const relinkOp = (ctx, input) => {
766
771
  ctx.relink(input.child, input.from, input.to);
767
772
  };
768
773
  const probeOp = (ctx, input) => ctx.check(input.permission, input.entity);
774
+ const grantedEntitiesOp = (ctx, input) => ctx.grantedEntities(input.permission, input.entityType, input);
775
+ const revokeGrantOp = (ctx, input) => ctx.revoke(input.principal, input.permission, input.entity);
769
776
  // Assert a permission, then emit — the shape a real mutating operation has. Exercises
770
777
  // K-34 (the emitted event carries the passed check as `authorization`) and, when the
771
778
  // check is refused, K-35 (assertAllowed throws → the host records a denial and rolls back).
@@ -821,7 +828,7 @@ const requestCheckOp = (ctx, input) => {
821
828
  };
822
829
  const CHECK_LOG_DDL = `CREATE TABLE IF NOT EXISTS perm_check_log (
823
830
  event_id TEXT PRIMARY KEY, permission TEXT NOT NULL, allowed INTEGER NOT NULL,
824
- threw TEXT, grant_threw TEXT)`;
831
+ threw TEXT, grant_threw TEXT, grant_read_kind TEXT)`;
825
832
  /**
826
833
  * Runs as the system actor, whose `ctx.check` is allowed by construction. With
827
834
  * `swallow` it catches the check's throw — and a `ctx.grant` of the same key, which
@@ -833,10 +840,12 @@ const checkRequestedConsumer = async (ctx, event) => {
833
840
  const permission = p.permission; // the cast under test
834
841
  if (!p.swallow) {
835
842
  assertAllowed(await ctx.check(permission));
843
+ const grantRead = await ctx.grantedEntities(permission, 'item');
836
844
  ctx.sql.exec(CHECK_LOG_DDL);
837
- ctx.sql.exec('INSERT INTO perm_check_log (event_id, permission, allowed) VALUES (?, ?, 1)', [
845
+ ctx.sql.exec('INSERT INTO perm_check_log (event_id, permission, allowed, grant_read_kind) VALUES (?, ?, 1, ?)', [
838
846
  event.id,
839
847
  p.permission,
848
+ grantRead.kind,
840
849
  ]);
841
850
  return;
842
851
  }
@@ -864,7 +873,7 @@ const checkRequestedConsumer = async (ctx, event) => {
864
873
  const readCheckLogOp = (ctx) => {
865
874
  ctx.sql.exec(CHECK_LOG_DDL);
866
875
  return {
867
- log: ctx.sql.query('SELECT event_id, permission, allowed, threw, grant_threw FROM perm_check_log ORDER BY event_id'),
876
+ log: ctx.sql.query('SELECT event_id, permission, allowed, threw, grant_threw, grant_read_kind FROM perm_check_log ORDER BY event_id'),
868
877
  deliveries: ctx.sql.query(`SELECT d.event_id, d.error, json_extract(o.payload, '$.permission') AS permission
869
878
  FROM _substrat_deliveries d JOIN _substrat_outbox o ON o.id = d.event_id
870
879
  WHERE o.type = 'perm.check-requested' ORDER BY d.event_id`),
@@ -1419,6 +1428,8 @@ export const permMod = {
1419
1428
  'perm/link': linkOp,
1420
1429
  'perm/relink': relinkOp,
1421
1430
  'perm/probe': probeOp,
1431
+ 'perm/granted-entities': grantedEntitiesOp,
1432
+ 'perm/revoke-grant': revokeGrantOp,
1422
1433
  'perm/authorized-emit': authorizedEmitOp,
1423
1434
  'perm/authorized-read': authorizedReadOp,
1424
1435
  'perm/read-outbox': readOutboxOp,
@@ -1462,6 +1473,27 @@ export const permMod = {
1462
1473
  'perm/can-assign': (async (ctx, input) => {
1463
1474
  return ctx.canAssign(input.roleKey);
1464
1475
  }),
1476
+ // #2071: a principal's `granted:` rows, tombstones included — what a revoke LEAVES, which
1477
+ // the checker's answer alone cannot show (a deleted row and a tombstone both deny).
1478
+ 'perm/grant-rows': (async (ctx, input) => ctx.sql
1479
+ .query(`SELECT relation, object, revoked_at, expires_at FROM _substrat_tuples
1480
+ WHERE subject = ? AND substr(relation, 1, 8) = 'granted:' ORDER BY relation, object`, [`principal:${input.principal}`])
1481
+ .map((r) => ({ relation: r.relation, object: r.object, revokedAt: r.revoked_at, expiresAt: r.expires_at }))),
1482
+ // #2083: read the bootstrap marker itself, not just whether a later top-up inferred it.
1483
+ 'perm/shape-marker': (async (ctx, input) => {
1484
+ const { principal, entity } = input;
1485
+ return ctx.sql.query(`SELECT revoked_at FROM _substrat_tuples WHERE subject = ? AND relation = 'bootstrap' AND object = ?`, [`principal:${principal}`, `${entity.entityType}:${entity.entityId}`]);
1486
+ }),
1487
+ // #2071: the kernel's `entity.grants-topped-up` events on one entity, oldest first — or,
1488
+ // given `type`, its `entity.grants-retired` ones (#2082).
1489
+ 'perm/topped-up': (async (ctx, input) => ctx.sql
1490
+ .query(`SELECT payload, actor, operation, authorization FROM _substrat_outbox
1491
+ WHERE type = ? AND entity_type = ? AND entity_id = ? ORDER BY id`, [
1492
+ input.type ?? 'entity.grants-topped-up',
1493
+ input.entityType,
1494
+ input.entityId,
1495
+ ])
1496
+ .map((r) => ({ ...r, payload: JSON.parse(r.payload), actor: JSON.parse(r.actor) }))),
1465
1497
  'perm/unshare': (async (ctx, input) => {
1466
1498
  const i = input;
1467
1499
  await ctx.revoke(principalId.parse(i.principal), permissionKey.parse(i.permission), i.entity);
@@ -1660,6 +1692,36 @@ export const listMod = {
1660
1692
  ]);
1661
1693
  return { id: i.id };
1662
1694
  }),
1695
+ 'list/add-hidden-batch': (async (ctx, input) => {
1696
+ const { first, count } = input;
1697
+ // One bounded SQL statement makes a >2,000-row workerd test affordable.
1698
+ ctx.sql.exec(`WITH RECURSIVE n(x) AS (
1699
+ SELECT ? UNION ALL SELECT x + 1 FROM n WHERE x + 1 < ?
1700
+ ) INSERT INTO list_orders (id, number, status, kind, hold)
1701
+ SELECT printf('h%06d', x), printf('%06d', x), 'open', 'k2074', NULL FROM n`, [first, first + count]);
1702
+ }),
1703
+ 'list/page-visible': (async (ctx, input) => {
1704
+ const query = input;
1705
+ return pageVisible((params) => ctx.page('listorder', { ...query, ...params }), query, (row) => String(row['id']).startsWith('v'), { continuation: ctx.pageContinuation('listorder:visible', query) });
1706
+ }),
1707
+ 'list/continuation-cap': (async (ctx) => {
1708
+ const codec = ctx.pageContinuation('listorder:cap-probe', { filters: { kind: 'cap-probe' } });
1709
+ let first = null;
1710
+ let last = null;
1711
+ for (let i = 0; i < 257; i++) {
1712
+ last = await codec.seal(`hidden ${i}`, true);
1713
+ if (i === 0)
1714
+ first = last;
1715
+ }
1716
+ let oldestRejected = false;
1717
+ try {
1718
+ await codec.open(first);
1719
+ }
1720
+ catch {
1721
+ oldestRejected = true;
1722
+ }
1723
+ return { oldestRejected, lastPosition: await codec.open(last) };
1724
+ }),
1663
1725
  // The read under test, passed straight through: the suite asserts on the
1664
1726
  // entries, the cursor and the total, which is where a naive keyset is wrong.
1665
1727
  'list/page': (async (ctx, input) => {
@@ -2144,6 +2206,19 @@ export const capMod = {
2144
2206
  assertAllowed(decision);
2145
2207
  return { read: entity, proof: decision.proof };
2146
2208
  }),
2209
+ // Collision fixtures: these are ordinary module operation names, independently of
2210
+ // the attachment reader verbs that share their spelling.
2211
+ 'attachments.list': (async (ctx, input) => {
2212
+ const entity = input.entity;
2213
+ assertAllowed(await ctx.check(CAP_READ, entity));
2214
+ return { read: entity };
2215
+ }),
2216
+ 'attachments.read': (async (ctx, input) => {
2217
+ const entity = input.entity;
2218
+ assertAllowed(await ctx.check(CAP_READ, entity));
2219
+ return { read: entity };
2220
+ }),
2221
+ 'cap/granted-entities': ((ctx) => ctx.grantedEntities(CAP_READ, 'doc')),
2147
2222
  // A node-level read: a capability holds no node-level authority, so this refuses it.
2148
2223
  'cap/read-all': (async (ctx) => {
2149
2224
  assertAllowed(await ctx.check(CAP_READ));
@@ -2518,6 +2593,23 @@ export const contractTestModules = [
2518
2593
  // #119: the archive/trash suite's module. Inert for every other suite — nothing else reads
2519
2594
  // its tables or invokes a `state/*` operation.
2520
2595
  stateMod,
2596
+ trashMod,
2597
+ // #2068: the subject-erasure suite's modules. Every scope in the kit carries them, so every
2598
+ // `shredSubject` in every suite runs their declared erasure and their hook — which reaches
2599
+ // only `er_*` tables nothing else writes, and misbehaves only for a subject the erasure suite
2600
+ // arms in `er_bombs`. That is deliberate: every other suite's erasure then also proves the
2601
+ // module half is harmless where it holds nothing.
2602
+ erasureMod,
2603
+ erasureOtherMod,
2604
+ // #2068 r5: a module whose migrations comment their DDL and then drop the last column. Every
2605
+ // scope in the kit migrates it, so a regression fails loudly everywhere.
2606
+ commentedDdlMod,
2607
+ // #2090: the authored-rebuild suite's module. Inert for every other suite — its rebuilds run
2608
+ // before the derived state migrations on a fresh scope, and nothing else reads `rb_*`. AFTER the
2609
+ // erasure modules: a dump wipe drops tables and not views, so a wiped scope still holds `er_view`
2610
+ // until `erasureMod` re-creates `er_loose`, and SQLite refuses any `ALTER TABLE … RENAME` while
2611
+ // a view names a missing table.
2612
+ rebuildMod,
2521
2613
  parseMod,
2522
2614
  concurrencyMod,
2523
2615
  idempotencyMod,
@@ -2585,7 +2677,12 @@ export const liveModManifest = moduleManifest.parse({
2585
2677
  liveTargets: [{ entityType: 'note', readPermission: 'live:read' }],
2586
2678
  // #1853: a note can sit in a folder — sometimes in two — and move between them, which
2587
2679
  // is what a feed narrowed `within` a folder walks.
2588
- entityRelations: [{ entityType: 'note', parentType: 'folder' }],
2680
+ // #938: a folder sits in a cabinet, so a `checkedWithin(folder)` subscriber's grant on
2681
+ // the cabinet reaches its root, and moving the folder takes the root out of that reach.
2682
+ entityRelations: [
2683
+ { entityType: 'note', parentType: 'folder' },
2684
+ { entityType: 'folder', parentType: 'cabinet' },
2685
+ ],
2589
2686
  entitlementKey: 'live',
2590
2687
  });
2591
2688
  /** Touch a note — one write, one event about ONE entity, which is what a subscriber hears. */
@@ -2627,7 +2724,7 @@ const liveTouchLedgerOp = async (ctx, input) => {
2627
2724
  */
2628
2725
  const liveUnshareOp = async (ctx, input) => {
2629
2726
  await ctx.revoke(principalId.parse(input.principal), permissionKey.parse('live:read'), {
2630
- entityType: 'note',
2727
+ entityType: input.entityType ?? 'note',
2631
2728
  entityId: input.noteId,
2632
2729
  });
2633
2730
  };
@@ -2641,6 +2738,29 @@ const liveMoveOp = async (ctx, input) => {
2641
2738
  assertAllowed(await ctx.check(permissionKey.parse('live:write')));
2642
2739
  ctx.relink({ entityType: 'note', entityId: input.noteId }, { entityType: 'folder', entityId: input.from }, { entityType: 'folder', entityId: input.to });
2643
2740
  };
2741
+ /** Touch several notes in one operation (#938): one pass, several rows. */
2742
+ const liveTouchEachOp = async (ctx, input) => {
2743
+ assertAllowed(await ctx.check(permissionKey.parse('live:write')));
2744
+ for (const noteId of input.noteIds) {
2745
+ ctx.emit({
2746
+ type: 'live.note-touched',
2747
+ schemaVersion: 1,
2748
+ entity: { entityType: 'note', entityId: noteId },
2749
+ piiClass: 'none',
2750
+ payload: {},
2751
+ });
2752
+ }
2753
+ };
2754
+ /** Put a folder in a cabinet (#938). */
2755
+ const liveShelveOp = async (ctx, input) => {
2756
+ assertAllowed(await ctx.check(permissionKey.parse('live:write')));
2757
+ ctx.link({ entityType: 'folder', entityId: input.folderId }, { entityType: 'cabinet', entityId: input.cabinetId });
2758
+ };
2759
+ /** Move a folder to another cabinet (#938): a `checkedWithin(folder)` root moving out of a grant's reach. */
2760
+ const liveReshelveOp = async (ctx, input) => {
2761
+ assertAllowed(await ctx.check(permissionKey.parse('live:write')));
2762
+ ctx.relink({ entityType: 'folder', entityId: input.folderId }, { entityType: 'cabinet', entityId: input.from }, { entityType: 'cabinet', entityId: input.to });
2763
+ };
2644
2764
  export const liveMod = {
2645
2765
  manifest: liveModManifest,
2646
2766
  migrations: [],
@@ -2650,6 +2770,9 @@ export const liveMod = {
2650
2770
  'live/unshare': liveUnshareOp,
2651
2771
  'live/file': liveFileOp,
2652
2772
  'live/move': liveMoveOp,
2773
+ 'live/touch-each': liveTouchEachOp,
2774
+ 'live/shelve': liveShelveOp,
2775
+ 'live/reshelve': liveReshelveOp,
2653
2776
  },
2654
2777
  };
2655
2778
  export const brokenModManifest = moduleManifest.parse({
@@ -2711,6 +2834,43 @@ export const spineParentMod = {
2711
2834
  ],
2712
2835
  operations: {},
2713
2836
  };
2837
+ /**
2838
+ * #2066: migrations that reach for the migration journal — one drops its digest fence, one writes
2839
+ * the journal itself. Each would make the digest check say whatever it wrote, so both must be
2840
+ * refused before any of their SQL runs, on every adapter. Hosted apart, like `brokenMod`, and each
2841
+ * migration's first statement is harmless so a refusal that let part of it run leaves `jt` behind.
2842
+ */
2843
+ export const journalFenceDropMod = {
2844
+ manifest: foreignKeyModManifest('@test/journal-fence-drop'),
2845
+ migrations: [
2846
+ { version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nDROP TRIGGER "_Substrat_Migrations_Digest_Required";' },
2847
+ ],
2848
+ operations: {},
2849
+ };
2850
+ export const journalWriteMod = {
2851
+ manifest: foreignKeyModManifest('@test/journal-write'),
2852
+ migrations: [
2853
+ { version: '0001-init', sql: "CREATE TABLE jt (id TEXT PRIMARY KEY);\nDELETE FROM main._substrat_migrations WHERE module_id = 'x';" },
2854
+ ],
2855
+ operations: {},
2856
+ };
2857
+ /**
2858
+ * #2066 r3: authored migrations that reach for the rest of the spine — one shadows
2859
+ * `_substrat_tuples` with a same-named TEMP table (every unqualified kernel read would then see
2860
+ * the empty one), one drops the outbox. Refused before any of their SQL runs, like the two above.
2861
+ */
2862
+ export const spineShadowMod = {
2863
+ manifest: foreignKeyModManifest('@test/spine-shadow'),
2864
+ migrations: [
2865
+ { version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nCREATE TEMP TABLE "_Substrat_Tuples" (subject TEXT);' },
2866
+ ],
2867
+ operations: {},
2868
+ };
2869
+ export const spineDropMod = {
2870
+ manifest: foreignKeyModManifest('@test/spine-drop'),
2871
+ migrations: [{ version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nDROP TABLE main._substrat_outbox;' }],
2872
+ operations: {},
2873
+ };
2714
2874
  export const ownParentMod = {
2715
2875
  manifest: foreignKeyModManifest('@test/own-parent'),
2716
2876
  migrations: [