fix(pty-local): expect sessionId in resolved policy after merge-forward

Master's pty-local rewrite dropped the sessionId expectation from the
resolved-policy contract; sandbox-policy resolve() injects the owner
sessionId (sandbox branch design). Restore it in both expectations.
This commit is contained in:
Huanqi Cao
2026-08-09 01:56:53 +08:00
parent 97a62fa639
commit 2bfc8273ee

View File

@@ -215,7 +215,7 @@ describe('LocalPtyBackend startup rollback', () => {
expect(initialized).toHaveBeenCalledWith(undefined) expect(initialized).toHaveBeenCalledWith(undefined)
expect((ctx.sandbox as RecordingSandbox).calls).toEqual([{ expect((ctx.sandbox as RecordingSandbox).calls).toEqual([{
argv: ['/bin/bash', '-i'], argv: ['/bin/bash', '-i'],
policy: { mode: 'workspace-write', workspaceRoot: '/workspace' }, policy: { mode: 'workspace-write', sessionId: 'agent', workspaceRoot: '/workspace' },
}]) }])
}) })
@@ -247,7 +247,7 @@ describe('LocalPtyBackend startup rollback', () => {
}) })
expect((ctx.sandbox as RecordingSandbox).calls).toEqual([{ expect((ctx.sandbox as RecordingSandbox).calls).toEqual([{
argv: ['/bin/bash', '-i'], argv: ['/bin/bash', '-i'],
policy: { mode: 'workspace-write', workspaceRoot: '/session-workspace' }, policy: { mode: 'workspace-write', sessionId: 'agent', workspaceRoot: '/session-workspace' },
}]) }])
}) })