@@ -32,7 +32,6 @@ import { fileURLToPath } from 'node:url';
3232import { AUTHORING_COMMANDS , runAuthoringRules , type AuthoringCommand } from '@objectstack/lint' ;
3333import { childEnv } from './helpers/serve-process.js' ;
3434import { defineStackSource , linkSpec } from './helpers/define-stack-fixture.js' ;
35- import { findFlowRegionRefusals } from '../src/utils/flow-region-shape.js' ;
3635
3736const cliBin = join ( fileURLToPath ( new URL ( '.' , import . meta. url ) ) , '..' , 'bin' , 'run-dev.js' ) ;
3837
@@ -141,39 +140,14 @@ const CASES: ReadonlyArray<{ rule: string; blindTo: readonly AuthoringCommand[];
141140 actions : [ { name : 'log_time' , type : 'form' , target : 'parity_task.default' } ] ,
142141 } ) ,
143142 } ,
144- ] ;
145-
146- /**
147- * Checks `os validate` and `os build` gate on OUTSIDE the rule table, so
148- * `os lint`, which runs only the table, is blind to them. `blindTo` is the same
149- * documentation as above; `gate` is the check the two doors call.
150- *
151- * The pin below measures two things on the SAME stack, in process: `gate`
152- * refuses it with a row carrying `marker` (so the fixture really plants the
153- * defect), and the rule registry, run as each `blindTo` command runs it,
154- * reports no finding carrying `marker`. It measures the registry, not the
155- * `os lint` command. Closing the gap (registering the check as an authoring
156- * rule) reds the second half here and the case moves into `CASES`; a fixture
157- * that stops planting the defect reds the first half (#29059) instead of
158- * leaving the blindness assertion vacuously green.
159- *
160- * - flow region shape (#28893): a `try_catch` region that is not single-exit.
161- * validate and build refuse it with the automation engine's own registration
162- * verdict (`findFlowRegionRefusals`, `utils/flow-region-shape.ts`, pinned
163- * end to end by `validate-flow-region-shape.test.ts`).
164- */
165- const OUTSIDE_THE_TABLE : ReadonlyArray < {
166- check : string ;
167- marker : string ;
168- blindTo : readonly AuthoringCommand [ ] ;
169- gate : ( stack : Record < string , unknown > ) => ReadonlyArray < { message : string } > ;
170- stack : Record < string , unknown > ;
171- } > = [
143+ // [#29049] Was the one row of an `OUTSIDE_THE_TABLE` table: `os validate`
144+ // and `os build` refused it through a CLI-only walk (#28893) and `os lint`,
145+ // which runs only this registry, passed it. The planted defect is a
146+ // `try_catch` catch region that is not single-exit, which the automation
147+ // engine refuses to register; the rule is that same call.
172148 {
173- check : 'flow region shape (#28893)' ,
174- marker : 'single-exit' ,
149+ rule : 'flow-region-shape-invalid' ,
175150 blindTo : [ 'lint' ] ,
176- gate : findFlowRegionRefusals ,
177151 stack : withBaseline ( {
178152 objects : [ { name : 'parity_task' , label : 'Task' , sharingModel : 'private' , fields : { name : { type : 'text' , label : 'Name' } } } ] ,
179153 flows : [ {
@@ -222,20 +196,6 @@ describe('every authoring command reaches the same verdict (#4409)', () => {
222196 }
223197 } ) ;
224198
225- it . each ( OUTSIDE_THE_TABLE . map ( ( c ) => [ c . check , c ] as const ) ) ( '%s: a known gap, os lint is still blind to it' , ( _check , testCase ) => {
226- // The fixture plants the defect: the doors' own gate refuses it with the
227- // marker, or the blindness below would hold of a stack nothing refuses.
228- const refused = testCase . gate ( testCase . stack ) . filter ( ( r ) => r . message . includes ( testCase . marker ) ) ;
229- expect ( refused , JSON . stringify ( testCase . gate ( testCase . stack ) , null , 2 ) ) . not . toEqual ( [ ] ) ;
230- for ( const command of testCase . blindTo ) {
231- const findings = runAuthoringRules ( command , {
232- normalized : testCase . stack ,
233- ...( command === 'lint' ? { } : { parsed : testCase . stack } ) ,
234- } ) ;
235- expect ( findings . filter ( ( f ) => f . message . includes ( testCase . marker ) ) ) . toEqual ( [ ] ) ;
236- }
237- } ) ;
238-
239199 it ( 'the case table still covers every command as a blind spot' , ( ) => {
240200 // Guard the guard: if the table drifted to cover only one direction, the
241201 // suite above would keep passing while testing half the problem. The issue
0 commit comments