Skip to content

Commit 9c9fbbb

Browse files
committed
chore(gates): repoint the path-keyed tables at src/daemon/device
The move is rename-only, but four tables key on the exact old paths: - scripts/layering/daemon-platform-runtime-inventory.ts (R76): the two composition-essential edges from device-claim-owner-recovery.ts and device-ready.ts, whose old entries are stale and whose new paths are unclassified — observed red (4 violations) before this edit, green after. - scripts/layering/daemon-platform-runtime-inventory.test.ts: the device-ready fixtures now plant the importer at its new path with its new specifier depth. - fallow-baselines/health.json: move the device-ready.ts complexity_high + crap_high entry by hand to the new path; nothing else regenerated. - .fallowrc.json: the #1642 host-process-mock exemption names its consumers by path; two of the three moved. Plus two stale path comments in the help-conformance sample producer and the nightly claim-registry model. LOGICAL_MODULE_POLICIES gains no entry: the device family has no forbidden target roots and no facade, and a facade-less entry with empty forbiddenTargetRoots is a no-op declaration (cf. the undeclared src/daemon/managed-device-allocation/).
1 parent 5c7944b commit 9c9fbbb

6 files changed

Lines changed: 18 additions & 18 deletions

File tree

‎.fallowrc.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
"exports": ["*"]
245245
},
246246
{
247-
"comment": "#1642: its three consumers (src/__tests__/cli-device-status.test.ts, src/daemon/__tests__/device-claims.test.ts, src/daemon/__tests__/device-claim-prune.test.ts) all reach it the only way a Vitest module mock can — `vi.mock(path, async (importOriginal) => (await import('...host-process-mock.ts')).pinOwnProcessStartTime(importOriginal))`. Dependency analysis cannot follow that dynamic import to a consumer, the same limitation the daemon route-handler entry above records.",
247+
"comment": "#1642: its three consumers (src/__tests__/cli-device-status.test.ts, src/daemon/device/__tests__/device-claims.test.ts, src/daemon/device/__tests__/device-claim-prune.test.ts) all reach it the only way a Vitest module mock can — `vi.mock(path, async (importOriginal) => (await import('...host-process-mock.ts')).pinOwnProcessStartTime(importOriginal))`. Dependency analysis cannot follow that dynamic import to a consumer, the same limitation the daemon route-handler entry above records.",
248248
"file": "src/__tests__/test-utils/host-process-mock.ts",
249249
"exports": ["pinOwnProcessStartTime"]
250250
},

