@@ -26,6 +26,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest';
2626import { DatasetSchema } from '@objectstack/spec/ui' ;
2727import type { ExecutionContext } from '@objectstack/spec/kernel' ;
2828import { AnalyticsService } from '@objectstack/service-analytics' ;
29+ import { assertEngineFindOnePredicate } from '@objectstack/metadata-core' ;
2930import { ObjectStackProtocolImplementation } from '@objectstack/metadata-protocol' ;
3031import { HttpDispatcher } from '../http-dispatcher.js' ;
3132
@@ -97,7 +98,11 @@ function makeDoor() {
9798 const rows = [ { id : 'r1' } , { id : 'r2' } ] ;
9899 return typeof query ?. limit === 'number' ? rows . slice ( 0 , query . limit ) : rows ;
99100 } ,
100- findOne : async ( ) => null ,
101+ // The ADR-0067 pre-publish capture: never published, so no active row.
102+ findOne : async ( object : string , query : unknown ) => {
103+ assertEngineFindOnePredicate ( object , query as never ) ;
104+ return null ;
105+ } ,
101106 // The ADR-0067 commit row the batch writes; not under test here.
102107 insert : async ( _object : string , row : unknown ) => row ,
103108 } ;
@@ -153,7 +158,7 @@ describe('publish-drafts widget probes run as the publishing caller (#25484)', (
153158 const { probes, admissionContexts } = await publishAs ( NON_READER ) ;
154159
155160 expect ( probes ?. checked ?. widgets ) . toBe ( 1 ) ;
156- const failed = probes . issues . filter ( ( i : any ) => i . code === 'widget_query_failed' ) ;
161+ const failed = probes . issues . filter ( ( i : any ) => i . code === 'widget_query_failed' ) ; // adr0112-ok: D6c build-probe diagnostics code
157162 expect ( failed ) . toHaveLength ( 1 ) ;
158163 expect ( failed [ 0 ] ) . toMatchObject ( {
159164 layer : 'runtime' ,
0 commit comments