Files
deepseek-harness/packages/support
Tianyi Cui 65d644b161 invariants: a loop-built request must be exactly what the log reconstructs
The dev-mode cross-check on llm/stream: a frozen request with a live
sessionId (the loop-built marker; hand-built one-shots stay unfrozen
and skipped) must carry messages deep-equal to the derivation over the
log prefix strictly before the in-flight step's step/start, and header
fields equal to the fold of the log's request/header* events. The
messages side rebuilds through a FRESH Session over the boundary
prefix — same projection code, zero shared state — so the live cache
cannot vouch for itself, and the seq-bounded rebuild is boundary-
correct: content appended after step/start (an agent/request-window
inject) legitimately belongs to the next request and cannot false-fire
the check. prepend:true only defends against the replay adapter's
short-circuit (append-registered); correctness never rests on listener
ordering. There is no divergence-allowance caveat: nothing can shape
request content outside the log.
2026-07-06 03:14:07 +08:00
..

support/ — dev/test/example infrastructure

Packages that exist to serve development, testing, and the examples rather than to ship as product API. They are real workspace packages (typed, tested, under the coverage gate), but they carry lower compatibility expectations: they may change or be removed when the development need behind them does, without the deprecation care a product package would warrant.

Package Role ctx key
invariants/ Dev-mode event-contract invariants + session-log freeze (listens on session/*, agent/*)
llm-replay/ Record/replay adapter: short-circuits llm/stream from a recorded session JSONL (keyless snapshot tests) (listens on llm/stream)
subagent-mock/ Scripted SubagentProvider for deterministic seam/tool tests (registers on ctx.subagents)

invariants runs only in dev mode (contract checks, not runtime behavior). llm-replay backs the demos and the snapshot test tier under the per-file coverage gate. subagent-mock exercises the real ctx.subagents load path without a model or child agent. A package graduates OUT of support/ into a product group only when it gains documented product consumers.