@@ -100,61 +100,58 @@ test('R76 rejects new symbols on a classified edge', () => {
100100
101101test ( 'R76 matches a destructured dynamic import by target with the recorded bindings' , ( ) => {
102102 const sources = {
103- 'src/platform-runtime-operation-host .ts' :
104- 'export async function recoverLegacyAppLogMarkersAfterDaemonLock() { return {}; } \n' ,
103+ 'src/platform-runtime-daemon-lifecycle .ts' :
104+ 'export const platformDaemonLifecycleOwners = {}; \n' ,
105105 'src/daemon/server/daemon-runtime.ts' :
106- "const { recoverLegacyAppLogMarkersAfterDaemonLock } = await import('../../platform-runtime-operation-host .ts');\n" +
107- 'void recoverLegacyAppLogMarkersAfterDaemonLock ;\n' ,
106+ "const { platformDaemonLifecycleOwners } = await import('../../platform-runtime-daemon-lifecycle .ts');\n" +
107+ 'void platformDaemonLifecycleOwners ;\n' ,
108108 } ;
109109 assert . deepEqual ( edgeViolations ( sources , 'src/daemon/server/daemon-runtime.ts' ) , [ ] ) ;
110110} ) ;
111111
112112test ( 'R76 rejects an expanded destructured dynamic import on a classified edge' , ( ) => {
113113 const sources = {
114- 'src/platform-runtime-operation-host .ts' :
115- 'export async function recoverLegacyAppLogMarkersAfterDaemonLock() { return {}; } \n' +
116- 'export async function extraLegacyMarkerSweep() { return {}; } \n' ,
114+ 'src/platform-runtime-daemon-lifecycle .ts' :
115+ 'export const platformDaemonLifecycleOwners = {}; \n' +
116+ 'export const extraLifecycleParticipant = {}; \n' ,
117117 'src/daemon/server/daemon-runtime.ts' :
118- "const { recoverLegacyAppLogMarkersAfterDaemonLock, extraLegacyMarkerSweep } = await import('../../platform-runtime-operation-host .ts');\n" +
119- 'void [recoverLegacyAppLogMarkersAfterDaemonLock, extraLegacyMarkerSweep ];\n' ,
118+ "const { platformDaemonLifecycleOwners, extraLifecycleParticipant } = await import('../../platform-runtime-daemon-lifecycle .ts');\n" +
119+ 'void [platformDaemonLifecycleOwners, extraLifecycleParticipant ];\n' ,
120120 } ;
121121 const found = edgeViolations ( sources , 'src/daemon/server/daemon-runtime.ts' ) ;
122122 assert . equal ( found . length , 1 ) ;
123123 assert . equal ( found [ 0 ] ! . rule , DAEMON_PLATFORM_RUNTIME_RULE ) ;
124124 assert . match ( found [ 0 ] ! . message , / c l a s s i f i e d s y m b o l s d r i f t e d / ) ;
125- assert . match (
126- found [ 0 ] ! . message ,
127- / e x t r a L e g a c y M a r k e r S w e e p , r e c o v e r L e g a c y A p p L o g M a r k e r s A f t e r D a e m o n L o c k / ,
128- ) ;
125+ assert . match ( found [ 0 ] ! . message , / e x t r a L i f e c y c l e P a r t i c i p a n t , p l a t f o r m D a e m o n L i f e c y c l e O w n e r s / ) ;
129126} ) ;
130127
131128test ( 'R76 rejects a rest binding next to a recorded dynamic-import binding' , ( ) => {
132129 const sources = {
133- 'src/platform-runtime-operation-host .ts' :
134- 'export async function recoverLegacyAppLogMarkersAfterDaemonLock() { return {}; } \n' +
135- 'export async function sweepLegacyAppLogMarkers() { return {}; } \n' ,
130+ 'src/platform-runtime-daemon-lifecycle .ts' :
131+ 'export const platformDaemonLifecycleOwners = {}; \n' +
132+ 'export const sweepLifecycleParticipants = {}; \n' ,
136133 'src/daemon/server/daemon-runtime.ts' :
137- "const { recoverLegacyAppLogMarkersAfterDaemonLock , ...operationHost } = await import('../../platform-runtime-operation-host .ts');\n" +
138- 'void [recoverLegacyAppLogMarkersAfterDaemonLock, operationHost ];\n' ,
134+ "const { platformDaemonLifecycleOwners , ...lifecycleModule } = await import('../../platform-runtime-daemon-lifecycle .ts');\n" +
135+ 'void [platformDaemonLifecycleOwners, lifecycleModule ];\n' ,
139136 } ;
140137 const found = edgeViolations ( sources , 'src/daemon/server/daemon-runtime.ts' ) ;
141138 assert . equal ( found . length , 1 ) ;
142139 assert . equal ( found [ 0 ] ! . rule , DAEMON_PLATFORM_RUNTIME_RULE ) ;
143140 assert . match ( found [ 0 ] ! . message , / u n n a m e a b l e d y n a m i c - i m p o r t b i n d i n g / ) ;
144141 assert . match (
145142 found [ 0 ] ! . message ,
146- / s r c \/ d a e m o n \/ s e r v e r \/ d a e m o n - r u n t i m e \. t s - > s r c \/ p l a t f o r m - r u n t i m e - o p e r a t i o n - h o s t \. t s / ,
143+ / s r c \/ d a e m o n \/ s e r v e r \/ d a e m o n - r u n t i m e \. t s - > s r c \/ p l a t f o r m - r u n t i m e - d a e m o n - l i f e c y c l e \. t s / ,
147144 ) ;
148145} ) ;
149146
150147test ( 'R76 rejects a computed destructure key on a classified dynamic import' , ( ) => {
151148 const sources = {
152- 'src/platform-runtime-operation-host .ts' :
153- 'export async function recoverLegacyAppLogMarkersAfterDaemonLock() { return {}; } \n' ,
149+ 'src/platform-runtime-daemon-lifecycle .ts' :
150+ 'export const platformDaemonLifecycleOwners = {}; \n' ,
154151 'src/daemon/server/daemon-runtime.ts' :
155- "const markerName = 'recoverLegacyAppLogMarkersAfterDaemonLock ';\n" +
156- 'const { [markerName ]: recover } = await import("../../platform-runtime-operation-host .ts");\n' +
157- 'void recover ;\n' ,
152+ "const ownersName = 'platformDaemonLifecycleOwners ';\n" +
153+ 'const { [ownersName ]: owners } = await import("../../platform-runtime-daemon-lifecycle .ts");\n' +
154+ 'void owners ;\n' ,
158155 } ;
159156 const found = edgeViolations ( sources , 'src/daemon/server/daemon-runtime.ts' ) ;
160157 assert . equal ( found . length , 1 ) ;
@@ -163,10 +160,10 @@ test('R76 rejects a computed destructure key on a classified dynamic import', ()
163160
164161test ( 'R76 rejects a namespace-form dynamic import that hides the recorded bindings' , ( ) => {
165162 const sources = {
166- 'src/platform-runtime-operation-host .ts' :
167- 'export async function recoverLegacyAppLogMarkersAfterDaemonLock() { return {}; } \n' ,
163+ 'src/platform-runtime-daemon-lifecycle .ts' :
164+ 'export const platformDaemonLifecycleOwners = {}; \n' ,
168165 'src/daemon/server/daemon-runtime.ts' :
169- "const mod = await import('../../platform-runtime-operation-host .ts');\nvoid mod;\n" ,
166+ "const mod = await import('../../platform-runtime-daemon-lifecycle .ts');\nvoid mod;\n" ,
170167 } ;
171168 const found = edgeViolations ( sources , 'src/daemon/server/daemon-runtime.ts' ) ;
172169 assert . equal ( found . length , 1 ) ;
@@ -176,20 +173,20 @@ test('R76 rejects a namespace-form dynamic import that hides the recorded bindin
176173
177174test ( 'R76 rejects a namespace import alongside the recorded named binding on the same pair' , ( ) => {
178175 const sources = {
179- 'src/platform-runtime-operation-host .ts' :
180- 'export async function recoverLegacyAppLogMarkersAfterDaemonLock() { return {}; } \n' ,
176+ 'src/platform-runtime-daemon-lifecycle .ts' :
177+ 'export const platformDaemonLifecycleOwners = {}; \n' ,
181178 'src/daemon/server/daemon-runtime.ts' :
182- "const { recoverLegacyAppLogMarkersAfterDaemonLock } = await import('../../platform-runtime-operation-host .ts');\n" +
183- "const operationHost = await import('../../platform-runtime-operation-host .ts');\n" +
184- 'void [recoverLegacyAppLogMarkersAfterDaemonLock, operationHost ];\n' ,
179+ "const { platformDaemonLifecycleOwners } = await import('../../platform-runtime-daemon-lifecycle .ts');\n" +
180+ "const lifecycleModule = await import('../../platform-runtime-daemon-lifecycle .ts');\n" +
181+ 'void [platformDaemonLifecycleOwners, lifecycleModule ];\n' ,
185182 } ;
186183 const found = edgeViolations ( sources , 'src/daemon/server/daemon-runtime.ts' ) ;
187184 assert . equal ( found . length , 1 ) ;
188185 assert . equal ( found [ 0 ] ! . rule , DAEMON_PLATFORM_RUNTIME_RULE ) ;
189186 assert . match ( found [ 0 ] ! . message , / o p e n - e n d e d d y n a m i c i m p o r t / ) ;
190187 assert . match (
191188 found [ 0 ] ! . message ,
192- / s r c \/ d a e m o n \/ s e r v e r \/ d a e m o n - r u n t i m e \. t s - > s r c \/ p l a t f o r m - r u n t i m e - o p e r a t i o n - h o s t \. t s / ,
189+ / s r c \/ d a e m o n \/ s e r v e r \/ d a e m o n - r u n t i m e \. t s - > s r c \/ p l a t f o r m - r u n t i m e - d a e m o n - l i f e c y c l e \. t s / ,
193190 ) ;
194191} ) ;
195192
0 commit comments