@@ -3,7 +3,6 @@ import { test } from 'node:test';
33import {
44 checkDaemonModularityRatchets ,
55 DAEMON_MODULARITY_BASELINE ,
6- LOGICAL_MODULE_POLICIES ,
76 TYPE_CYCLE_BASELINE ,
87} from './daemon-modularity.ts' ;
98import { SESSION_STATE_FIELD_OWNERS } from './session-state.ts' ;
@@ -28,18 +27,9 @@ function baselineDaemonTypesEdges(): ResolvedImportEdge[] {
2827 ) ;
2928}
3029
31- function recordedMigrationEdges ( ) : ResolvedImportEdge [ ] {
32- return LOGICAL_MODULE_POLICIES . flatMap ( ( module ) =>
33- ( module . recordedMigrationImports ?? [ ] ) . map ( ( recorded ) => {
34- const [ file , target ] = recorded . split ( ' -> ' ) ;
35- return importEdge ( file ! , target ! ) ;
36- } ) ,
37- ) ;
38- }
39-
40- /** Every recorded import present and nothing else forbidden: the quiet state of the ratchets. */
30+ /** Every baseline edge is present and nothing else is forbidden: the quiet state of the ratchets. */
4131function baselineEdges ( ) : ResolvedImportEdge [ ] {
42- return [ ... baselineDaemonTypesEdges ( ) , ... recordedMigrationEdges ( ) ] ;
32+ return baselineDaemonTypesEdges ( ) ;
4333}
4434
4535/** Where a member of `zone` lives, so a zone count can be turned back into file paths. */
@@ -94,14 +84,14 @@ test('external daemon/types.ts importer membership changes require the baseline
9484 assert . match ( violations [ 0 ] ! . message , / m a y o n l y s h r i n k f r o m t h e r e c o r d e d 2 / ) ;
9585
9686 const removed = checkDaemonModularityRatchets (
97- [ ... baselineDaemonTypesEdges ( ) . slice ( 1 ) , ... recordedMigrationEdges ( ) ] ,
87+ baselineDaemonTypesEdges ( ) . slice ( 1 ) ,
9888 baselineTypeCycleMembers ( ) ,
9989 ) ;
10090 assert . equal ( removed . length , 1 ) ;
10191 assert . match ( removed [ 0 ] ! . message , / d e l e t e i t f r o m e x t e r n a l D a e m o n T y p e s I m p o r t e r s / ) ;
10292} ) ;
10393
104- test ( 'planned logical modules start with zero forbidden imports' , ( ) => {
94+ test ( 'logical modules reject forbidden imports' , ( ) => {
10595 const edges = resolveImportEdges (
10696 new Map ( [
10797 [
@@ -168,22 +158,6 @@ test('replay-test may still import its own files inside the package', () => {
168158 ) ;
169159} ) ;
170160
171- // #1478 P3 cleared every recorded replay-test migration import: the ADR 0012 divergence
172- // vocabulary became a neutral contracts leaf, and the reporter tree now reads the progress
173- // wire vocabulary from contracts instead of request-global plumbing. The rule enforces
174- // unconditionally for replay-test from here on.
175- test ( 'replay-test carries no recorded migration imports' , ( ) => {
176- assert . equal (
177- LOGICAL_MODULE_POLICIES . find ( ( { name } ) => name === 'replay-test' ) ?. recordedMigrationImports ,
178- undefined ,
179- ) ;
180- assert . deepEqual (
181- LOGICAL_MODULE_POLICIES . flatMap ( ( module ) => module . recordedMigrationImports ?? [ ] ) ,
182- [ ] ,
183- ) ;
184- assert . deepEqual ( checkDaemonModularityRatchets ( baselineEdges ( ) , baselineTypeCycleMembers ( ) ) , [ ] ) ;
185- } ) ;
186-
187161test ( 'internal trees reject deep imports globally, including from daemon' , ( ) => {
188162 const edges = resolveImportEdges (
189163 new Map ( [
0 commit comments