fix inbox lifecycle downstream contracts

This commit is contained in:
_Kerman
2026-07-31 22:00:39 +08:00
parent 8e88b17c9f
commit afedf18ccf
219 changed files with 5660 additions and 4556 deletions

View File

@@ -103,7 +103,7 @@ describe('hooks-codex bridge', () => {
expect(adapter.requests).toHaveLength(2)
expect(JSON.stringify(adapter.requests[1]!.messages)).toContain('keep going: address the goal')
})
}, 15_000) // Two real hook subprocesses and agent steps need startup and teardown headroom under load.
it('turn cancellation aborts and reaps a running UserPromptSubmit hook before idle', async () => {
const dir = configDir()

View File

@@ -199,7 +199,7 @@ export function defineCoverageCases(groups: CoverageGroup | readonly CoverageGro
expect(result?.type === 'tool/result' && result.data.message.content[0].isError).toBe(true)
expect(result?.type === 'tool/result' && result.data.message.content[0].content.some(b => b.type === 'text' && b.text.includes('downstream-block'))).toBe(true)
expect(events(agent).some(e => e.type === 'user/message' && e.data.source.kind !== 'user' && e.data.content.some(b => b.type === 'text' && b.text.includes('bridge-note')))).toBe(true)
})
}, 10_000) // The real hook subprocess needs startup and teardown headroom under full-suite contention.
it('SessionStart additionalContext is injected for the first request', async () => {
const d = dir()