‎fallow-baselines/health.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"count": 1
131131
}
132132
},
133-
"src/daemon/device-ready.ts": {
133+
"src/daemon/device/device-ready.ts": {
134134
"complexity_high": {
135135
"count": 1
136136
},

‎scripts/help-conformance-sample-outputs.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Hint: Run agent-device session list to inspect active sessions. To reuse this de
9191
};
9292

9393
// Enforced cross-daemon device claim conflict from
94-
// src/daemon/device-claim-conflict.ts. This path is deliberately non-retriable:
94+
// src/daemon/device/device-claim-conflict.ts. This path is deliberately non-retriable:
9595
// the exact status command is the only safe next step while ownership is live.
9696
export const DEVICE_CLAIM_IN_USE_SAMPLE = {
9797
command: 'agent-device open Demo --platform android --serial emulator-5554',

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ function edgeViolations(sources: Record<string, string>, file: string): Layering
2323
test('R76 accepts a classified edge with the exact recorded symbols', () => {
2424
const sources = {
2525
[DEVICE_READY_TARGET]: DEVICE_READY_STUB,
26-
'src/daemon/device-ready.ts':
27-
"import { ensureLocalPlatformDeviceReady } from '../platform-runtime-device-ready.ts';\n" +
26+
'src/daemon/device/device-ready.ts':
27+
"import { ensureLocalPlatformDeviceReady } from '../../platform-runtime-device-ready.ts';\n" +
2828
'void ensureLocalPlatformDeviceReady;\n',
2929
};
30-
assert.deepEqual(edgeViolations(sources, 'src/daemon/device-ready.ts'), []);
30+
assert.deepEqual(edgeViolations(sources, 'src/daemon/device/device-ready.ts'), []);
3131
});
3232

3333
for (const [file, target, symbol] of [
@@ -51,8 +51,8 @@ for (const [file, target, symbol] of [
5151
test('R76 reports every classified edge missing from the tree as stale, not the other way around', () => {
5252
const sources = {
5353
[DEVICE_READY_TARGET]: DEVICE_READY_STUB,
54-
'src/daemon/device-ready.ts':
55-
"import { ensureLocalPlatformDeviceReady } from '../platform-runtime-device-ready.ts';\n" +
54+
'src/daemon/device/device-ready.ts':
55+
"import { ensureLocalPlatformDeviceReady } from '../../platform-runtime-device-ready.ts';\n" +
5656
'void ensureLocalPlatformDeviceReady;\n',
5757
};
5858
const stale = violations(sources).filter(
@@ -87,11 +87,11 @@ test('R76 rejects an unclassified edge with the pair and its line', () => {
8787
test('R76 rejects new symbols on a classified edge', () => {
8888
const sources = {
8989
[DEVICE_READY_TARGET]: DEVICE_READY_STUB + 'export function extraReadiness() {}\n',
90-
'src/daemon/device-ready.ts':
91-
"import { ensureLocalPlatformDeviceReady, extraReadiness } from '../platform-runtime-device-ready.ts';\n" +
90+
'src/daemon/device/device-ready.ts':
91+
"import { ensureLocalPlatformDeviceReady, extraReadiness } from '../../platform-runtime-device-ready.ts';\n" +
9292
'void [ensureLocalPlatformDeviceReady, extraReadiness];\n',
9393
};
94-
const found = edgeViolations(sources, 'src/daemon/device-ready.ts');
94+
const found = edgeViolations(sources, 'src/daemon/device/device-ready.ts');
9595
assert.equal(found.length, 1);
9696
assert.equal(found[0]!.rule, DAEMON_PLATFORM_RUNTIME_RULE);
9797
assert.match(found[0]!.message, /classified symbols drifted/);
@@ -212,12 +212,12 @@ test('R76 rejects a namespace import alongside the recorded named binding on the
212212
test('R76 treats the import and re-export of one classified pair as one entry', () => {
213213
const sources = {
214214
[DEVICE_READY_TARGET]: DEVICE_READY_STUB,
215-
'src/daemon/device-ready.ts':
216-
"import { ensureLocalPlatformDeviceReady } from '../platform-runtime-device-ready.ts';\n" +
217-
"export { ensureLocalPlatformDeviceReady } from '../platform-runtime-device-ready.ts';\n" +
215+
'src/daemon/device/device-ready.ts':
216+
"import { ensureLocalPlatformDeviceReady } from '../../platform-runtime-device-ready.ts';\n" +
217+
"export { ensureLocalPlatformDeviceReady } from '../../platform-runtime-device-ready.ts';\n" +
218218
'void ensureLocalPlatformDeviceReady;\n',
219219
};
220-
assert.deepEqual(edgeViolations(sources, 'src/daemon/device-ready.ts'), []);
220+
assert.deepEqual(edgeViolations(sources, 'src/daemon/device/device-ready.ts'), []);
221221
});
222222

223223
test('R76 ignores test-shaped and non-daemon importers', () => {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const DAEMON_PLATFORM_RUNTIME_EDGES: readonly DaemonPlatformRuntimeEdge[]
130130
'orphan cleanups, and legacy app-log marker recovery.',
131131
},
132132
{
133-
file: 'src/daemon/device-claim-owner-recovery.ts',
133+
file: 'src/daemon/device/device-claim-owner-recovery.ts',
134134
target: 'src/platform-runtime.ts',
135135
symbols: ['createPlatformRuntimeGateway'],
136136
classification: 'composition-essential',
@@ -140,7 +140,7 @@ export const DAEMON_PLATFORM_RUNTIME_EDGES: readonly DaemonPlatformRuntimeEdge[]
140140
"composition belongs to the recovery policy's own module.",
141141
},
142142
{
143-
file: 'src/daemon/device-ready.ts',
143+
file: 'src/daemon/device/device-ready.ts',
144144
target: 'src/platform-runtime-device-ready.ts',
145145
symbols: ['ensureLocalPlatformDeviceReady'],
146146
classification: 'composition-essential',

‎test/integration/nightly/concurrency-torture/claim-registry.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// In-memory model of the enforced host-global device claim (`src/daemon/device-claims.ts`).
1+
// In-memory model of the enforced host-global device claim (`src/daemon/device/device-claims.ts`).
22
//
33
// The production claim is a filesystem lock file guarded by a process lock, keyed
44
// by `canonicalLocalDeviceKey`. That is real I/O and a real OS lock — neither is

0 commit comments

Comments
 (0)