Skip to content

Repository files navigation

ProofGate

Evidence before action.

A read-only release and experiment control room built with concurrent Mozaik agents.

CI Node.js Mozaik License: MIT

ProofGate asks three independent agents to inspect build integrity, release policy, and experiment safety at the same time. Their typed observations enter a shared event ledger and a deterministic attestor returns one of only two outcomes:

  • BLOCKED — evidence is missing, invalid, unavailable, or explicitly failing.
  • READY_FOR_HUMAN — every required check passed; a person still owns the release decision.

Important

ProofGate never deploys, rolls back, changes a flag, or writes to production. It prepares evidence for a human decision.

Why concurrency is the point

This is not a sequential pipeline presented as a group of agents. Three createAgent participants are created and joined first; a single case.announced event then starts an independent Mozaik runLoop on each one. Every loop reads its own evidence source and publishes events while the others remain in flight.

ProofGate records every loop ID and reports concurrencyObserved: true only when all three distinct loops started before the first inference completed. A slow or failed participant remains visible and closes the gate instead of silently disappearing.

flowchart LR
    H[Human operator] -->|selects synthetic case| C[ProofGate controller]
    C -->|case.announced| B[Build evidence agent]
    C -->|case.announced| P[Policy evidence agent]
    C -->|case.announced| E[Experiment evidence agent]

    subgraph M[Mozaik runtime]
        B -->|typed observation| L[(Shared event ledger)]
        P -->|typed observation| L
        E -->|typed observation| L
        L --> A[Deterministic attestor]
    end

    A -->|missing, failed, invalid| X[BLOCKED]
    A -->|all required evidence passes| R[READY_FOR_HUMAN]
    R --> H
    X --> H
Loading

One evaluation, end to end

sequenceDiagram
    autonumber
    actor Human
    participant Controller
    participant Build as Build agent
    participant Policy as Policy agent
    participant Experiment as Experiment agent
    participant Ledger
    participant Attestor

    Human->>Controller: Run proof case
    Controller->>Ledger: case.announced
    par Independent Mozaik loops overlap
        Controller->>Build: runLoop
        Build->>Ledger: evidence.observed
    and
        Controller->>Policy: runLoop
        Policy->>Ledger: evidence.observed or participant.failed
    and
        Controller->>Experiment: runLoop
        Experiment->>Ledger: evidence.observed
    end
    Ledger->>Attestor: validated typed evidence
    Attestor-->>Human: BLOCKED or READY_FOR_HUMAN
Loading

Judge quick start

Requires Node.js 20 or newer.

git clone https://github.com/fortemate/proofgate.git
cd proofgate
npm ci
npm run check
npm run build
npm start

Open http://127.0.0.1:4173, choose a scenario, and select Run concurrent evaluation.

For a terminal-only run:

npm run demo -- ready
npm run demo -- blocked
npm run demo -- failure

Add --json to inspect the redacted event timeline, evidence contract, case digest, and three loop IDs:

npm run demo -- ready --json

Demo scenarios

Fixture What happens Expected verdict
ready All three evidence checks pass READY_FOR_HUMAN
blocked The experiment guardrail fails BLOCKED
failure The policy evidence tool is unavailable BLOCKED

All scenarios are deterministic and synthetic. Running them needs no model API key, production credential, registry access at runtime, or private Fortemate data.

Trust model

The agent participants coordinate work, but they do not decide the gate. The attestor reads validated tool output rather than natural-language answers.

Each observation contains its evidence role and the SHA-256 digest of the proof case. Invalid JSON, an unexpected schema, the wrong digest, a failed check, a tool error, missing evidence, or a timeout all produce BLOCKED.

stateDiagram-v2
    [*] --> Collecting: case.announced
    Collecting --> Collecting: evidence.observed
    Collecting --> Collecting: participant.failed
    Collecting --> Blocked: required evidence fails
    Collecting --> Blocked: source fails or times out
    Collecting --> ReadyForHuman: every required check passes
    Blocked --> [*]: human reviews reasons
    ReadyForHuman --> [*]: human decides separately
Loading

Project map

Path Responsibility
src/domain.ts Typed evidence contract, stable case digest, validation, and fail-closed attestation
src/proofgate.ts Mozaik runtime, three agents, semantic events, event ledger, timeout, and concurrency proof
src/inference-runner.ts Deterministic two-phase tool-call runner used by the credential-free demo
src/fixtures.ts Reproducible ready, blocked, and source-failure cases
src/server.ts Localhost-only HTTP server and minimal JSON API
src/main.ts Terminal demo and JSON output
public/ Visual Control Room and redacted event-ledger rendering
test/ Verdict, failure, digest, concurrency, API, and browser-security tests

Mozaik Cloud observability

Pair the working copy once:

npx @mozaik-ai/cloud-sdk pair

With Mozaik 4.x, framework loop events are sent to the paired Cloud project automatically. Run a scenario and open Agents in Mozaik Cloud to inspect the three overlapping traces.

Pairing credentials remain outside the repository. Never commit a project key or paste one into an issue, screenshot, or demo recording.

Public-safe boundary

The repository contains only synthetic fixtures. It has no Fortemate production URLs, private policies, model artifacts, tokens, deployment integrations, or real operational thresholds.

A future connector must remain read-only, redact its source payload, and convert it into the small evidence contract before the attestor sees it. Private Fortemate adapters and policies belong outside this public hackathon repository.

Recording the demo

The recommended shot list, screenshot filenames, and an English narration are in docs/demo-script.md. The demo is designed to fit in about two minutes.

License

MIT

About

Read-only release and experiment control room with concurrent Mozaik agents and deterministic, human-owned evidence gating.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages