deepseek-harness/packages/core/agent-loop/tests
Tianyi Cui abe80cec68 fix(loop): record a durable prompt/blocked for every vetoed prompt
Address review on the interception-seams PR: PromptDecision.reason is
documented as the durable record of why a prompt was blocked, but the loop
only surfaced it via the fully-blocked batch's `rejected` turn/end. In a MIXED
batch — one queued prompt blocked, another allowed — the turn does not end
`rejected`, so the blocked prompt and its reason vanished from the session log
entirely.

Add a `prompt/blocked` SessionEventMap variant (content + source + reason),
appended in the open turn at the veto point in place of the user/message the
prompt would have become. It is a non-surface, turn-enclosed event (like
todo/write): it never reaches deriveMessages(). The fully-blocked batch still
also ends `rejected` for boundary balance + ACP settlement. Regression test
drives a mixed batch and asserts the blocked prompt is recorded while the
allowed one runs — proven red without the append.
2026-07-02 17:03:53 +08:00
..
agent.spec.ts simplify(agent): drop the unused public Agent.abort(), keep whenIdle() 2026-06-21 09:05:21 +08:00
cancel.spec.ts Merge worktree-hooks-b-bash-seam into worktree-hooks-c-interception 2026-07-02 04:51:24 +08:00
config-session-id.spec.ts feat(types): brand bash ids + stop brand erosion; extract Branded to dsh-brand 2026-06-21 07:19:59 +08:00
coverage-edges.spec.ts refactor(events): remove the turn boundary mirror events 2026-07-02 03:26:45 +08:00
inbox.spec.ts Reorganize packages into a modular hierarchy 2026-06-20 22:55:20 +08:00
interception.spec.ts fix(loop): record a durable prompt/blocked for every vetoed prompt 2026-07-02 17:03:53 +08:00
loop.spec.ts Merge worktree-hooks-b-bash-seam into worktree-hooks-c-interception 2026-07-02 04:51:24 +08:00
mock-adapter.ts Reorganize packages into a modular hierarchy 2026-06-20 22:55:20 +08:00
properties.spec.ts feat(types): brand bash ids + stop brand erosion; extract Branded to dsh-brand 2026-06-21 07:19:59 +08:00
resume.spec.ts feat(events): interception seams — the typed-Decision surface for hooks 2026-06-30 17:11:18 +08:00
review-fixes.spec.ts Merge worktree-hooks-b-bash-seam into worktree-hooks-c-interception 2026-07-02 04:51:24 +08:00