refactor: derive event graphs and scope invariants from TypeScript

This commit is contained in:
imccyu
2026-07-14 23:14:51 +08:00
parent 174619929d
commit c67c3d9413
20 changed files with 938 additions and 248 deletions

View File

@@ -834,7 +834,7 @@ describe('scoped-dispatch invariants', () => {
it('accepts a matching carrier and rejects a mismatched one for EVERY agent-subject event', async () => {
const ctx = await scopedCtx()
// Real Session objects: the session-start tracker WeakSet-keys them.
// Real Session objects keep the synthetic Agent handles structurally valid.
const agent = { id: 'a1', session: new Session(SessionId('a1-s')) } as unknown as Agent
const other = { id: 'a2', session: new Session(SessionId('a2-s')) } as unknown as Agent
// One dispatch per table row keeps every subject extractor covered: the