Skip to content

Commit b5442cd

Browse files
committed
test(trigger-record-change): the Default Organization testkit takes the suite's narrow engine type
Claude-Session: https://claude.ai/code/session_018EszgtA3V2KXBX5tf59Hi4 Co-authored-by: Claude <noreply@anthropic.com>
1 parent db78d39 commit b5442cd

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎packages/triggers/trigger-record-change/src/before-update-flow-payload-reach.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ describe('[#15356/#14744] S5 on the real SQL driver — the mutation reaches no
902902
await objectql.syncSchemas();
903903
// A real `single` install's Default Organization: the system writes below
904904
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
905-
await installDefaultOrganization(objectql);
905+
await installDefaultOrganization(objectql as never);
906906

907907
objectql.registerFunction('sq_mutate_nested', async (args: any) => {
908908
const tags = (args.automation?.record as any)?.tags;

‎packages/triggers/trigger-record-change/src/record-change-integration.test.ts‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ describe('a system write must not fire a record-change flow UNSCOPED (#3760)', (
420420
await objectql.syncSchemas();
421421
// A real `single` install's Default Organization: the system writes below
422422
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
423-
await installDefaultOrganization(objectql);
423+
await installDefaultOrganization(objectql as never);
424424
// No `runAs` — the spec default 'user'. This is the shape an author (very
425425
// often an AI) writes without realising it can run without a user.
426426
automation.registerFlow('sysw_stamp', stampFlow('sysw_stamp', 'sysw') as any);
@@ -468,7 +468,7 @@ describe('a system write must not fire a record-change flow UNSCOPED (#3760)', (
468468
await objectql.syncSchemas();
469469
// A real `single` install's Default Organization: the system writes below
470470
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
471-
await installDefaultOrganization(objectql);
471+
await installDefaultOrganization(objectql as never);
472472
automation.registerFlow('sysw2_stamp', stampFlow('sysw2_stamp', 'sysw2') as any);
473473

474474
const created = await data.insert('sysw2', { status: 'new' }, { context: { userId: 'u_trigger' } });
@@ -499,7 +499,7 @@ describe('record-change trigger — end-to-end (#1491)', () => {
499499
await objectql.syncSchemas();
500500
// A real `single` install's Default Organization: the system writes below
501501
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
502-
await installDefaultOrganization(objectql);
502+
await installDefaultOrganization(objectql as never);
503503
automation.registerFlow('stamp_flow', stampFlow('stamp_flow', 'wid') as any);
504504

505505
// The flow bound to the trigger…
@@ -537,7 +537,7 @@ describe('record-change trigger — end-to-end (#1491)', () => {
537537
await ql.syncSchemas();
538538
// A real `single` install's Default Organization: the system writes below
539539
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
540-
await installDefaultOrganization(ql);
540+
await installDefaultOrganization(ql as never);
541541
},
542542
};
543543

@@ -581,7 +581,7 @@ describe('record-change trigger — end-to-end (#1491)', () => {
581581
await objectql.syncSchemas();
582582
// A real `single` install's Default Organization: the system writes below
583583
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
584-
await installDefaultOrganization(objectql);
584+
await installDefaultOrganization(objectql as never);
585585
automation.registerFlow('mirror_write', mirrorWriteFlow('mirror_write', 'wid3') as any);
586586

587587
expect((automation as any).getActiveTriggerBindings()).toContainEqual({
@@ -618,7 +618,7 @@ describe('record-change trigger — end-to-end (#1491)', () => {
618618
await objectql.syncSchemas();
619619
// A real `single` install's Default Organization: the system writes below
620620
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
621-
await installDefaultOrganization(objectql);
621+
await installDefaultOrganization(objectql as never);
622622
automation.registerFlow('urgent_alert', urgentAlertFlow('urgent_alert', 'wid5') as any);
623623

624624
// Create leg — a brand-new URGENT record: `previous == null` makes the
@@ -683,7 +683,7 @@ describe('record-change trigger — end-to-end (#1491)', () => {
683683
await objectql.syncSchemas();
684684
// A real `single` install's Default Organization: the system writes below
685685
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
686-
await installDefaultOrganization(objectql);
686+
await installDefaultOrganization(objectql as never);
687687

688688
automation.registerFlow('before_write_probe', {
689689
name: 'before_write_probe', label: 'Before-update probe', type: 'record_change',
@@ -836,7 +836,7 @@ describe('hydration schema gate — real ObjectQL engine findOne count (#8482)',
836836
await objectql.syncSchemas();
837837
// A real `single` install's Default Organization: the system writes below
838838
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
839-
await installDefaultOrganization(objectql);
839+
await installDefaultOrganization(objectql as never);
840840
automation.registerFlow(
841841
'gate_plain_audit_flow',
842842
afterUpdateAuditFlow('gate_plain_audit_flow', 'gate_plain', 'gate_plain_audit') as any,
@@ -875,7 +875,7 @@ describe('hydration schema gate — real ObjectQL engine findOne count (#8482)',
875875
await objectql.syncSchemas();
876876
// A real `single` install's Default Organization: the system writes below
877877
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
878-
await installDefaultOrganization(objectql);
878+
await installDefaultOrganization(objectql as never);
879879
automation.registerFlow(
880880
'gate_calc_audit_flow',
881881
afterUpdateAuditFlow('gate_calc_audit_flow', 'gate_calc', 'gate_calc_audit') as any,

‎packages/triggers/trigger-record-change/src/reentrant-start-condition.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ describe("a record-change flow's start condition is evaluated on its own write-b
274274
await objectql.syncSchemas();
275275
// A real `single` install's Default Organization: the system writes below
276276
// derive it (ADR-0131 D9), as a fresh NOT NULL tenant column requires (D1).
277-
await installDefaultOrganization(objectql);
277+
await installDefaultOrganization(objectql as never);
278278
automation.registerFlow('esc_escalation', escalationFlow('esc_escalation', 'esc_case') as never);
279279

280280
// Created OUTSIDE the condition (`priority` is not critical). The flow is

0 commit comments

Comments
 (0)