mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
fix review findings: one frozen seed through the waterfall; stale agent/request docs
Codex diff review, round 1, two (A) findings: - The agent/request fallback resolved the RAW seed object — on later steps the session's cached header fold — so a delegating listener (await next(), mutate, return) could rewrite the fold in place and the change would compare as already-baseline: no delta logged, the persisted log unable to reconstruct the request (the dev invariant would fire on the divergence, but the log would still lie). One structuredClone'd, deep-frozen seed now serves both the listener chain and the fallback — in-place shaping after delegation throws — and Session.requestHeader() freezes its fold on update, so the leak class is unrepresentable from either side. Pinned by a loop-level delegating-mutator test. - Doc sweep for the old contract: agent README's event row (mutate GenerateOptions / tool filtering → frozen config seed, replacement out, logged header), compact-basic's module JSDoc (summarize routed through agent/request → direct one-shot at llm/stream), and architecture.md's event-domain line (request mutation → call-config shaping).
This commit is contained in:
@@ -9,9 +9,10 @@
|
||||
* to the next balanced tool-pairing boundary so a compacted region never
|
||||
* splits a step's tool-call/result pair (an open tail step is never crossed —
|
||||
* compaction declines and retries once it closes).
|
||||
* - **Summarization** — `ctx.llm.stream()` assembled via `BlockAssembler`
|
||||
* (the single model-call surface; same path the loop uses) with a fixed
|
||||
* condense-the-history system prompt routed through `agent/request`.
|
||||
* - **Summarization** — a direct one-shot `ctx.llm.stream()` call assembled
|
||||
* via `BlockAssembler` with a fixed condense-the-history system prompt;
|
||||
* NOT a loop step, so `agent/request` never fires — interception happens
|
||||
* at `llm/stream` like any other direct call.
|
||||
* - **Surface mutation** — a single `user/message` replace node carries the
|
||||
* summary; `compact/*` events are log-only lock + provenance records.
|
||||
* - **Auto-compaction** — an `agent/pre-step` listener delegates to
|
||||
|
||||
Reference in New Issue
Block a user