Skip to content

NO1-002D: independently trusted production runner and evidence anchor #1223

Description

@aimasteracc

Objective

Define and implement the independently trusted production-runner and provenance boundary required before NO1-002C can leave NOT_EVALUATED.

Parent: #1195
Predecessor scaffold: #1221 / #1222

Current hard block

The current Codex CLI has no observable provider-side total USD, token, or request-count reservation API. Client subprocess timeouts and post-run usage parsing do not prove cancellation or cap spend. Therefore production execution remains disabled and must invoke zero model callbacks.

Required trust roles

  1. Anchor Custodian — signs the canonical manifest and workspace/tool baseline before any reservation or model call. The runner must not possess this key.
  2. Budget Gateway / Attestor — atomically reserves and enforces the request/token/USD envelope and signs terminal billing/cancellation receipts.
  3. Evidence Collector — writes raw transcript, MCP receipts, workspace/runtime evidence, and journal events directly to immutable append-only storage, then signs the content root. The runner cannot overwrite or delete it.

Trusted keys and pinned anchor references must come from operator-controlled configuration outside the evidence bundle. Bundle-provided keys and TOFU are forbidden.

Minimum production API

  • prepare(spec) -> signed SpendAttestation
  • run(spec, attestation) -> signed ProductionRunReceipt
  • validator input includes an out-of-band pinned anchor reference, operator trust store, collector attestations, and immutable object versions

The spec must bind manifest, cell, model, prompt, launch identity, workspace baseline, budget, token/request limits, nonce, and expiration.

Stop conditions

Production remains unavailable unless all are satisfied:

  • provider/gateway enforces the budget before and during every request
  • CodeGraph identity is pinned to trusted registry integrity/CAS bytes, not self-reported --version
  • TSA identity covers the complete installed artifact, queries/native libraries and lockfile; isolated execution prevents module shadowing
  • per-arm checkout root/commit/source baseline is externally anchored and immutable during execution
  • executable and checkout verification-to-use TOCTOU is closed
  • artifact root is newly created under a trusted external root with symlink/containment checks
  • reservation is recorded in an external append-only ledger before execution
  • production code has no injectable fixture identity/audit/runtime callbacks
  • raw evidence is independently collected and replayed against trusted baselines

Required adversarial tests

  • fake --version binary and injected identity probe
  • cwd/PYTHONPATH module shadow
  • wrong checkout with self-consistent fingerprint
  • checkout and executable swap/restore races
  • artifact-root symlink/pre-created tree
  • deleted local journal followed by retry
  • bundled/self-signed key substitution
  • expired/revoked/post-start anchor and nonce replay
  • cross-session/cross-arm attestation splice
  • fully forged transcript/workspace/runtime bundle with recomputed local hashes
  • over-budget next request rejected by the gateway before provider dispatch
  • timeout proves process cleanup but never claims spend-cap satisfaction without a signed provider receipt

Acceptance

An independent clean-checkout Judge must verify every attack fails closed. Until then:

  • production callbacks remain exactly zero
  • status remains NOT_EVALUATED
  • no winner, dominance, publishability, E2, E3, or E4 claim is allowed
  • no model-backed canary may run

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions