Skip to content

Commit d9019e1

Browse files
committed
chore(gates): colocate durable capture field owners
1 parent 3be0074 commit d9019e1

3 files changed

Lines changed: 9 additions & 17 deletions

File tree

‎scripts/layering/session-resource-ownership.test.ts‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,10 @@ test('session resources are constructed only by their durable domain owners', ()
2727
`sessionStore.update(ref, { appLog: log, appLogFailure: undefined });`,
2828
],
2929
[
30-
'src/daemon/audio-probe-session-binding.ts',
31-
`sessionStore.update(ref, { audioProbe: audio });`,
32-
],
33-
[
34-
'src/daemon/perf-capture-session-binding.ts',
35-
`sessionStore.update(ref, { perfCapture: perf });`,
36-
],
37-
[
38-
'src/daemon/screen-recording-session-binding.ts',
39-
`sessionStore.update(ref, { screenRecording: recording });`,
30+
'src/daemon/session-capture-binding.ts',
31+
`sessionStore.update(ref, { audioProbe: audio });
32+
sessionStore.update(ref, { perfCapture: perf });
33+
sessionStore.update(ref, { screenRecording: recording });`,
4034
],
4135
[
4236
'packages/capture-kit/src/capture-admission/audio-probe-session-resource.ts',

‎scripts/layering/session-resource-ownership.ts‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Catches: a session resource field (appLog, appLogFailure, audioProbe, perfCapture) written
1+
// Catches: a session resource field (appLog, appLogFailure, audioProbe, perfCapture, screenRecording) written
22
// from outside its declared owner module — R7's session-state-ownership shape applied to the
33
// narrower set of per-resource fields these session-scoped runtimes carry, where the same
44
// aliasing hazard (get()/set() hand back and re-put the live reference) applies.
@@ -27,15 +27,12 @@ const SCANNED_ROOTS = ['src/daemon/', 'packages/capture-kit/src/capture-admissio
2727
const RESOURCE_OWNERS: Readonly<Record<string, ReadonlySet<string>>> = {
2828
appLog: new Set(['src/daemon/app-log-session-resource.ts', 'src/daemon/session-state.ts']),
2929
appLogFailure: new Set(['src/daemon/app-log-session-resource.ts', 'src/daemon/session-state.ts']),
30-
audioProbe: new Set(['src/daemon/audio-probe-session-binding.ts', 'src/daemon/session-state.ts']),
30+
audioProbe: new Set(['src/daemon/session-capture-binding.ts', 'src/daemon/session-state.ts']),
3131
screenRecording: new Set([
32-
'src/daemon/screen-recording-session-binding.ts',
33-
'src/daemon/session-state.ts',
34-
]),
35-
perfCapture: new Set([
36-
'src/daemon/perf-capture-session-binding.ts',
32+
'src/daemon/session-capture-binding.ts',
3733
'src/daemon/session-state.ts',
3834
]),
35+
perfCapture: new Set(['src/daemon/session-capture-binding.ts', 'src/daemon/session-state.ts']),
3936
};
4037

4138
/** Durable session-resource records have one whole-record construction owner per domain. */

‎vitest.config.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ export default defineConfig({
178178
// decisions over fixture state-dir listings, so they need no daemon,
179179
// device, or subprocess.
180180
'test/integration/support/daemon-leak-model.test.ts',
181+
// Cleanup uses real detached registration owners and process-exit proof; no device is needed.
181182
'test/integration/support/daemon-test-cleanup.test.ts',
182183
// The Android failed-step evidence reader: it replays adb output through the probe
183184
// seam, so the crash/process/activity selectors need no emulator to be pinned.

0 commit comments

Comments
 (0)