Spec Lint

loom-buildersourcetypescript
Path: loom-builder/src/spec_lint.tsRelative: src/spec_lint.tsSubproject: loom-builderCategory: dispatch-system
Lines: 234Bytes: 7,585Imports: 3Exports: 4

Content Preview

  1. /**
  2. * Spec-schema lint — validates DispatchSpec at preflight before dispatch.
  3. *
  4. * Checks:
  5. * - Unknown top-level keys (with list of valid keys)
  6. * - validation field must be array of objects with cmd (string[]) and optional cwd
  7. * - Rejects specs writing outputs under /tmp
  8. * - Missing validation → default [] + warning
  9. * - Gate ref format: "gates" must match vX.Y.Z/scope if present
  10. * - WARN (not FAIL) when spec has inline validation[] but no gates field (D4)
  11. * - Dynamic rules from gates/li