Skip to content

Commit 5e88063

Browse files
committed
chore(gates): settle self-review findings on the package base
Dead oxlint override for a file deleted before this stack, the vacuous device-lane fixture pin (now asserts the fixture exists, at its path in this tree), the R81 helpers that never needed to leave their module, and the closure-probe hops that follow the interaction routes and replay probes into their layer folders. (cherry picked from commit baebba2; the ime-capture fixture pin tracks its 11b home under packages/platform-android/src/fixtures/)
1 parent 665850c commit 5e88063

6 files changed

Lines changed: 29 additions & 22 deletions

File tree

‎oxlint.config.ts‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,6 @@ export default defineConfig({
133133
'unicorn/prefer-string-replace-all': 'off',
134134
},
135135
},
136-
{
137-
files: [
138-
'packages/daemon/src/replay/internal/__tests__/session-replay-target-verification-runtime.test.ts',
139-
],
140-
rules: {
141-
'unicorn/prefer-string-raw': 'off',
142-
},
143-
},
144136
{
145137
files: ['scripts/maestro-conformance/corpus/authored/runscript.js'],
146138
globals: {

‎scripts/check-affected/device-lanes.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// a tooling change beside it still fails open to the full set.
44

55
import assert from 'node:assert/strict';
6+
import fs from 'node:fs';
67
import { test } from 'node:test';
78
import { deviceLaneLeaf, deviceLanesFor, isDeviceLaneSurface, isUnitTest } from './device-lanes.ts';
89
import { selectChecks, type CheckId } from './model.ts';
@@ -137,7 +138,11 @@ test('unit tests under src/ and packages/*/src own no lane', () => {
137138
assert.deepEqual(lanes(file), [], file);
138139
}
139140
// Non-TypeScript under __tests__ is a fixture the selector cannot place, not a unit test.
140-
assert.ok(!isUnitTest('packages/platform-android/src/android-ime-capture.raw.json'));
141+
// The existence pin keeps this from going vacuous when the fixture moves again: a path that
142+
// no longer exists satisfies !isUnitTest for the wrong reason.
143+
const imeFixture = 'packages/platform-android/src/fixtures/android-ime-capture.raw.json';
144+
assert.ok(fs.existsSync(imeFixture), imeFixture);
145+
assert.ok(!isUnitTest(imeFixture));
141146
// Package tests outside src/ have no owner and keep failing open.
142147
assert.ok(!isUnitTest('packages/maestro/test/conformance/verify.test.ts'));
143148
assert.equal(

‎scripts/layering/architecture-ownership.ts‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,29 @@ export const LOGICAL_MODULE_POLICIES = [
141141
{
142142
name: 'daemon-session-lifecycle',
143143
roots: ['packages/daemon/src/sessions/session-lifecycle/'],
144-
forbiddenTargetRoots: ['packages/daemon/src/sessions/handlers/', 'packages/daemon/src/execution/handlers/'],
144+
forbiddenTargetRoots: [
145+
'packages/daemon/src/sessions/handlers/',
146+
'packages/daemon/src/execution/handlers/',
147+
],
145148
facade: DAEMON_SESSION_LIFECYCLE_FACADE,
146149
},
147150
{
148151
name: 'daemon-interaction',
149152
roots: ['packages/daemon/src/execution/interaction/'],
150153
forbiddenTargetRoots: [],
151-
internalForbiddenTargetRoots: ['packages/daemon/src/sessions/handlers/', 'packages/daemon/src/execution/handlers/'],
154+
internalForbiddenTargetRoots: [
155+
'packages/daemon/src/sessions/handlers/',
156+
'packages/daemon/src/execution/handlers/',
157+
],
152158
facade: DAEMON_INTERACTION_FACADE,
153159
},
154160
{
155161
name: 'daemon-session-observability',
156162
roots: ['packages/daemon/src/sessions/session-observability/'],
157-
forbiddenTargetRoots: ['packages/daemon/src/sessions/handlers/', 'packages/daemon/src/execution/handlers/'],
163+
forbiddenTargetRoots: [
164+
'packages/daemon/src/sessions/handlers/',
165+
'packages/daemon/src/execution/handlers/',
166+
],
158167
facade: DAEMON_SESSION_OBSERVABILITY_FACADE,
159168
},
160169
] as const satisfies readonly LogicalModulePolicy[];

‎scripts/layering/session-authority-overlay.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ export function measureSessionAuthorityOverlay(
6363
) {
6464
shape.add(edge.file);
6565
}
66-
if (
67-
SESSION_STORE_AUTHORITY_TARGETS.has(edge.target) &&
68-
edge.symbols.includes('SessionStore')
69-
) {
66+
if (SESSION_STORE_AUTHORITY_TARGETS.has(edge.target) && edge.symbols.includes('SessionStore')) {
7067
authority.add(edge.file);
7168
}
7269
}

‎src/__tests__/daemon-composition/replay-coordinator-ownership.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,10 @@ test('coordinator ownership scanning catches aliases, namespaces, and dynamic im
395395
void import('../../session-replay-coordinator.ts');
396396
`;
397397
assert.deepEqual(
398-
coordinatorConstructionSites('packages/daemon/src/sessions/replay/internal/probe.ts', source).map(
399-
({ kind }) => kind,
400-
),
398+
coordinatorConstructionSites(
399+
'packages/daemon/src/sessions/replay/internal/probe.ts',
400+
source,
401+
).map(({ kind }) => kind),
401402
['call', 'call', 'dynamic-import'],
402403
);
403404
});

‎src/__tests__/daemon-composition/request-handler-chain.test.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,18 @@ test('route owner files match the production module loaders', () => {
9898
);
9999

100100
assert.equal(definitions.length + 1, Object.keys(ownerFiles).length);
101+
// The loaders are relative to the chain module, which lives in a layer folder; resolve them
102+
// the same way the runtime does instead of assuming the package root.
103+
const CHAIN_DIR = 'packages/daemon/src/sessions/';
101104
for (const [, route, modulePath] of definitions) {
102105
assert.ok(route && modulePath);
103106
assert.equal(
104107
ownerFiles[route as keyof typeof ownerFiles],
105-
`packages/daemon/src/${modulePath.slice(2)}`,
108+
path.posix.normalize(`${CHAIN_DIR}${modulePath}`),
106109
);
107110
}
108111
assert.ok(genericModulePath && genericRouteMatches);
109-
assert.equal(ownerFiles.generic, `packages/daemon/src/${genericModulePath.slice(2)}`);
112+
assert.equal(ownerFiles.generic, path.posix.normalize(`${CHAIN_DIR}${genericModulePath}`));
110113

111114
assert.ok(
112115
!/ownerFile/.test(source),
@@ -153,7 +156,7 @@ test('interaction facade keeps route implementations out of its eager import clo
153156
for (const routeModule of ['find.ts', 'interaction.ts']) {
154157
const routePath = path.resolve(
155158
import.meta.dirname,
156-
`../../../packages/daemon/src/interaction/internal/${routeModule}`,
159+
`../../../packages/daemon/src/execution/interaction/internal/${routeModule}`,
157160
);
158161
assert.equal(
159162
fs.existsSync(routePath),

0 commit comments

Comments
 (0)