Envelope Compiler.Test
Path:
loom-sprint-scaffold/loom/tests/dispatcher/envelope-compiler.test.tsRelative: loom/tests/dispatcher/envelope-compiler.test.tsSubproject: loom-sprint-scaffoldCategory: testsLines: 262Bytes: 10,508Imports: 6Exports: 0has tests
Content Preview
- /**
- * Tests for EnvelopeCompiler (H2.2 + H2.3).
- *
- * Proves:
- * - compiled envelope validates against dispatch-envelope.schema.json
- * - allowlist excludes undeclared tools (only tools for the stage's variety_class)
- * - every allowlisted tool carries a reversibility stamp
- * - budget scaling with cost multiplier and deficit widening (exact 1.5×)
- * - dispatch_id is deterministic hash of goal_id, stage_id, attempt
- * - ContractViolationError on invalid output
- */
- import { describe, expect, te