Skip to content

Commit 85e9fa2

Browse files
committed
chore(gates): retire Android mechanics from daemon target imports
1 parent e98e63e commit 85e9fa2

2 files changed

Lines changed: 24 additions & 9 deletions

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ test('R76 accepts a classified edge with the exact recorded symbols', () => {
3030
assert.deepEqual(edgeViolations(sources, 'src/daemon/device-ready.ts'), []);
3131
});
3232

33+
test('R76 rejects Android package mechanics alongside the selector target policy', () => {
34+
const file = 'src/daemon/handlers/session-selector-dispatch.ts';
35+
const sources = {
36+
'src/platform-runtime-open-target.ts':
37+
'export function resolveAndroidPackageForOpen() {}\n' +
38+
'export function resolveSessionAppBundleIdForTarget() {}\n',
39+
[file]:
40+
"import { resolveAndroidPackageForOpen, resolveSessionAppBundleIdForTarget } from '../../platform-runtime-open-target.ts';\n" +
41+
'void [resolveAndroidPackageForOpen, resolveSessionAppBundleIdForTarget];\n',
42+
};
43+
const found = edgeViolations(sources, file);
44+
assert.equal(found.length, 1);
45+
assert.equal(found[0]!.rule, DAEMON_PLATFORM_RUNTIME_RULE);
46+
assert.match(found[0]!.message, /classified symbols drifted/);
47+
});
48+
3349
for (const [file, target, symbol] of [
3450
['request-recording-health', 'apple-resources', 'inspectAppleRunnerSession'],
3551
['session-device-resolution', 'apple-resources', 'inspectAppleRunnerSession'],

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,22 +167,21 @@ export const DAEMON_PLATFORM_RUNTIME_EDGES: readonly DaemonPlatformRuntimeEdge[]
167167
{
168168
file: 'src/daemon/handlers/session-selector-dispatch.ts',
169169
target: 'src/platform-runtime-open-target.ts',
170-
symbols: ['resolveAndroidPackageForOpen', 'resolveSessionAppBundleIdForTarget'],
171-
classification: 'leaked-platform-mechanics',
170+
symbols: ['resolveSessionAppBundleIdForTarget'],
171+
classification: 'daemon-policy-essential',
172172
rationale:
173-
'selector dispatch consumes the mixed open-target module; Android package resolution ' +
174-
'is platform mechanics that should sit behind the Android owning seam.',
175-
deepenedBy: '#2334',
173+
'selector dispatch derives session identity through the same neutral open-target ' +
174+
'resolution used by lifecycle operations; application tools own the selected-family ' +
175+
'observations, with Android package lookup behind its package mechanics seam.',
176176
},
177177
{
178178
file: 'src/daemon/session-lifecycle/internal/session-open-prepare.ts',
179179
target: 'src/platform-runtime-open-target.ts',
180180
symbols: ['resolveRequestedOpenSurface', 'validateOpenRelaunchTarget'],
181-
classification: 'leaked-platform-mechanics',
181+
classification: 'daemon-policy-essential',
182182
rationale:
183-
'open-prepare policy consumes the mixed open-target module; the neutral open ' +
184-
'plan/result should be separated from the platform mechanics that share the file.',
185-
deepenedBy: '#2334',
183+
'open preparation consumes surface and relaunch policy only; device observations ' +
184+
'are owned by the application tools rather than reconstructed in daemon planning.',
186185
},
187186
] as const;
188187

0 commit comments

Comments
 (0)