Parity Check

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/scripts/parity-check.tsRelative: loom/scripts/parity-check.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 170Bytes: 6,075Imports: 2Exports: 0

Content Preview

  1. #!/usr/bin/env bun
  2. /**
  3. * Parity Check — byte-stable decision log for LOOM monitor decision path.
  4. *
  5. * Replays a scripted trace through the monitor decision path and emits a
  6. * canonical JSON decision log (stable key order) to stdout.
  7. *
  8. * Usage:
  9. * bun run scripts/parity-check.ts
  10. *
  11. * The output is byte-stable across consecutive runs — pipe to a file and diff:
  12. * bun run scripts/parity-check.ts > /tmp/parity-1.json
  13. * bun run scripts/parity-check.ts > /tmp/parity-2.json
  14. * diff /tmp/