You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1b92b01
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: scripts/layering/daemon-modularity.test.ts
+69Lines changed: 69 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ import { test } from 'node:test';
3
3
import{
4
4
checkDaemonModularityRatchets,
5
5
checkRetiredSessionLifecyclePaths,
6
+
checkRetiredSessionObservabilityPaths,
6
7
DAEMON_MODULARITY_BASELINE,
7
8
TYPE_CYCLE_BASELINE,
8
9
}from'./daemon-modularity.ts';
@@ -370,6 +371,50 @@ test('interaction rejects handler crossings and deep imports around its facade',
370
371
);
371
372
});
372
373
374
+
test('session observability rejects handler deep imports in both directions',()=>{
375
+
constedges=resolveImportEdges(
376
+
newMap([
377
+
[
378
+
'src/daemon/handlers/session.ts',
379
+
"import { handleSessionObservabilityCommands } from '../session-observability/internal/session-observability.ts';\nexport function handleSessionCommands() {}",
"import { handleSessionCommands } from '../../handlers/session.ts';\nexport function handleSessionObservabilityCommands() {}",
384
+
],
385
+
[
386
+
'src/daemon/session-observability/index.ts',
387
+
'export function handleSessionObservabilityCommands() {}',
388
+
],
389
+
]),
390
+
);
391
+
392
+
constviolations=checkDaemonModularityRatchets(
393
+
[...baselineEdges(), ...edges],
394
+
baselineTypeCycleMembers(),
395
+
);
396
+
assert.deepEqual(
397
+
violations.map(({ file, line, message })=>({
398
+
file,
399
+
line,
400
+
message: message.replace(/;.*/,''),
401
+
})),
402
+
[
403
+
{
404
+
file: 'src/daemon/handlers/session.ts',
405
+
line: 1,
406
+
message:
407
+
"src/daemon/handlers/session.ts must not import daemon-session-observability's internal tree (src/daemon/session-observability/internal/session-observability.ts)",
0 commit comments