@substrat-run/contract-tests 0.138.0 → 0.140.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 (113) hide show
  1. package/dist/attachment-text-fixtures.d.ts +17 -0
  2. package/dist/attachment-text-fixtures.d.ts.map +1 -1
  3. package/dist/attachment-text-fixtures.js +344 -4
  4. package/dist/attachment-text-fixtures.js.map +1 -1
  5. package/dist/attachment-text-suite.d.ts +16 -1
  6. package/dist/attachment-text-suite.d.ts.map +1 -1
  7. package/dist/attachment-text-suite.js +212 -28
  8. package/dist/attachment-text-suite.js.map +1 -1
  9. package/dist/capability-suite.d.ts.map +1 -1
  10. package/dist/capability-suite.js +5 -0
  11. package/dist/capability-suite.js.map +1 -1
  12. package/dist/caused-by-module.d.ts +23 -0
  13. package/dist/caused-by-module.d.ts.map +1 -0
  14. package/dist/caused-by-module.js +56 -0
  15. package/dist/caused-by-module.js.map +1 -0
  16. package/dist/caused-by-suite.d.ts +28 -0
  17. package/dist/caused-by-suite.d.ts.map +1 -0
  18. package/dist/caused-by-suite.js +223 -0
  19. package/dist/caused-by-suite.js.map +1 -0
  20. package/dist/connect-link-suite.d.ts +19 -0
  21. package/dist/connect-link-suite.d.ts.map +1 -0
  22. package/dist/connect-link-suite.js +215 -0
  23. package/dist/connect-link-suite.js.map +1 -0
  24. package/dist/entity-state-migration-suite.d.ts +16 -0
  25. package/dist/entity-state-migration-suite.d.ts.map +1 -0
  26. package/dist/entity-state-migration-suite.js +305 -0
  27. package/dist/entity-state-migration-suite.js.map +1 -0
  28. package/dist/entity-state-module.d.ts +317 -0
  29. package/dist/entity-state-module.d.ts.map +1 -0
  30. package/dist/entity-state-module.js +278 -0
  31. package/dist/entity-state-module.js.map +1 -0
  32. package/dist/entity-state-suite.d.ts +9 -0
  33. package/dist/entity-state-suite.d.ts.map +1 -0
  34. package/dist/entity-state-suite.js +557 -0
  35. package/dist/entity-state-suite.js.map +1 -0
  36. package/dist/entity-trash-module.d.ts +439 -0
  37. package/dist/entity-trash-module.d.ts.map +1 -0
  38. package/dist/entity-trash-module.js +287 -0
  39. package/dist/entity-trash-module.js.map +1 -0
  40. package/dist/entity-trash-suite.d.ts +59 -0
  41. package/dist/entity-trash-suite.d.ts.map +1 -0
  42. package/dist/entity-trash-suite.js +568 -0
  43. package/dist/entity-trash-suite.js.map +1 -0
  44. package/dist/erasure-module.d.ts +259 -0
  45. package/dist/erasure-module.d.ts.map +1 -0
  46. package/dist/erasure-module.js +251 -0
  47. package/dist/erasure-module.js.map +1 -0
  48. package/dist/findings-atomic-suite.d.ts +21 -0
  49. package/dist/findings-atomic-suite.d.ts.map +1 -0
  50. package/dist/findings-atomic-suite.js +131 -0
  51. package/dist/findings-atomic-suite.js.map +1 -0
  52. package/dist/findings-suite.d.ts +11 -0
  53. package/dist/findings-suite.d.ts.map +1 -0
  54. package/dist/findings-suite.js +391 -0
  55. package/dist/findings-suite.js.map +1 -0
  56. package/dist/index.d.ts +22 -3
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +20 -2
  59. package/dist/index.js.map +1 -1
  60. package/dist/list-suite.d.ts.map +1 -1
  61. package/dist/list-suite.js +101 -1
  62. package/dist/list-suite.js.map +1 -1
  63. package/dist/membership-executor-suite.d.ts +6 -2
  64. package/dist/membership-executor-suite.d.ts.map +1 -1
  65. package/dist/membership-executor-suite.js +318 -21
  66. package/dist/membership-executor-suite.js.map +1 -1
  67. package/dist/migration-comments-suite.d.ts +3 -0
  68. package/dist/migration-comments-suite.d.ts.map +1 -0
  69. package/dist/migration-comments-suite.js +92 -0
  70. package/dist/migration-comments-suite.js.map +1 -0
  71. package/dist/migration-comments.d.ts +3 -0
  72. package/dist/migration-comments.d.ts.map +1 -0
  73. package/dist/migration-comments.js +50 -0
  74. package/dist/migration-comments.js.map +1 -0
  75. package/dist/migration-digest-suite.d.ts +3 -0
  76. package/dist/migration-digest-suite.d.ts.map +1 -0
  77. package/dist/migration-digest-suite.js +175 -0
  78. package/dist/migration-digest-suite.js.map +1 -0
  79. package/dist/modules.d.ts +759 -0
  80. package/dist/modules.d.ts.map +1 -1
  81. package/dist/modules.js +158 -6
  82. package/dist/modules.js.map +1 -1
  83. package/dist/peer-suite.d.ts +2 -1
  84. package/dist/peer-suite.d.ts.map +1 -1
  85. package/dist/peer-suite.js +103 -1
  86. package/dist/peer-suite.js.map +1 -1
  87. package/dist/permission-suite.d.ts.map +1 -1
  88. package/dist/permission-suite.js +590 -2
  89. package/dist/permission-suite.js.map +1 -1
  90. package/dist/scope-host-suite.d.ts.map +1 -1
  91. package/dist/scope-host-suite.js +102 -1
  92. package/dist/scope-host-suite.js.map +1 -1
  93. package/dist/split-cases.d.ts +12 -0
  94. package/dist/split-cases.d.ts.map +1 -0
  95. package/dist/split-cases.js +59 -0
  96. package/dist/split-cases.js.map +1 -0
  97. package/dist/subject-erasure-suite.d.ts +6 -0
  98. package/dist/subject-erasure-suite.d.ts.map +1 -0
  99. package/dist/subject-erasure-suite.js +287 -0
  100. package/dist/subject-erasure-suite.js.map +1 -0
  101. package/dist/switch-audit-fault.d.ts +48 -0
  102. package/dist/switch-audit-fault.d.ts.map +1 -0
  103. package/dist/switch-audit-fault.js +80 -0
  104. package/dist/switch-audit-fault.js.map +1 -0
  105. package/dist/system-switch-suite.d.ts +2 -1
  106. package/dist/system-switch-suite.d.ts.map +1 -1
  107. package/dist/system-switch-suite.js +90 -0
  108. package/dist/system-switch-suite.js.map +1 -1
  109. package/dist/vertical-events-suite.d.ts +55 -0
  110. package/dist/vertical-events-suite.d.ts.map +1 -1
  111. package/dist/vertical-events-suite.js +55 -0
  112. package/dist/vertical-events-suite.js.map +1 -1
  113. package/package.json +3 -3
