Skip to content

Deterministic Execution Model

Every workload in Forge Pool is defined by a canonical execution contract.

If the contract is identical, the execution is reproducible. This enables replay, audit, and verification.


Canonical Execution Contract

At minimum:

json
{
  "ctx": {
    "job_id": "client-supplied-or-empty",
    "trace_id": "optional",
    "billing": { "mode": "test|billable" }
  },
  "op": { "name": "mc", "version": 1, "profile": "insurance.v1" },
  "seed": { "mode": "explicit|derived", "value": "optional" },
  "policy": { "target": "cpu|gpu", "min_agents": 1, "max_agents": 999, "verify": "none|spotcheck|quorum" },
  "args": { "iterations": 1000000 }
}

args are part of the contract — without them, the computation is not defined.


Execution Lifecycle

All workloads follow the same lifecycle:

contract
→ plan
→ shard
→ execute
→ verify
→ aggregate
→ artifact + replay
→ ledger

Planning and Sharding

The Hub deterministically plans:

  • shard count
  • iteration bounds (or split strategy)
  • per-shard seed derivation
  • verification strategy (policy-dependent)

Shards are the unit of execution.


Execution

Agents execute shards in isolated environments and return:

  • result fragments
  • metrics (wall time, resource class)
  • integrity hashes (when enabled)

Verification

Verification is policy-controlled and workload-dependent:

  • redundant execution for a subset or quorum
  • statistical consistency checks (probabilistic workloads)
  • deterministic hash checks (pure numeric kernels)

Invalid shards are rejected or excluded from aggregation.


Aggregation

The Hub reduces shard outputs deterministically:

  • stable aggregation order
  • bounded numeric tolerances
  • workload-specific reducers (percentiles, HDR merges, etc.)

Aggregation produces:

  • final output
  • result hash
  • execution metadata

Replay

Replay is possible when:

  • contract is preserved (including args)
  • adapter/kernel version is pinned
  • seed semantics are stable

Replay produces the same output within defined numeric tolerances.


Evidence Discipline

Each execution produces immutable evidence:

  • job ID and trace references
  • shard plan and assignments
  • verification outcomes
  • aggregation hash
  • billing/ledger record (mode-dependent)