#execution

18 files tagged execution.

loom-sprint-scaffoldtest

Budget Governor.Test

/** * Tests for budget-governor (H3.6). * * Proves: * - all 3 hard cap types (calls, tokens, wallclock) are enforced…

TS190 lines6,388 bytes
loom-sprint-scaffoldtest

Reinjector.Test

/** * Tests for reinjector (H3.4). * * Proves: * - normalizeObservation truncates content exceeding obs_cap_tokens …

TS167 lines5,612 bytes
loom-sprint-scaffoldtest

Model Client.Test

/** * Tests for model-client (H3.0). * * Proves: * - createAnthropicModelCaller returns a callable ModelCaller * - …

TS349 lines10,934 bytes
loom-sprint-scaffoldtest

Reversibility Gate.Test

/** * Tests for reversibility-gate (H3.3). * * Proves: * - allowlist lookup accepts allowed tools and denies unknown…

TS203 lines6,855 bytes
loom-sprint-scaffoldtest

Conf Monitor.Test

/** * Tests for conf-monitor (H3.5). * * Proves: * - extractConf finds trailing JSON line `{"conf": 0.8}` in assista…

TS159 lines5,452 bytes
loom-sprint-scaffoldtest

Harness.Test

/** * Integration tests for harness (runStage). * * Proves every StageTermination kind is reachable: * DONE | GATE_R…

TS612 lines20,705 bytes
loom-sprint-scaffoldtest

Preflight.Test

/** * Tests for preflight (H3.7). * * Proves: * - clean files (no markers) pass * - every marker (TODO, FIXME, <<<<…

TS133 lines4,732 bytes
loom-sprint-scaffoldtest

Ack Gate.Test

/** * Tests for ack-gate (H3.1). * * Proves: * - wrapResult produces deterministic hex hash from tool result * - ch…

TS162 lines5,577 bytes
loom-sprint-scaffoldtest

Loop Detector.Test

/** * Tests for loop-detector (H3.2). * * Proves: * - the identical action halts at exactly the 3rd occurrence (not …

TS152 lines5,256 bytes
loom-sprint-scaffoldsource

Loop Detector

/** * H3.2 — Loop Detector: actionHash(tool, args) via src/lib/ids.ts; * ring buffer W=10; ≥3 identical in window → HA…

TS96 lines2,531 bytes
loom-sprint-scaffoldsource

Preflight

/** * H3.7 — Preflight: before any recoverable|destructive action, scan a provided * list of staged file contents for …

TS84 lines2,426 bytes
loom-sprint-scaffoldsource

Budget Governor

/** * H3.6 — Budget Governor: hard caps B_tokens / B_calls / B_wallclock_ms from * the envelope. Breach → graceful sus…

TS142 lines3,640 bytes
loom-sprint-scaffoldsource

Conf Monitor

/** * H3.5 — Confidence Monitor: every assistant turn must include conf ∈ [0,1] * (schema-enforced; extract from a tra…

TS108 lines3,011 bytes
loom-sprint-scaffoldsource

Reinjector

/** * H3.4 — Reinjector: normalize observations. Truncate to per-tool obs_cap_tokens * from the envelope; store full t…

TS98 lines2,802 bytes
loom-sprint-scaffoldsource

Reversibility Gate

/** * H3.3 — Reversibility Gate: every tool call checked against the envelope * allowlist. Each allowlist entry has re…

TS136 lines3,886 bytes
loom-sprint-scaffoldsource

Model Client

/** * H3.0 — Fetch-based Anthropic Messages API client. * workerd-compatible: plain fetch, NO node SDK, no node:* impo…

TS93 lines2,958 bytes
loom-sprint-scaffoldsource

Ack Gate

/** * H3.1 — Ack Gate: wrap every tool result with obs_hash; enforce that the * NEXT assistant turn begins with `<ack …

TS94 lines2,810 bytes
loom-sprint-scaffoldsource

Harness

/** * H3 — Harness: runStage(envelope, modelCaller, deps): Promise<StageResult> * composing all monitors around the to…

TS357 lines13,236 bytes