Dispatch Archive.Test

loom-buildertesttypescript
Path: loom-builder/src/dispatch-archive.test.tsRelative: src/dispatch-archive.test.tsSubproject: loom-builderCategory: dispatch-system
Lines: 87Bytes: 3,621Imports: 4Exports: 0has tests

Content Preview

  1. /**
  2. * Structural proof of the Dispatch Artifact Contract across paths.
  3. * Asserts: on BOTH normal completion AND a SIGTERM kill, a FULL UNTRUNCATED payload.json
  4. * lands in DISPATCH_ARCHIVE/latest. Hermetic — no real provider calls; uses stub commands.
  5. */
  6. import { afterEach, beforeEach, expect, test } from "bun:test";
  7. import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
  8. import { tmpdir } from "node:os";
  9. import { join } from "node:path";
  10. const ARCHIVER = join