# Harness journey: live model and official MCP

This extension preserves the existing approval, admission, replay, migration and original-key receipt boundaries. OpenAI Responses makes actual model requests; official MCP2 SDK stdio subprocesses execute actual tools. Merchant data and reviewer identity remain local fictional fixtures. A return application is not a payment or refund.

[中文](README.zh.md) · [CLI contract](CLI_CONTRACT.md) · [Model and budget contract](API_CONTRACT.md) · [MCP contract](MCP_CONTRACT.md)

## Setup and durable limits

Use Python3.12 and a separate environment. Supply your own OPENAI_API_KEY in the environment; never put it in source, command text or reports. Model credentials are excluded from MCP/execution subprocess environments.

```sh
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
```

Every live run must use the SAME persistent budget path. Before each actual HTTP POST, the transport atomically consumes one attempt and reserves a conservative estimate. Limits are20requests and USD2estimated listprice; SDK retries/redirects are disabled. Failures count; absent usage retains its reservation. Deleting the ledger breaks the shared limit and is not permission to continue this allowance.

## Run, inspect and verify

From the package root, after configuring the environment, choose fresh work directories:

```sh
.venv/bin/python -B live_journey.py run --work work/complete --budget evidence/provider-budget.sqlite --scenario complete --model gpt-5.4-mini-2026-03-17
.venv/bin/python -B live_journey.py inspect --work work/complete
.venv/bin/python -B live_journey.py verify --work work/complete
.venv/bin/python -B live_journey.py run --work work/missing-proof --budget evidence/provider-budget.sqlite --scenario missing_proof --model gpt-5.4-mini-2026-03-17
.venv/bin/python -B live_journey.py verify --work work/missing-proof
```

The complete route uses actual model-generated get_order/retrieve_policy/propose_return calls, fixture review, shared admission, a merchant commit over MCP, and an explicitly injected MCP process exit before its response. Unknown retains the original reservation. Migration and a new worker reconcile the same operation key and authoritative receipt before settlement. The injected disconnect is not a naturally observed OpenAI outage.

missing_proof deliberately removes d-proof from selected tool context before the actual model reads it. Raw model output is never rewritten. The safe outcome is unknown, no proposal and no business write; any contrary output remains a recorded rejected candidate. New diagnostic runs use fresh work and the same budget.

## Evidence and measurement

provider-trace.jsonl contains actual serialized requests, unmodified provider JSON, request/response IDs, usage, failure classifications and monotonic request durations. mcp-audit.jsonl binds protocol/SDKversions, client/serverPIDs, tool arguments/results, process loss and durations. shared.sqlite stores runtime/merchant authority; tasks/journey-return.sqlite stores Agent state. timings.jsonl records model preparation, execution loss, lease wait/migration, recovery and the inclusive whole-task window.

verify recomputes storage, policy evidence, approval, reservation/epoch, actual provider/MCP traces and shared budget bindings read-only. A saved green report is not authoritative. Source fingerprints bind each run; changing old fingerprints to hide later source edits is invalid evidence.

Cost is an estimate from returned input/cached/output tokens at the pinned model's [published standard prices](https://developers.openai.com/api/docs/models/gpt-5.4-mini), not an invoice. Reasoning tokens are already included in output tokens. Missing usage remains separately reserved.

Each MCP call starts a fresh subprocess; startup/discovery overhead is included. Model preparation includes tools, so overlapping stages must not be added together. Whole-task timing includes setup, the injected failure and lease waiting. Small authored samples do not establish production p95 or reliability.

```sh
.venv/bin/python -B -m unittest discover -v
.venv/bin/python -B package.py --out harness-live-v1.zip
```

Local tests use explicit model fixtures or custom SDK transports with no provider requests; the full local path still uses actual MCP. The ZIP excludes credentials, budget databases and work files, with byte hashes in MANIFEST.json. [Frozen recorded evidence](https://ai.lwkjob.com/research-evidence/harness-live/README.md) includes observed failures, recovery and measurement. The original [offline walkthrough](https://ai.lwkjob.com/notes/harness-end-to-end-project/) remains the prerequisite.
