Skip to content

Commit 64573fd

Browse files
committed
chore(gates): restore protected iOS acquisition boundary
1 parent 29ed6a9 commit 64573fd

4 files changed

Lines changed: 12 additions & 16 deletions

File tree

‎packages/capture-kit/package.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@
110110
"types": "./src/screen-recording-transport.ts",
111111
"default": "./src/screen-recording-transport.ts"
112112
},
113+
"./ios-node-interpretation": {
114+
"types": "./src/ios-node-interpretation.ts",
115+
"default": "./src/ios-node-interpretation.ts"
116+
},
113117
"./ios-snapshot-acquisition": {
114118
"types": "./src/ios-snapshot-acquisition.ts",
115119
"default": "./src/ios-snapshot-acquisition.ts"

‎scripts/layering/package-boundaries.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ test('the real tree parses, declares, and passes R11', () => {
485485
'@agent-device/capture-kit/durable-capture-runtime-recovery',
486486
'@agent-device/capture-kit/durable-capture/session-binding',
487487
'@agent-device/capture-kit/durable-json',
488+
'@agent-device/capture-kit/ios-node-interpretation',
488489
'@agent-device/capture-kit/ios-snapshot-acquisition',
489490
'@agent-device/capture-kit/ios-snapshot-engine',
490491
'@agent-device/capture-kit/ios-snapshot-planning',

‎scripts/layering/snapshot-assembly-presentation-policy.test.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,3 @@ test('R74 fails closed when the assembly moves out from under it', () => {
148148
[...SNAPSHOT_ASSEMBLY_FILES],
149149
);
150150
});
151-
152-
test('R74 accepts producer imports of raw iOS node acquisition facts', () => {
153-
const result = violations(
154-
appended(
155-
producerAdapter,
156-
`\nimport { interpretIosNode } from '@agent-device/capture-kit/ios-snapshot-acquisition';\nvoid interpretIosNode;\n`,
157-
),
158-
);
159-
assert.deepEqual(result, []);
160-
});

‎scripts/layering/snapshot-assembly-presentation-policy.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ export const SNAPSHOT_PRODUCER_ADAPTER_ROOTS: readonly string[] = [
3636

3737
/**
3838
* iOS presentation. The engine owns projection, geometry, scope, depth, actionability narrowing
39-
* and semantic compaction. Producer adapters can acquire shared raw-node facts but cannot present
40-
* them; the assembly cannot read either presentation or producer acquisition policy.
39+
* and semantic compaction; the acquisition module owns the producer capability table that decides
40+
* them. Reading either one from the assembly or from a producer adapter is how the deleted
41+
* backend-name policy grows back.
4142
*/
4243
const IOS_PRESENTATION_TARGETS: readonly string[] = [
4344
'packages/capture-kit/src/ios-snapshot-engine/',
45+
'packages/capture-kit/src/ios-snapshot-acquisition.ts',
4446
];
4547

4648
/**
@@ -82,9 +84,8 @@ function missingOwnerViolations(sources: ReadonlyMap<string, string>): LayeringV
8284
function importViolations(edges: readonly ResolvedImportEdge[]): LayeringViolation[] {
8385
const violations: LayeringViolation[] = [];
8486
for (const edge of edges) {
85-
const presentation = isIosPresentationTarget(edge.target);
86-
const acquisition = edge.target === 'packages/capture-kit/src/ios-snapshot-acquisition.ts';
87-
if (SNAPSHOT_ASSEMBLY_FILES.includes(edge.file) && (presentation || acquisition)) {
87+
if (!isIosPresentationTarget(edge.target)) continue;
88+
if (SNAPSHOT_ASSEMBLY_FILES.includes(edge.file)) {
8889
violations.push({
8990
rule: SNAPSHOT_ASSEMBLY_PRESENTATION_RULE,
9091
file: edge.file,
@@ -93,7 +94,7 @@ function importViolations(edges: readonly ResolvedImportEdge[]): LayeringViolati
9394
});
9495
continue;
9596
}
96-
if (isProducerAdapter(edge.file) && presentation) {
97+
if (isProducerAdapter(edge.file)) {
9798
violations.push({
9899
rule: SNAPSHOT_ASSEMBLY_PRESENTATION_RULE,
99100
file: edge.file,

0 commit comments

Comments
 (0)