Ack Gate
Path:
loom-sprint-scaffold/loom/src/execution/ack-gate.tsRelative: loom/src/execution/ack-gate.tsSubproject: loom-sprint-scaffoldCategory: otherLines: 94Bytes: 2,810Imports: 3Exports: 4
Content Preview
- /**
- * H3.1 — Ack Gate: wrap every tool result with obs_hash; enforce that the
- * NEXT assistant turn begins with `<ack obs="HASH">...</ack>`.
- *
- * Non-conforming turn → one corrective retry (system note naming the violation),
- * then emit trace event kind=gate_reject and count a step failure.
- */
- import { sha256Hex, newEventId } from "../lib/ids";
- import { createLogger } from "../lib/logger";
- import type {
- AckExpectation,
- ExecutionTraceEvent,
- Sha256Hex,
- ToolResultEntry,
- } from "../typ