# Do Not Act Integration Proof

This page describes the smallest black-box proof that Do Not Act can stop an external agent before it acts on a known disputed prediction market.

The proof is designed for builders, auditors, and design partners. It does not require wallet access, private keys, order signing, order routing, or trade execution.

## What It Proves

- Direct HTTP detects a real Polymarket market with UMA dispute history.
- Direct HTTP distinguishes that market from a clean/resolved market.
- The Python SDK composed guard makes the same fail-closed decision.
- The proof does not mutate watchlists, account state, payment state, DB, Redis, or provider state.
- The API key is never printed by the proof harness.

## Real Markets Used

| Market | Expected result | Why |
|---|---|---|
| `580810` | `DO_NOT_ACT` | UMA history contains `disputed` |
| `541000` | `READY` | Clean/resolved comparison market |

## Dry Run

```bash
cd <repo-root>
python3 scripts/donotact_external_agent_blackbox.py
```

Expected shape:

```json
{
  "dry_run": true,
  "required_env_any_of": ["DONOTACT_API_KEY", "DONOTACT_API_KEY"],
  "state_mutation": "none; no watchlist write, no payment, no provider calls"
}
```

## Authenticated Proof

```bash
cd <repo-root>
DONOTACT_API_KEY="REDACTED_REAL_KEY" python3 scripts/donotact_external_agent_blackbox.py --execute
```

To also produce reusable evidence files:

```bash
DONOTACT_API_KEY="REDACTED_REAL_KEY" python3 scripts/donotact_external_agent_blackbox.py \
  --execute \
  --output-json reports/runtime/donotact_external_agent_blackbox.json \
  --output-markdown reports/runtime/donotact_external_agent_blackbox.md
```

Expected proof:

- `ok=true`
- `api_key_printed=false`
- `direct_http[known_disputed_market_blocks].observed.verdict=DO_NOT_ACT`
- `direct_http[known_disputed_market_blocks].observed.has_disputed_history=true`
- `direct_http[known_disputed_market_blocks].observed.reason_codes` includes `UMA_DISPUTE_DETECTED`
- `direct_http[known_clean_market_allows].observed.verdict=READY`
- `direct_http[known_clean_market_allows].observed.has_disputed_history=false`
- `python_sdk_agent_guard[sdk_blocks_known_disputed_market].observed.can_continue=false`
- `python_sdk_agent_guard[sdk_allows_known_clean_market].observed.can_continue=true`

The markdown report is partner-safe if `api_key_printed=false` and `state_mutation=none`.

Validate the generated evidence before using it in outreach:

```bash
python3 scripts/donotact_validate_blackbox_proof.py \
  --json reports/runtime/donotact_external_agent_blackbox.json \
  --markdown reports/runtime/donotact_external_agent_blackbox.md
```

The validator performs no network calls and does not need an API key.

## How To Read The Result

If `580810` does not block, the proof fails.

If `541000` does not allow, the proof fails.

If the SDK guard disagrees with direct HTTP, the proof fails.

If the script prints API-key material, the proof fails.

If the script mutates watchlists or payment/account state, the proof fails.

## What This Does Not Prove

- It does not prove commercial performance.
- It does not prove event-outcome forecasting.
- It does not prove full Polymarket or Kalshi coverage.
- It does not prove sub-second alert latency.
- It does not replace partner-specific integration testing.

## Product Boundary

Do Not Act returns dispute and resolution diagnostics. It does not execute trades, custody funds, hold private keys, sign orders, route orders, or authorize customer actions.
