Step 2 · One small roster·Proof GatesPT-BR
Evidence-first model routing · Visual course

Proof Gates

A configured role is not a result. Cross the real boundary, keep the matching receipt, and report any remaining blocker.

Read first (primary source)
Your Machine Keeps the Most Honest Record of You

The evidence workflow prefers logs, timestamps, and diffs over self-description. This lesson applies that rule to model routing.

By the end, you can

  • separate configuration proof from runtime proof
  • recognize fail-closed behavior
  • report a blocked boundary without overclaiming
Start simple; open the technical layer only when useful.
1

The big idea


Every claim needs a matching receipt. A unit test proves the mapping; a real command proves startup behavior; a container run proves the sandbox boundary it actually crossed.

Think of airport gates. A boarding pass gets you to a gate, not to your destination. The analogy breaks because software gates can be replayed deterministically.

In the code

The isolated alembic-proof profile built the Factory image, then a network-isolated container ran Claude Code 2.1.211 and Codex 0.140.0. Role-scoped tests verify that the runtime builds separate Claude and Codex credential maps; their names were not re-inspected inside the container. This proves the image and CLIs at the container boundary plus mapping at the test boundary—not a full authenticated Factory model turn.

2

In one picture


configurationfail closed real commandreal path workspace tests1,865 passed Dockerproven Each boundary keeps its own receipt; one green gate cannot substitute for another.
Docker is green because the image and both in-container CLIs actually ran.
3

In the code


packages/factory/src/FactoryRuntime.ts
const parsed = factoryEnvironmentSchema.safeParse(env);
if (!parsed.success) {
  const field = parsed.error.issues[0]?.path[0];
  return failure(
    `Missing required Factory environment variable: ${String(field ?? "unknown")}`,
  );
}

How to find or run this

FACTORY_CLIPROXY_URL= FACTORY_CLIPROXY_TOKEN= GH_TOKEN= pnpm exec tsx .factory/run.ts exits before any container or model call.

4

Try it


Toggle the two receipts. The simulator allows a ready claim only when both are present.

Boundary claim simulator

Ready to claim the Docker CLI boundary.

Both receipts are present.

Blocked boundary remains.

Report what passed and name what did not.

Flip the three cards, commit a prediction, then take the check.

1,865 tests passed. Is Docker proven?
No. Tests and Docker are different boundaries.
What does fail closed mean?
Stop before a model call or write when required wiring is absent.
What is a receipt?
A command, result, log, or artifact tied to the claim.
The image and CLIs ran, but no authenticated gateway turn ran. What is the honest status?
The Docker CLI boundary is proven; a full authenticated Factory turn is not claimed.
Which report is evidence-first?
Evidence-first reporting names both the crossed boundary and the narrower boundary that was not exercised.
Next: apply the same honesty rule to a local DeepSeek route.

Sources and receipts