@@ -78,6 +78,7 @@ import { readFileSync } from 'node:fs';
7878import { describe , expect , it } from 'vitest' ;
7979
8080import { ALL_CONVERSIONS } from '../conversions/registry' ;
81+ import { MIGRATIONS_BY_MAJOR } from '../migrations/registry' ;
8182import { TimeUpdateInterval } from '../data/analytics.zod' ;
8283import { CurrencyConfigSchema , FieldSchema } from '../data/field.zod' ;
8384import { IndexSchema , ObjectSchema } from '../data/object.zod' ;
@@ -236,6 +237,23 @@ const todo = (where: string, id: string, stack: Record<string, unknown>): Render
236237 return reasons . map ( ( text ) => ( { where, text } ) ) ;
237238} ;
238239
240+ /**
241+ * The D3 entry `os migrate meta` prints for a DEFAULT FLIP, read by its `id`:
242+ * the old shape still parses and now means something else, so there is no
243+ * refusal or tombstone to read, and the semantic entry that judges the
244+ * conversion's edits (its `conversionIds`) is the prescription an author and
245+ * an operator meet. Its `reason` and `acceptanceCriteria` are the two texts.
246+ */
247+ const semantic = ( where : string , id : string , conversionId : string ) : Renderer => ( ) => {
248+ const found = Object . values ( MIGRATIONS_BY_MAJOR ) . flatMap ( ( step ) => step . semantic ) . find ( ( e ) => e . id === id ) ;
249+ if ( ! found ) throw new Error ( `${ where } : no semantic entry \`${ id } \`` ) ;
250+ expect ( found . conversionIds ?? [ ] , `${ where } judges \`${ conversionId } \`` ) . toContain ( conversionId ) ;
251+ return [
252+ { where : `${ where } (reason)` , text : found . reason } ,
253+ { where : `${ where } (acceptanceCriteria)` , text : found . acceptanceCriteria } ,
254+ ] ;
255+ } ;
256+
239257const ELEMENTS : readonly ( readonly [ unknown , string , readonly string [ ] ] ) [ ] = [
240258 [ ElementNumberPropsSchema , 'element:number' , [ 'object' , 'filter' ] ] ,
241259 [ ElementRecordPickerPropsSchema , 'element:record_picker' , [ 'object' , 'filter' , 'sort' , 'limit' ] ] ,
@@ -649,6 +667,16 @@ const JOIN: Readonly<Record<string, readonly Renderer[]>> = {
649667 'cube-sub-day-granularities-removed' : [
650668 refusal ( 'a sub-day TimeUpdateInterval member' , ( ) => TimeUpdateInterval . safeParse ( 'minute' ) ) ,
651669 ] ,
670+ // Protocol 19's View All / Modify All field-axis split, a default flip: View
671+ // All without `viewAllFields` still parses and now casts no field vote, so the
672+ // D3 entry is what an author and an operator meet.
673+ 'permission-view-all-fields-beside-record-bypass' : [
674+ semantic (
675+ 'D3 permission-view-all-modify-all-cast-no-field-vote' ,
676+ 'permission-view-all-modify-all-cast-no-field-vote' ,
677+ 'permission-view-all-fields-beside-record-bypass' ,
678+ ) ,
679+ ] ,
652680} ;
653681
654682/** Every major a prescription names as a release: `@objectstack/spec N[.x.y]` or `protocol N`. */
0 commit comments