Skip to content

Commit fdcb981

Browse files
committed
chore(gates): reclassify the interactor edge in the R76 inventory
The dynamic leaked-platform-mechanics edge is gone, so the table records the composition edge that replaced it and the dynamic-form tests assert against the classified pair instead.
1 parent f8e8942 commit fdcb981

2 files changed

Lines changed: 27 additions & 27 deletions

File tree

‎scripts/layering/daemon-platform-runtime-inventory.test.ts‎

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -309,34 +309,32 @@ test('R76 catches a symbol added to the classified provider-runtime hub edge', (
309309
assert.match(found[0]!.message, /setProviderDevice/);
310310
});
311311

312-
test('R76 classifies the dynamic interactor lookup instead of skipping it', () => {
312+
test('R76 classifies a dynamic interactor lookup on a classified pair instead of skipping it', () => {
313313
const sources = {
314314
'src/platform-runtime.ts': ROOT_PLATFORM_STUB,
315-
'src/provider-device-runtime.ts': PROVIDER_HUB_STUB,
316315
'src/core/interactors.ts':
317-
"import { getProviderDeviceInteractor, isActiveProviderDevice } from '../provider-device-runtime.ts';\n" +
318-
'void [getProviderDeviceInteractor, isActiveProviderDevice];\n' +
319-
'export function getInteractor(device: unknown) {}\n',
320-
'src/daemon/snapshot-interactor-capture.ts':
321-
"const { getInteractor } = await import('../core/interactors.ts');\nvoid getInteractor;\n",
316+
"import { gateway } from '../platform-runtime.ts';\n" +
317+
'void gateway;\n' +
318+
'export async function getInteractor(device: unknown) {}\n',
319+
'src/daemon/server/daemon-runtime.ts':
320+
"const { getInteractor } = await import('../../core/interactors.ts');\nvoid getInteractor;\n",
322321
};
323-
assert.deepEqual(edgeViolations(sources, 'src/daemon/snapshot-interactor-capture.ts'), []);
322+
assert.deepEqual(edgeViolations(sources, 'src/daemon/server/daemon-runtime.ts'), []);
324323
});
325324

326-
test('R76 catches a binding added to the dynamic interactor lookup', () => {
325+
test('R76 catches a binding added to a dynamic interactor lookup', () => {
327326
const sources = {
328327
'src/platform-runtime.ts': ROOT_PLATFORM_STUB,
329-
'src/provider-device-runtime.ts': PROVIDER_HUB_STUB,
330328
'src/core/interactors.ts':
331-
"import { isActiveProviderDevice } from '../provider-device-runtime.ts';\n" +
332-
'void isActiveProviderDevice;\n' +
333-
'export function getInteractor(device: unknown) {}\n' +
334-
'export function getRetryInteractor(device: unknown) {}\n',
335-
'src/daemon/snapshot-interactor-capture.ts':
336-
"const { getInteractor, getRetryInteractor } = await import('../core/interactors.ts');\n" +
329+
"import { gateway } from '../platform-runtime.ts';\n" +
330+
'void gateway;\n' +
331+
'export async function getInteractor(device: unknown) {}\n' +
332+
'export async function getRetryInteractor(device: unknown) {}\n',
333+
'src/daemon/server/daemon-runtime.ts':
334+
"const { getInteractor, getRetryInteractor } = await import('../../core/interactors.ts');\n" +
337335
'void [getInteractor, getRetryInteractor];\n',
338336
};
339-
const found = edgeViolations(sources, 'src/daemon/snapshot-interactor-capture.ts');
337+
const found = edgeViolations(sources, 'src/daemon/server/daemon-runtime.ts');
340338
assert.equal(found.length, 1);
341339
assert.equal(found[0]!.rule, DAEMON_PLATFORM_RUNTIME_RULE);
342340
assert.match(found[0]!.message, /classified symbols drifted/);

‎scripts/layering/daemon-platform-runtime-inventory.ts‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ export function isRootPlatformRuntimeTarget(target: string): boolean {
4545
* Every module outside the daemon zone through which a daemon import can reach the root
4646
* platform-runtime family: the family itself, plus anything that imports it, transitively, over
4747
* static and dynamic edges alike. Computed from the tree rather than patterned so a root hub that
48-
* carries platform mechanics without naming them gains no immunity from its filename, and so the
49-
* one dynamic edge out of the daemon zone is classified like the static ones (#2542).
48+
* carries platform mechanics without naming them gains no immunity from its filename, and so a
49+
* dynamic edge out of the daemon zone is caught like a static one instead of escaping the
50+
* inventory (#2542).
5051
*/
5152
export function computePlatformMechanicsHubs(
5253
edges: readonly ResolvedImportEdge[],
@@ -208,16 +209,16 @@ export const DAEMON_PLATFORM_RUNTIME_EDGES: readonly DaemonPlatformRuntimeEdge[]
208209
'only symbol this edge names.',
209210
},
210211
{
211-
file: 'src/daemon/snapshot-interactor-capture.ts',
212+
file: 'src/daemon/server/daemon-runtime.ts',
212213
target: 'src/core/interactors.ts',
213214
symbols: ['getInteractor'],
214-
classification: 'leaked-platform-mechanics',
215+
classification: 'composition-essential',
215216
rationale:
216-
'the snapshot capture looks an interactor up through a dynamic import of the shared ' +
217-
'interactor lookup, the one production edge that leaves the daemon zone dynamically and so ' +
218-
'the one the ranked spine never sees; interactor resolution behind a capability bound at ' +
219-
'root composition is the accepted deepening (#2555).',
220-
deepenedBy: '#2555',
217+
'process-root assembly of the neutral InteractorResolution capability the legacy snapshot ' +
218+
'capture consumes (#2555): this site hands the shared interactor lookup to the daemon next ' +
219+
"to the provider-device admission it shares a request scope with, and is the daemon zone's " +
220+
'only edge into src/core/interactors.ts. The lookup it replaced was a dynamic import out of ' +
221+
'the daemon zone, a direction the ranked spine cannot see.',
221222
},
222223
{
223224
file: 'src/daemon/server/daemon-runtime.ts',
@@ -272,7 +273,8 @@ function sorted(symbols: readonly string[]): string[] {
272273
* at least named here (#2542).
273274
* Evidence: #2278 measured 14 production edges in 9 daemon files at origin/main 6e22e266d7;
274275
* this table is that measurement, classified per ADR 0022, plus the 3 edges the hub widening and
275-
* dynamic-edge pass made visible at #2541 (2 provider-runtime hubs, 1 dynamic interactor lookup).
276+
* dynamic-edge pass made visible at #2541 (2 provider-runtime hubs, 1 dynamic interactor lookup
277+
* that #2555 has since composed away into the daemon-runtime edge above).
276278
* Cost: attributed to the R76 rule registration in check.ts; not a standalone CI job.
277279
* Kill criterion: the daemon reaches the platform only through the gateway and declared
278280
* contract capabilities (the inventory empty), or a maintainer decision retires the

0 commit comments

Comments
 (0)