@@ -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;AAEjC,OAAO,EAUL,KAAK,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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,8 +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 { 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';
12
16
  import { assertAllowed, readAttachmentText, readHistory, readTimeline, readScopeTimeline, readScopeHistory, ulid, } from '@substrat-run/kernel';
13
17
  /**
14
18
  * #1744: the machine `test/move` walks, in the form `model.json` emits — what the suite
@@ -585,6 +589,8 @@ export const contractTestBareOps = {
585
589
  ctx.requestPlatform({ kind: input.kind, payload: { rolled: 'back' } });
586
590
  throw new Error('boom after requestPlatform');
587
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")),
588
594
  'platform/read-requests': ((ctx) => ctx.sql.query('SELECT * FROM _substrat_platform_requests ORDER BY id')),
589
595
  // #618: the SUPPORTED read of the same rows — what a vertical uses to tell a user its
590
596
  // signing request never left, instead of the hand-written SELECT above.
@@ -765,6 +771,8 @@ const relinkOp = (ctx, input) => {
765
771
  ctx.relink(input.child, input.from, input.to);
766
772
  };
767
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);
768
776
  // Assert a permission, then emit — the shape a real mutating operation has. Exercises
769
777
  // K-34 (the emitted event carries the passed check as `authorization`) and, when the
770
778
  // check is refused, K-35 (assertAllowed throws → the host records a denial and rolls back).
@@ -820,7 +828,7 @@ const requestCheckOp = (ctx, input) => {
820
828
  };
821
829
  const CHECK_LOG_DDL = `CREATE TABLE IF NOT EXISTS perm_check_log (
822
830
  event_id TEXT PRIMARY KEY, permission TEXT NOT NULL, allowed INTEGER NOT NULL,
823
- threw TEXT, grant_threw TEXT)`;
831
+ threw TEXT, grant_threw TEXT, grant_read_kind TEXT)`;
824
832
  /**
825
833
  * Runs as the system actor, whose `ctx.check` is allowed by construction. With
826
834
  * `swallow` it catches the check's throw — and a `ctx.grant` of the same key, which
@@ -832,10 +840,12 @@ const checkRequestedConsumer = async (ctx, event) => {
832
840
  const permission = p.permission; // the cast under test
833
841
  if (!p.swallow) {
834
842
  assertAllowed(await ctx.check(permission));
843
+ const grantRead = await ctx.grantedEntities(permission, 'item');
835
844
  ctx.sql.exec(CHECK_LOG_DDL);
836
- 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, ?)', [
837
846
  event.id,
838
847
  p.permission,
848
+ grantRead.kind,
839
849
  ]);
840
850
  return;
841
851
  }
@@ -863,7 +873,7 @@ const checkRequestedConsumer = async (ctx, event) => {
863
873
  const readCheckLogOp = (ctx) => {
864
874
  ctx.sql.exec(CHECK_LOG_DDL);
865
875
  return {
866
- 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'),
867
877
  deliveries: ctx.sql.query(`SELECT d.event_id, d.error, json_extract(o.payload, '$.permission') AS permission
868
878
  FROM _substrat_deliveries d JOIN _substrat_outbox o ON o.id = d.event_id
869
879
  WHERE o.type = 'perm.check-requested' ORDER BY d.event_id`),
@@ -1418,6 +1428,8 @@ export const permMod = {
1418
1428
  'perm/link': linkOp,
1419
1429
  'perm/relink': relinkOp,
1420
1430
  'perm/probe': probeOp,
1431
+ 'perm/granted-entities': grantedEntitiesOp,
1432
+ 'perm/revoke-grant': revokeGrantOp,
1421
1433
  'perm/authorized-emit': authorizedEmitOp,
1422
1434
  'perm/authorized-read': authorizedReadOp,
1423
1435
  'perm/read-outbox': readOutboxOp,
@@ -1461,6 +1473,27 @@ export const permMod = {
1461
1473
  'perm/can-assign': (async (ctx, input) => {
1462
1474
  return ctx.canAssign(input.roleKey);
1463
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) }))),
1464
1497
  'perm/unshare': (async (ctx, input) => {
1465
1498
  const i = input;
1466
1499
  await ctx.revoke(principalId.parse(i.principal), permissionKey.parse(i.permission), i.entity);
@@ -1659,6 +1692,36 @@ export const listMod = {
1659
1692
  ]);
1660
1693
  return { id: i.id };
1661
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
+ }),
1662
1725
  // The read under test, passed straight through: the suite asserts on the
1663
1726
  // entries, the cursor and the total, which is where a naive keyset is wrong.
1664
1727
  'list/page': (async (ctx, input) => {
@@ -2143,6 +2206,7 @@ export const capMod = {
2143
2206
  assertAllowed(decision);
2144
2207
  return { read: entity, proof: decision.proof };
2145
2208
  }),
2209
+ 'cap/granted-entities': ((ctx) => ctx.grantedEntities(CAP_READ, 'doc')),
2146
2210
  // A node-level read: a capability holds no node-level authority, so this refuses it.
2147
2211
  'cap/read-all': (async (ctx) => {
2148
2212
  assertAllowed(await ctx.check(CAP_READ));
@@ -2514,6 +2578,26 @@ export const contractTestModules = [
2514
2578
  atomicMod,
2515
2579
  searchMod,
2516
2580
  listMod,
2581
+ // #119: the archive/trash suite's module. Inert for every other suite — nothing else reads
2582
+ // its tables or invokes a `state/*` operation.
2583
+ stateMod,
2584
+ trashMod,
2585
+ // #2068: the subject-erasure suite's modules. Every scope in the kit carries them, so every
2586
+ // `shredSubject` in every suite runs their declared erasure and their hook — which reaches
2587
+ // only `er_*` tables nothing else writes, and misbehaves only for a subject the erasure suite
2588
+ // arms in `er_bombs`. That is deliberate: every other suite's erasure then also proves the
2589
+ // module half is harmless where it holds nothing.
2590
+ erasureMod,
2591
+ erasureOtherMod,
2592
+ // #2068 r5: a module whose migrations comment their DDL and then drop the last column. Every
2593
+ // scope in the kit migrates it, so a regression fails loudly everywhere.
2594
+ commentedDdlMod,
2595
+ // #2090: the authored-rebuild suite's module. Inert for every other suite — its rebuilds run
2596
+ // before the derived state migrations on a fresh scope, and nothing else reads `rb_*`. AFTER the
2597
+ // erasure modules: a dump wipe drops tables and not views, so a wiped scope still holds `er_view`
2598
+ // until `erasureMod` re-creates `er_loose`, and SQLite refuses any `ALTER TABLE … RENAME` while
2599
+ // a view names a missing table.
2600
+ rebuildMod,
2517
2601
  parseMod,
2518
2602
  concurrencyMod,
2519
2603
  idempotencyMod,
@@ -2581,7 +2665,12 @@ export const liveModManifest = moduleManifest.parse({
2581
2665
  liveTargets: [{ entityType: 'note', readPermission: 'live:read' }],
2582
2666
  // #1853: a note can sit in a folder — sometimes in two — and move between them, which
2583
2667
  // is what a feed narrowed `within` a folder walks.
2584
- entityRelations: [{ entityType: 'note', parentType: 'folder' }],
2668
+ // #938: a folder sits in a cabinet, so a `checkedWithin(folder)` subscriber's grant on
2669
+ // the cabinet reaches its root, and moving the folder takes the root out of that reach.
2670
+ entityRelations: [
2671
+ { entityType: 'note', parentType: 'folder' },
2672
+ { entityType: 'folder', parentType: 'cabinet' },
2673
+ ],
2585
2674
  entitlementKey: 'live',
2586
2675
  });
2587
2676
  /** Touch a note — one write, one event about ONE entity, which is what a subscriber hears. */
@@ -2623,7 +2712,7 @@ const liveTouchLedgerOp = async (ctx, input) => {
2623
2712
  */
2624
2713
  const liveUnshareOp = async (ctx, input) => {
2625
2714
  await ctx.revoke(principalId.parse(input.principal), permissionKey.parse('live:read'), {
2626
- entityType: 'note',
2715
+ entityType: input.entityType ?? 'note',
2627
2716
  entityId: input.noteId,
2628
2717
  });
2629
2718
  };
@@ -2637,6 +2726,29 @@ const liveMoveOp = async (ctx, input) => {
2637
2726
  assertAllowed(await ctx.check(permissionKey.parse('live:write')));
2638
2727
  ctx.relink({ entityType: 'note', entityId: input.noteId }, { entityType: 'folder', entityId: input.from }, { entityType: 'folder', entityId: input.to });
2639
2728
  };
2729
+ /** Touch several notes in one operation (#938): one pass, several rows. */
2730
+ const liveTouchEachOp = async (ctx, input) => {
2731
+ assertAllowed(await ctx.check(permissionKey.parse('live:write')));
2732
+ for (const noteId of input.noteIds) {
2733
+ ctx.emit({
2734
+ type: 'live.note-touched',
2735
+ schemaVersion: 1,
2736
+ entity: { entityType: 'note', entityId: noteId },
2737
+ piiClass: 'none',
2738
+ payload: {},
2739
+ });
2740
+ }
2741
+ };
2742
+ /** Put a folder in a cabinet (#938). */
2743
+ const liveShelveOp = async (ctx, input) => {
2744
+ assertAllowed(await ctx.check(permissionKey.parse('live:write')));
2745
+ ctx.link({ entityType: 'folder', entityId: input.folderId }, { entityType: 'cabinet', entityId: input.cabinetId });
2746
+ };
2747
+ /** Move a folder to another cabinet (#938): a `checkedWithin(folder)` root moving out of a grant's reach. */
2748
+ const liveReshelveOp = async (ctx, input) => {
2749
+ assertAllowed(await ctx.check(permissionKey.parse('live:write')));
2750
+ ctx.relink({ entityType: 'folder', entityId: input.folderId }, { entityType: 'cabinet', entityId: input.from }, { entityType: 'cabinet', entityId: input.to });
2751
+ };
2640
2752
  export const liveMod = {
2641
2753
  manifest: liveModManifest,
2642
2754
  migrations: [],
@@ -2646,6 +2758,9 @@ export const liveMod = {
2646
2758
  'live/unshare': liveUnshareOp,
2647
2759
  'live/file': liveFileOp,
2648
2760
  'live/move': liveMoveOp,
2761
+ 'live/touch-each': liveTouchEachOp,
2762
+ 'live/shelve': liveShelveOp,
2763
+ 'live/reshelve': liveReshelveOp,
2649
2764
  },
2650
2765
  };
2651
2766
  export const brokenModManifest = moduleManifest.parse({
@@ -2707,6 +2822,43 @@ export const spineParentMod = {
2707
2822
  ],
2708
2823
  operations: {},
2709
2824
  };
2825
+ /**
2826
+ * #2066: migrations that reach for the migration journal — one drops its digest fence, one writes
2827
+ * the journal itself. Each would make the digest check say whatever it wrote, so both must be
2828
+ * refused before any of their SQL runs, on every adapter. Hosted apart, like `brokenMod`, and each
2829
+ * migration's first statement is harmless so a refusal that let part of it run leaves `jt` behind.
2830
+ */
2831
+ export const journalFenceDropMod = {
2832
+ manifest: foreignKeyModManifest('@test/journal-fence-drop'),
2833
+ migrations: [
2834
+ { version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nDROP TRIGGER "_Substrat_Migrations_Digest_Required";' },
2835
+ ],
2836
+ operations: {},
2837
+ };
2838
+ export const journalWriteMod = {
2839
+ manifest: foreignKeyModManifest('@test/journal-write'),
2840
+ migrations: [
2841
+ { version: '0001-init', sql: "CREATE TABLE jt (id TEXT PRIMARY KEY);\nDELETE FROM main._substrat_migrations WHERE module_id = 'x';" },
2842
+ ],
2843
+ operations: {},
2844
+ };
2845
+ /**
2846
+ * #2066 r3: authored migrations that reach for the rest of the spine — one shadows
2847
+ * `_substrat_tuples` with a same-named TEMP table (every unqualified kernel read would then see
2848
+ * the empty one), one drops the outbox. Refused before any of their SQL runs, like the two above.
2849
+ */
2850
+ export const spineShadowMod = {
2851
+ manifest: foreignKeyModManifest('@test/spine-shadow'),
2852
+ migrations: [
2853
+ { version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nCREATE TEMP TABLE "_Substrat_Tuples" (subject TEXT);' },
2854
+ ],
2855
+ operations: {},
2856
+ };
2857
+ export const spineDropMod = {
2858
+ manifest: foreignKeyModManifest('@test/spine-drop'),
2859
+ migrations: [{ version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nDROP TABLE main._substrat_outbox;' }],
2860
+ operations: {},
2861
+ };
2710
2862
  export const ownParentMod = {
2711
2863
  manifest: foreignKeyModManifest('@test/own-parent'),
2712
2864
  migrations: [