Tests

65 files

pi-cybernetictest

Test Gate Governance

#!/usr/bin/env python3 """test_gate_governance.py — N10 discipline applied to the governance system. Every enforcement …

PY238 lines11,790 bytes
loom-sprint-scaffoldtest

Retry.Test

import { describe, expect, test } from "bun:test"; import { withRetry } from "../src/lib/retry"; import { RetryExhausted…

TS66 lines2,287 bytes
loom-sprint-scaffoldtest

Tsconfig

{ "extends": "../tsconfig.json", "compilerOptions": { "types": ["bun-types", "@cloudflare/workers-types"], "…

{}14 lines508 bytes
loom-sprint-scaffoldtest

Ids.Test

import { describe, expect, test } from "bun:test"; import { actionHash, canonicalJSON, dispatchId, newEventId, newGoalId…

TS47 lines1,923 bytes
loom-sprint-scaffoldtest

Contracts.Test

import { describe, expect, test } from "bun:test"; import { parseContract, checkContract, isContractName } from "../src/…

TS81 lines3,573 bytes
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-scaffoldtest

Dataset Emitter.Test

/** * Tests for H5.6 — Dataset Emitter. * * Proves: * - extractDatasetTuples extracts (failure_pattern, root_cause…

TS245 lines8,772 bytes
loom-sprint-scaffoldtest

Fixtures

/** * Synthetic trace corpus for Loop 5 synthesis tests. * ~50 enriched trace events covering failures, successes, rep…

TS264 lines11,826 bytes
loom-sprint-scaffoldtest

Failure Clusterer.Test

/** * Tests for H5.1 — Failure Clusterer. * * Proves: * - normalizeErrorSignature strips ids, paths, numbers deter…

TS200 lines7,278 bytes
loom-sprint-scaffoldtest

Skill Proposer.Test

/** * Tests for H5.2 — Skill Proposer. * * Proves: * - extractSuccessfulSequences groups tool calls by dispatch *…

TS206 lines7,692 bytes
loom-sprint-scaffoldtest

Registry Updater.Test

/** * Tests for H5.3 — Registry Updater. * * Proves: * - computeModeStats groups correctly by (model, harnessProfi…

TS208 lines7,132 bytes
loom-sprint-scaffoldtest

Report.Test

/** * Integration test for the full synthesis report pipeline. * * Proves: * - Synthetic trace corpus → determinis…

TS184 lines6,142 bytes
loom-sprint-scaffoldtest

Entropy Monitors.Test

/** * Tests for H5.4 — Entropy Monitors. * * Proves: * - Shannon entropy computed correctly with natural log (hand…

TS191 lines6,905 bytes
loom-sprint-scaffoldtest

Isolation.Test

/** * Isolation test for src/synthesis/. * * Enforces at the grep level: * 1. No import from src/orchestrator/, sr…

TS132 lines4,331 bytes
loom-sprint-scaffoldtest

Revision Governor.Test

/** * Tests for H5.5 — Revision Governor. * * Proves: * - Caps proposals at maxSkillProposals (default 5) * - N…

TS170 lines5,880 bytes
loom-sprint-scaffoldtest

Mode Registry.Test

/** * Tests for ModeRegistry (H2.1). * * Proves: * - unknown variety_class → highest-capability mode + variety_defic…

TS198 lines6,916 bytes
loom-sprint-scaffoldtest

Envelope Compiler.Test

/** * Tests for EnvelopeCompiler (H2.2 + H2.3). * * Proves: * - compiled envelope validates against dispatch-envelop…

TS262 lines10,508 bytes
loom-sprint-scaffoldtest

Probe Planner.Test

/** * Tests for ProbePlanner (H2.5). * * Proves: * - api_integration + no behavior model → probe prepended (recovera…

TS197 lines7,246 bytes
loom-sprint-scaffoldtest

Dlq Escalator.Test

/** * Tests for DlqEscalator (H2.4). * * Proves: * - DLQ letter → escalation POST with correct payload (goal_id, sta…

TS151 lines5,483 bytes
loom-sprint-scaffoldtest

Context Assembler.Test

/** * ContextAssembler tests (H4.1). * * Proves: * - Budget NEVER exceeded: table-driven over budgets {0, tiny, ex…

TS245 lines8,542 bytes
loom-sprint-scaffoldtest

Compactor.Test

/** * Compactor tests (H4.5). * * Proves: * - Compactor output records all validate against memory-record.schema.j…

TS178 lines6,156 bytes
loom-sprint-scaffoldtest

Scope Wall.Test

/** * ScopeWall tests (H4.3). * * Proves: * - Same-scope read works (constructor requires scope) * - Cross-scop…

TS266 lines8,984 bytes