deepseek-harness/packages/core/agent-loop/tests
creatixchu 87f24bb991 fix(agent-loop): mark finalized prefixes durable-interrupted; never finalize failed attempts
Review round findings:

- Clear the streaming attempt before the request-error waterfall: a cancel
  landing during recovery (typically the llm/retry backoff, after clients
  reset the streamed rendering) must not resurrect the failed stream's
  prefix. Provider failures commit nothing, now including that window.
- Record interrupted: true on the cancellation-finalized assistant/message.
  The chat projection keeps the settled prefix classified as interrupted
  (Stopped chip, restored web goldens), and request inspection leaves the
  request uncompleted so the step boundary classifies it as before.
- Pin the recovery-window and retry-discard semantics with content-bearing
  failed streams in cancel.spec; update the ACP late-end expectation to the
  finalized-prefix transcript.
- Mention interruptedBlocks() in the assembler stream-lifecycle JSDoc.
2026-08-10 13:10:43 +08:00
..
agent-initiator.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
agent.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
cancel.spec.ts fix(agent-loop): mark finalized prefixes durable-interrupted; never finalize failed attempts 2026-08-10 13:10:43 +08:00
config-session-id.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
contract-regressions.spec.ts docs: replace vague provenance prose with recorded facts 2026-08-09 15:35:02 +08:00
coverage-edges.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
interception.spec.ts docs: reserve seam for complete capabilities 2026-08-09 17:26:57 +08:00
invariant.spec.ts fix: commit step context before request dispatch 2026-07-30 18:18:04 +08:00
loop.spec.ts docs: call waterfall interception short-circuiting 2026-08-09 13:13:37 +08:00
mock-adapter.ts feat(agent-loop): finalize a cancelled stream's delivered prefix 2026-08-10 12:21:44 +08:00
properties.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
request-cache.e2e.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
request-error.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
request-reconstruction.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
resume.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
runtime-context.spec.ts Merge remote-tracking branch 'origin/worktree/context-source-cards' into worktree/context-forms-remaining 2026-08-06 11:49:03 +08:00
scope-lifecycle.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
tool-calls.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00
tool-order.spec.ts refactor(agent): unify agent-scoped event signatures as payload objects 2026-08-06 12:13:14 +08:00