The snapshot tier's machinery leaves examples/acp-agent/tests for
packages/support/acp-snapshot (@deepseek-ai/dsh-acp-snapshot), where the
coverage gate measures it and a second example can consume it instead of
forking it: harness.ts (runScenario, parameterized by an AgentUnderTest
{binScript, configPath, tsconfigPath} instead of module constants),
normalize.ts (moved verbatim), and suite.ts (defineAcpSnapshotSuite — the
per-scenario golden/log compares, record write-back, per-suite header pin
with its uniformity guard, and the fixture guard block, lifted from
acp.snapshot.ts). The example file collapses to its scenario table plus
one factory call; env reading (DSH_SNAPSHOT) stays at that edge.
The exactly-one-pin meta-test generalizes from the hardcoded text-turn
name to "exactly one per suite" — which scenario pins is the scenario
table's reviewable choice (per-suite pinning per the proposal RFC).
Extraction parity: pnpm run test:snapshot is 36 passed + fs-policy-reject
failing BEFORE AND AFTER (BSD-sed environment failure, reproduced at the
base commit in a clean worktree — the recorded golden's sed -i syntax is
GNU-only), with zero byte changes under examples/acp-agent/tests/snapshots/.
Coverage for the new src files lands in the next commit.
1.5 KiB
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 |
|---|---|---|
acp-snapshot/ |
ACP snapshot suite kit: subprocess scenario harness + golden normalizers + the defineAcpSnapshotSuite factory |
(library — imported by example *.snapshot.ts suites) |
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. acp-snapshot carries the snapshot tier's harness/normalizer/suite machinery so every example's suite is a scenario table over one shared, gate-covered implementation. 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.