Exit Matrix.Test

loom-buildertesttypescript
Path: loom-builder/src/exit_matrix.test.tsRelative: src/exit_matrix.test.tsSubproject: loom-builderCategory: dispatch-system
Lines: 154Bytes: 5,568Imports: 3Exports: 0has tests

Content Preview

  1. import { describe, test, expect } from "bun:test";
  2. import { exitToVerdict, isRetryable, canBeDone, retryBackoffMs } from "./exit_matrix.js";
  3. import { lintSpec } from "./spec_lint.js";
  4. describe("exit_matrix — verdict mapping", () => {
  5. test("exit 0 → COMPLETE", () => {
  6. expect(exitToVerdict(0, null)).toBe("COMPLETE");
  7. });
  8. test("exit -1 → RETRYABLE (bug case from task)", () => {
  9. expect(exitToVerdict(-1, null)).toBe("RETRYABLE");
  10. });
  11. test("exit 1 → RETRYABLE", () => {
  12. expect(ex