deepseek-harness/packages/core/agent-loop/tests
Yichen Jiang 77333c0a19 fix(agent): correct session-prefix composition-order docs; scrub messagePrefix in snapshots
Two ds-review-bot findings:

The seam JSDoc claimed extending 'await next()' composes in
registration order — false for the append form: the waterfall unwinds
innermost-first, so appending places later-registered contributions
first. The canonical contribution is now documented as the PREPEND
'[mine, ...await next()]' (registration order on the wire), with the
append form's reverse-order behavior stated explicitly; the ordering
test now uses the canonical pattern in both listeners.

scrubRequestHeaders tokenized only system/tools, so a fixture recording
a composed session prefix would carry its raw text (workspace-specific
churn/leak). The scrubber now maps each header/delta messagePrefix
entry to a {{messagePrefix}} token — count stays a structural fact,
absence stays absent, the empty-array transition stays visible — with
normalize.spec coverage for the header, delta, absence, and odd-shape
paths.
2026-07-08 16:16:08 +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 refactor(events): remove the agent/stream-chunk mirror of assistant/chunk 2026-07-02 23:42:16 +08:00
config-session-id.spec.ts review: the persona becomes the system-prompt plugin's deployment config 2026-07-05 23:23:46 +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(agent): correct session-prefix composition-order docs; scrub messagePrefix in snapshots 2026-07-08 16:16:08 +08:00
loop.spec.ts loop: every request is built from the log — boundary snapshot, header events, config-only waterfall 2026-07-06 03:07:34 +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
request-cache.e2e.ts loop: every request is built from the log — boundary snapshot, header events, config-only waterfall 2026-07-06 03:07:34 +08:00
request-log.spec.ts loop: every request is built from the log — boundary snapshot, header events, config-only waterfall 2026-07-06 03:07:34 +08:00
request-reconstruction.spec.ts fix review findings: one frozen seed through the waterfall; stale agent/request docs 2026-07-06 04:17:29 +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 loop: every request is built from the log — boundary snapshot, header events, config-only waterfall 2026-07-06 03:07:34 +08:00
tool-order.spec.ts fix(system-prompt): reject a toolOrder that names an unregistered tool 2026-07-07 20:49:42 +08:00