# Runbook: the independent sleeve review (Zone 3) A second model reads one sleeve's period and says, with citations, what it targeted, what it did, where the two diverged and what that cost. The page shows the newest review, marks it stale by age, and folds the previous three behind a disclosure. The record underneath — decisions, orders, fills — is still the truth. A review is a **signal, not a verdict**, and the card says so in the copy the spec requires: *a reviewer can be wrong in both directions*. ## Why a different model is mandatory A strategy grading itself is not an audit. LLM-as-judge has measured self-preference bias, and same-model monitoring collapses once the model learns to hide its intent. The reviewer is therefore configured separately and must resolve to a different **provider and model** from the trading one. If `TAPEBOOK_AUDIT_MODEL` resolves to the same provider+model as `TAPEBOOK_LLM_MODEL`: * generation is refused with a message containing `a strategy reviewing itself is not an audit`; * nothing is stored and no model is called; * `TAPEBOOK_AUDIT_ALLOW_SAME_MODEL=1` overrides this, and the stored review carries `same_model = true`, which the card renders as an explicit warning. An unlabelled same-model review would be worse than no review at all. ## Configuration | Variable | Meaning | Default | |---|---|---| | `TAPEBOOK_AUDIT_MODEL` | The reviewer's model name. **Required**; there is no default reviewer. | — | | `TAPEBOOK_AUDIT_BASE_URL` | Reviewer's OpenAI-compatible base URL. | trading base URL | | `TAPEBOOK_AUDIT_API_KEY_ENV` | Name of the environment variable holding the reviewer key. | trading key variable | | `TAPEBOOK_AUDIT_API_KEY` | The reviewer key itself, when you would rather not name another variable. | — | | `TAPEBOOK_AUDIT_PROVIDER` | Label recorded as the reviewer's provider. | derived from the base URL | | `TAPEBOOK_AUDIT_ALLOW_SAME_MODEL` | `1` to accept a same-model review, explicitly labelled. | unset | | `TAPEBOOK_AUDIT_MAX_TOKENS` | Per-review token budget. | `16000` | Prices come from the same `TAPEBOOK_LLM_PRICES` table as chat. A reviewer model with no configured price records tokens and `cost_minor = NULL`, `price_source = 'unknown'`; the card says **cost not configured**, never zero. A missing key produces a 503 naming the environment variable. The key value is never printed, logged or put in a repr. ## What the reviewer can see Seven read-only tools, all over records already loaded for one sleeve and one period: | Tool | Records | |---|---| | `decisions` | cycle id, time, targets, the strategy's own recorded rationale, model, spec version, prompt digest, token counts | | `orders` | client order id, cycle, side, quantity, limit, status, filled quantity, average price, reject reason, venue fees | | `fills` | ledger `TRADE_FILL` events in the period: seq, time, cash, shares, reference | | `halts` | the sleeve's active halt (reason, raiser, time), or an explicit "none active" | | `snapshots` | dated marks: cash, positions value, equity, realised P&L, open positions, halted | | `strategy_spec` | the spec in force, when this process has loaded it | | `withdrawal_slices` | withdrawal plans and their daily raised/withdrawn entries | It never sees the trading prompt's reasoning, the trading transcript, or any tool that can mutate anything. The tool list is a constant (`AUDIT_TOOL_NAMES`) and a test asserts it; adding a mutating tool there is the failure this module exists to prevent. ### Period * `since` defaults to the previous review's `period_end`, or `until − 30 days` when there is none. * `until` defaults to now (the reviewer's clock, injectable in tests). * Decisions are selected by `as_of`. Orders are matched to the period's decision cycles, plus orders whose cycle has no recorded decision at all; orders carry no timestamp in this record, and the evidence states that limitation rather than pretending otherwise. * Fills and snapshots are filtered by their own timestamps. Withdrawal plans are included when their date range overlaps the period. ## Output contract Strict JSON, whole-answer refusal — the same discipline as the trading and chat agents: ```json { "summary": "3 to 5 sentences", "deviations": [ { "claim": "what diverged", "decision_id": "cycle-id or null", "order_id": "client-order-id or null", "cost": "what it cost, as a short string" } ], "unseen": "what the records did not contain", "verdict": "on_mandate | drifting | unclear" } ``` The reviewer is told to cite `[decision ]` and `[order ]` in prose. The validator refuses the whole answer — and stores no review — when: * the reply is not a JSON object; * `summary` is not 3–5 sentences; * `verdict` is outside the three values; * no citation appears in the summary when there are decisions or orders to cite; * **any** cited id does not resolve to a real decision or order for this sleeve and period; * a deviation has no claim, no cost, or cites neither a decision nor an order; * a deviation's `decision_id` / `order_id` does not resolve; * the model replies `NO_REVIEW` ("the records do not permit a review"). An invented id is the failure mode this feature exists to catch, so it is a refusal rather than a repair. The refusal reason is returned to the caller (HTTP 422); the review is not written. ## Quiet periods If the period contains no fill and no filled order, the reviewer **does not call a model at all**. The desk writes a deterministic three-sentence review that says no trades were recorded, how many decisions and orders exist, and that this is marked a **quiet period** rather than given a narrative the records do not contain. It is stored with `quiet = true`, zero tokens and no cost. The verdict is `on_mandate` when at least one decision is recorded and `unclear` when none is. ## Storage and spend `audit_reviews` (migration `0020`) stores: sleeve, period, provider, model, `same_model`, prompt digest, summary, deviations jsonb, unseen, verdict, quiet, records-seen counts, tokens, cost, and generated-at. Append-only: a later review supersedes one, nothing edits one. The application role gets `SELECT, INSERT` only. `audit_review_feedback` stores each `useful | wrong` judgement as an appended row, counted per reviewer model. The count shown next to the reviewer's name is the count of those rows. Oversight spend goes to **`chat_spend` with `kind = 'audit'`** (the column is added in `0020`; `0019` did not carry it, despite the phase-1 note). The row also carries `review_id` when a review was stored. It is operator spend: * it never touches a sleeve's `agent_credits` line (that is derived from decisions only); * it never enters a sleeve's forward record or performance; * a review whose answer was refused leaves **no review**, but its provider call still writes an audit spend row with `review_id = NULL`. A call that cost money must not vanish because the model was wrong; * a quiet period makes no call and writes no spend row. ## The page Zone 3 on `/sleeve/` shows, in order: * verdict chip, `quiet period` chip where applicable, and a **stale** chip when the review is older than **twice the sleeve's cadence** (with its age and the sleeve's cycle length); * the summary; * the deviations, each with its decision/order citation and cost; * `What this review could not see: …` when `unseen` is non-empty; * the footer, exactly: `reviewed by / at