<!-- informative -->

# SPEND-Gate Adversarial Review — Batches 1–2

- Repo: `/home/ruben/Projectos/meta-project/orchestrator`
- Revision reviewed: `HEAD` = `9e94357` (batches `97c1891`, `9e94357`; preceded by `4cf9d64`)
- Reviewer independence: not an author of `97c1891` / `9e94357`. Source and normative docs
  (`docs/report-milestone8-readiness.md` R02/R03/R06/R09/R11/R12, `docs/budgets.md`,
  `docs/control-plane.md`, `docs/experiment.md`, `docs/tables/limits.yaml`) were read before the
  implementer's tests. Probes live under `/tmp/kilo/`, none in the repo.
- Environment: `.venv/bin/python -m pytest -q` → **262 passed in 67.80s** (green suite is not a verdict).
- No paid/provider calls, no network, no real credentials; synthetic clients and local fixtures only.

---

## 1. Verdict

**NO-GO for the SPEND gate.** Four reachable falsifications survive: concurrent duplicate delivery
of one `(attempt_id, token)` can invoke the priced client **twice** when a completion fails
post-call validation; a committed/dispatched overrun is **laundered to zero** by cancellation /
budget-exhaustion; `Ledger.transfer` (used by `ROOT_REPLACED`) moves already-spent budget and lets
a run charge **18.0 against a 10.0 authorisation**; and the new authoritative acceptance guard
admits **fabricated inline evidence**. The experiment-wide cap itself (R03) is sound for the
authorized entry points, but not for `run_trial` called directly.

---

## 2. Findings

### F1 — P1 — Single-flight is broken when the completion fails post-call validation (double billable call)

- Invariant violated (in-scope claim 1): *"two concurrent deliveries of one `(attempt_id, token)`
  invoke the client/executor exactly once; crash between lock acquisition and response-cache store
  cannot double-charge."*
- Root cause: `ModelAdapter.dispatch` holds `_dispatch_lock` across `_dispatch`
  (`model_adapter.py:480-485`), but the response is cached only at the very end
  (`model_adapter.py:586`), **after** post-call boundary validation at
  `model_adapter.py:528-544` (`_finite_cost`, `_token_count`, non-empty `units`). When validation
  raises (e.g. a non-finite reported cost), the lock is released with an empty cache, so the next
  concurrent delivery runs `self.client.complete(...)` again (`model_adapter.py:524`).
- Reproducer: `/tmp/kilo/spend_adapter_probe.py`, case 9.
  ```
  .venv/bin/python /tmp/kilo/spend_adapter_probe.py
  ```
  A client whose **first** completion returns `cost=NaN` is called from two threads that
  rendezvous on a barrier, both with the same `(attempt, token)`.
- Observed: `results=[('raise','ModelBudgetRefused'), ('ok','COMPLETED')] client.calls=2`
  (case 8, the well-behaved completion, correctly gives `client.calls=1`).
- Expected: exactly `client.calls=1` for one `(attempt_id, token)` regardless of completion
  validity.
- Why it matters: a provider that bills per request can charge twice for one attempt, and the
  discarded first completion may itself have consumed tokens. The controller's decision to
  `_cancel_attempt` in `dispatch_attempt` happens *after* `dispatch` returns and outside the lock,
  so a racing second delivery can still reach the client.
- Proposed permanent regression test: in `tests/test_milestone8_readiness.py`, a
  `test_single_flight_holds_when_completion_is_malformed`: build a counting client whose first
  `complete` returns `cost=NaN` and second returns a valid completion, dispatch twice from two
  threads on a barrier with the same attempt/token, assert `client.calls == 1` and both callers
  observe the same outcome (the `ModelBudgetRefused`), i.e. the failure is cached too.

### F2 — P1 — Cancellation / budget-exhaustion launders an admitted overrun (and a dispatched charge) to zero

- Invariant violated (in-scope claim 2): *"overruns are visible… any excess is retained as
  explicit liability"* and the listed attack *"conservative settlement being used to launder an
  overrun."*
- Root cause: `_cancel_attempt` emits `CANCELLATION_CONFIRMED` (`controller.py:445-450`), which
  transitions the attempt to `CANCELLED`, and only **then** computes
  `dispatched = attempt.state in ("DISPATCHED","RUNNING","OBSERVATION_RECEIVED")`
  (`controller.py:457`). That predicate is always `False` after the cancel transition, so the
  `else` branch (`controller.py:466-476`) emits `ATTEMPT_COST_RECONCILED` with `actual: 0` and
  reclaims the full commitment. The in-code comment at `controller.py:453-456` states the opposite
  intent.
- Reproducer: `/tmp/kilo/spend_cancel_launder_probe.py`.
  ```
  .venv/bin/python /tmp/kilo/spend_cancel_launder_probe.py
  ```
  Admit an `EXECUTOR_OBSERVATION_ADMITTED` with `cost_report.actual = 9.0` (commitment 5.0, budget
  10.0), crash before reconciliation, restart, then `recover` vs `cancel_run`.
- Observed:
  - `recover` → `total_charged=9.0 total_overrun=4.0 available=1.0`
  - `cancel`  → `total_charged=0.0 total_overrun=0.0 available=10.0`
- Expected: cancel must retain at least the conservative commitment and, where a durable actual
  exists, the authoritative actual (`_recover_accounting` does this correctly). A dispatched/observed
  charge must never be reset to zero.
- Reachability: `run`-level `BUDGET_EXHAUSTION_RECORDED` derives `cancel_attempt_requested` for
  every non-terminal attempt (`reducer.py:474-486`), so in-flight attempts already billed are
  zeroed when any other limit is exhausted, not only via explicit `cancel_run`. Ownership note:
  `_cancel_attempt` predates the batches (R04), but the accounting loss is a SPEND-gate
  guarantee (claim 2) and is reported here.
- Proposed permanent regression test: a `test_cancellation_does_not_launder_a_reported_actual`
  that (a) drives an attempt to `OBSERVATION_RECEIVED`/`PROVISIONALLY_SETTLED` with `actual=9.0`,
  calls `cancel_run`, and asserts `total_charged == 9.0`; and (b) cancels a `RUNNING` attempt and
  asserts `total_charged == commitment` (never 0).

### F3 — P1 — `ROOT_REPLACED` budget transfers check only the *limit*, not available capacity, enabling cross-budget overcommitment

- Invariant violated (in-scope claim 6 / ledger misuse): the run's authorised budget must bound
  total charged spend; transfers must move only *remaining* budget.
- Root cause: `Ledger.transfer` validates `source.limits.get(dimension) + TOLERANCE < amount`
  (`model.py:428`), i.e. the original limit, ignoring `committed`/`actual`, then rewrites
  `source.limits` and `target.limits` (`model.py:433-434`). It is reachable from the public
  controller API `replace_root(..., transferred_budgets=...)` (`controller.py:2141-2165`) whose
  payload is reduced straight into `ledger.transfer` (`reducer.py:556-562`).
- Reproducer: `/tmp/kilo/spend_transfer_overcommit_probe.py`.
  ```
  .venv/bin/python /tmp/kilo/spend_transfer_overcommit_probe.py
  ```
  Submit a run with `MODEL_COST = 10.0`; settle an attempt at `actual = 8.0`; replace the root
  transferring `10.0`; settle a second attempt at `10.0` on the new root.
- Observed: `final total_charged=18.0 overrun=3.0 original authorised total=10.0`
  (after transfer: `source available=-8.0 target available=11.0`).
- Expected: the transfer must be capped at `available(source)` (2.0), or refused; the run's total
  charged must never exceed 10.0 without an explicit overrun event carrying the excess.
- Ownership note: `model.py` is not in the batch diff, but the mandate explicitly lists
  "transfer/commit manipulation", and the per-run ledger is the authoritative spend bound the
  experiment cap depends on.
- Proposed permanent regression test: `test_root_replacement_transfer_cannot_move_spent_budget`
  in `tests/test_milestone8_readiness.py`: settle 8.0, attempt to transfer 10.0, expect
  `OvercommitmentError` (or transfer bounded to 2.0), then assert a 10.0 reservation is refused.

### F4 — P1 — The new authoritative acceptance guard admits fabricated inline evidence (node-owned evidence bypass)

- Invariant violated (in-scope claim 9): *"a direct `ACCEPTANCE_AUTHORISED` event cannot bypass
  nonempty, node-owned evidence and result existence."*
- Root cause: `_check_acceptance_bindings` (`reducer.py:265-313`) treats a legacy inline
  `bindings.evidence.checks` list as satisfying the evidence requirement, and only checks that the
  list is truthy (`reducer.py:294-300`). It does not require an admitted `EvidenceRecord`, does not
  require `passed` to be true, and does not require `result_id` at all. The guard's own docstring
  claims "independently obtained, nonempty evidence".
- Reproducer: `/tmp/kilo/spend_acceptance_probe.py`.
  ```
  .venv/bin/python /tmp/kilo/spend_acceptance_probe.py
  ```
  Emit `READINESS_ESTABLISHED` → `VALIDATION_STARTED` → `VALIDATION_PASSED` (empty evidence) →
  `ACCEPTANCE_AUTHORISED` with `bindings={"acceptance_id":..., "evidence":{"checks":[{"name":"FAKE","passed":false}]}}`
  and no `result_id`.
- Observed: `[fabricated-inline-failing] ACCEPTED node_state=ACCEPTED`,
  `[inline-garbage-checks] ACCEPTED`, and through the real `EventStore`:
  `store-level ACCEPTANCE_AUTHORISED: ADMITTED node_state=ACCEPTED run_outcome=ACCEPTANCE_CLAIMED`.
  (Empty checks, foreign evidence ids, missing `acceptance_id`, and a fabricated `result_id` are
  correctly refused.)
- Expected: acceptance must be refused unless it binds an admitted, node-owned, nonempty evidence
  record (and, when a result is claimed, a result this node produced).
- Proposed permanent regression test: extend
  `test_acceptance_authorised_rejects_empty_or_foreign_or_missing_result_evidence` with
  `bindings={"acceptance_id":"acc-z","evidence":{"checks":[{"name":"FAKE","passed":False}]}}`
  and assert `reducer.ReducerError`; and a store-level test that the node never reaches `ACCEPTED`.
  If the inline form is genuinely required for `accept_parent`, gate it to that caller (e.g. a
  typed parent-acceptance binding) rather than accepting arbitrary inline checks.

### F5 — P2 — `run_trial` starts (and can spend) without any experiment-wide reservation

- Invariant violated (in-scope claim 6): *"no trial can start without reserving."*
- Root cause: `run_trial(..., *, spend_ledger: Optional[...] = None)` with
  `if spend_ledger is not None: reserve(...)` (`experiment.py:1694-1741`, settle at `1853`).
  `run_pilots` and
  `run_measured_comparison` now require the ledger, but the shared primitive `run_trial` does not.
- Reproducer: `/tmp/kilo/spend_runtrial_probe.py`.
  ```
  .venv/bin/python /tmp/kilo/spend_runtrial_probe.py
  ```
- Observed: with `spend_ledger=None` the probe reaches `_run_arm` (`Reached: run_trial reached
  arm execution`); with a 0.5-ceiling ledger it correctly raises `SpendCapExceeded` before
  `os.makedirs`.
- Expected: `run_trial` should refuse to run without a ledger (or the ledger parameter should be
  required), so an over-cap trial can never start through any trial entry point.
- Proposed permanent regression test: `test_run_trial_requires_a_spend_ledger` asserting a
  `TypeError`/`SpendLedgerError` when called without one, plus the existing pilots/comparison
  gating tests.

### F6 — P2 — Declared `(0,0)` token ceiling defeats pre-dispatch token enforcement (one-call overshoot); no `limits` ⇒ unbounded reported tokens

- Invariant violated (in-scope claim 4): declared and reported token usage are enforced against
  the remaining run ceiling and exhaustion is refused *before the next billable request*.
- Root cause: the shipped `ExperimentModelClient` does not override `ModelClient.max_tokens`, so it
  declares `(0, 0)` (`model_adapter.py:370-375`, `experiment.py:235-266`). The controller's
  pre-dispatch check is `consumed + required > limit` (`controller.py:243-274`), which with
  `required = 0` only refuses when `consumed` is already **strictly greater** than the limit.
  The adapter's `input_bound is not None` overrun check then only fires post-call
  (`model_adapter.py:539-544`). With `limits` absent, `_enforce_plan_limits` returns immediately
  and the adapter has no bounds, so reported tokens are unbounded.
- Reproducer: `/tmp/kilo/spend_controller_limits_probe.py`.
  ```
  .venv/bin/python /tmp/kilo/spend_controller_limits_probe.py
  ```
- Observed:
  - limit `root_model_input_tokens=100`, client declares `(0,0)`, reports 100/call:
    `outcomes=['call1:OK','call2:OK','call3:REFUSED']`, `consumed input=200` — the ceiling of 100
    was exceeded by a full call before refusal.
  - the same limit with a client that declares `(100,20)`: `call1:OK`, `call2:REFUSED` (correct).
  - no `limits`: 10/10 model calls OK, `consumed input=1000`.
- Expected: the next billable request is refused before dispatch when the remaining ceiling cannot
  cover the call's declared ceiling; a model action with no configured ceiling should be refused
  (or the run should be required to configure one).
- Proposed permanent regression test: `test_zero_declared_token_ceiling_cannot_overshoot_the_run_limit`
  using a client with `max_tokens=(0,0)` and asserting the second `plan_attempt` is refused once
  `consumed >= limit`; and `test_model_action_requires_a_configured_token_ceiling`.

### F7 — P2 — Token/money conflation: completion `units` are never required to be monetary

- Invariant violated (in-scope claim 3): *"Dimension is preserved; token and money cannot be
  conflated."*
- Root cause: the adapter only checks `units` is a non-empty string
  (`model_adapter.py:531-533`) and charges the numeric `completion.cost` against the `MODEL_COST`
  commitment regardless of `units` (`model_adapter.py:568-580`).
- Reproducer: `/tmp/kilo/spend_boundary_probe.py` (units block).
  ```
  .venv/bin/python /tmp/kilo/spend_boundary_probe.py
  ```
- Observed: `units in {"USD","TOKENS","MODEL_TOKENS","COST_UNITS","bananas"}` all `ACCEPTED
  actual=9.0 committed-dimension=MODEL_COST`.
- Expected: a completion whose units are not the commitment's monetary unit must be refused (or
  the dimension must be carried explicitly and reconciled), so a token count cannot be billed as
  money.
- Proposed permanent regression test: `test_token_shaped_completion_units_are_refused` asserting
  `ModelBudgetRefused` for `units="TOKENS"` with a `MODEL_COST` commitment.

### F8 — P2 — Durable spend ledger has no inter-process serialisation; fixed `.tmp` name loses reservations

- Invariant violated (in-scope claim 6): the experiment ledger is durable/restart-safe and the cap
  cannot be bypassed.
- Root cause: `_persist` uses a single fixed temporary path `f"{self.path}.tmp"`
  (`spend.py:192-197`) with no file lock; `reserve` reads availability in memory and persists
  non-atomically (`spend.py:149-170`).
- Reproducer: `/tmp/kilo/spend_lostupdate_probe.py`.
  ```
  .venv/bin/python /tmp/kilo/spend_lostupdate_probe.py
  ```
  Two processes open the same workdir, rendezvous on a barrier, and each reserve 8.0 against a
  10.0 ceiling.
- Observed: `worker outcomes: {'t0':'reserved','t1':'error FileNotFoundError'}`,
  `final in_flight {'t1': 8.0}, reserved 8.0` — both callers passed the cap check (intended sum
  16.0 > 10.0), one reservation was lost from the file, and the other caller crashed on the shared
  temp file.
- Expected: a single writer per workdir, or an OS file lock with per-process temp names so
  reservations are never lost or corrupted.
- Note: the intended usage is one process/one workdir, so this is a robustness/durability gap
  rather than the primary path; the fixed temp name is nonetheless a concrete defect.
- Proposed regression test: a two-process `multiprocessing.Barrier` test asserting the sum of
  accepted reservations never exceeds the ceiling and the ledger file parses cleanly afterwards.

### F9 — P2 — `Ledger.settle` rejects a reported actual in `(commitment, commitment+TOLERANCE]`

- Invariant violated (in-scope claim 2 boundary): overruns must be visible and stop the next call.
- Root cause: `settle` enters the non-overrun branch for `actual <= commitment + TOLERANCE`
  (`model.py:374`) and then requires `reclamation == commitment - actual` (negative), which the
  controller clamps to 0, so it raises `LedgerStateError` (`model.py:375-379`).
- Reproducer: inline (see below); deterministic at `delta = 1e-9` due to float error.
  ```
  .venv/bin/python - <<'PY'
  import sys; sys.path.insert(0,"src")
  from orchestrator.model import BudgetRecord, Ledger
  l=Ledger(); l.register_budget(BudgetRecord(budget_id="B1",node_id="N1",limits={"MODEL_COST":5.0}))
  l.reserve("r","B1",5.0,"MODEL_COST","a1","N1"); l.commit_reservation("a1",5.0,"MODEL_COST")
  l.settle("a1",5.0+1e-9,0.0)   # raises
  PY
  ```
- Observed: `LedgerStateError: reclamation 0.0 does not equal commitment 5.0 minus actual 5.000000001`
  (deltas `1e-12…5e-10` and `2e-9…1e-6` succeed).
- Expected: an actual within tolerance of the commitment settles without error (or is treated as
  overrun), so a real reconciliation event cannot fail admission on a rounding boundary.
- Proposed regression test: parametrise `settle` over deltas straddling `TOLERANCE` and assert no
  exception in `[0, TOLERANCE]` plus overrun visibility above it.

### F10 — P2 — Frozen-manifest hash is not equal pre/post `_deep_freeze` for nested `set`s, and `_deep_freeze` misses mutable types

- Invariant violated (in-scope claim 8): *"its content hash cannot drift"*, and the review's
  instruction to confirm `content_hash()` equals the pre-freeze hash.
- Root cause: `_deep_freeze` converts `set → frozenset` (`experiment.py:2833-2843`) but
  `_jsonable`/`_canonical` do not understand `set`/`frozenset`, so they fall through to
  `default=str` (`experiment.py:2820-2831`); a `bytearray` (or any otherwise-unhandled mutable
  object) is returned unchanged and can be mutated in place after freeze.
- Reproducer: `/tmp/kilo/spend_frozen_probe.py`.
  ```
  .venv/bin/python /tmp/kilo/spend_frozen_probe.py
  ```
- Observed:
  - `hash-equal dict/list/set: {'equal': False}` (pre `sha256:5e5c…`, post `sha256:ae9f…`);
    `hash-equal scalars: equal True`; repeated `manifest.content_hash()` is stable.
  - `bytearray gap: drifted True`.
  - nested mutation attempts all raise (`AttributeError`), policy `999` is rejected
    (`UnsupportedPolicyVersion`).
- Expected: freeze-normalised and pre-freeze canonical hashes agree, and no reachable nested value
  remains mutable after freeze.
- Reachability: the shipped target/kernel/sampling/selection values contain no sets or bytearrays,
  so this is latent for the fixed experiment; it becomes live for a caller-supplied kernel/selection
  policy. Still worth a normalisation invariant.
- Proposed regression test: extend `test_frozen_manifest_mappings_are_immutable_and_hash_stable`
  with a nested `set` and assert `_content_hash(frozen) == _content_hash(source)`; add a
  `_deep_freeze` type-rejection (or `bytes`/immutable-only normalisation) for unhandled mutables.

### F11 — P2 (informational) — Ledger file has no integrity/MAC; filesystem-writer can re-bind

- Invariant: "authorization cannot be silently changed."
- Observed: editing `experiment-spend.json` in place and reopening with the matching widened
  `ExperimentAuthorization` yields `available=1000000.0` (`/tmp/kilo/spend_durable_probe.py`,
  case 7). Reopening with a *different* limit/owner is correctly refused (cases 4–5).
- Assessment: the binding is caller-vs-file; an attacker with write access to the workdir already
  controls the ledger and could delete it. Acceptable under the assumed single-owner filesystem
  threat model, but there is no tamper-evidence (no HMAC/recorded hash chain). Note only.

---

## 3. Claims verified (attempted falsification, not "tests pass")

| # | Claim | Method / probe | Result |
|---|---|---|---|
| 1 | Commitment is a hard maximum; declared charge/tokens checked pre-call; reported use never clipped; excess retained | `spend_adapter_probe.py` cases 3–7, `spend_overrun_probe.py`, `spend_recovery_probe.py` | **Attacked, not falsified.** Declared charge `nan/inf/-1/bool/"5"` and `required>commitment` refused with 0 client calls; declared tokens above run bound refused pre-call; reported overrun preserved and charged; overrun beyond the budget drives `available` negative and refuses the next reservation. Caveat F7: "hard maximum" is only as strong as `client.max_cost`; an under-declaring client can spend beyond it (liability still retained). |
| 2 | Overrun visible, stops next call, survives replay/restart, recovery reconciles actual, conservative settlement cannot launder | `spend_overrun_probe.py`, `spend_recovery_probe.py`, `spend_cancel_launder_probe.py` | **Partially falsified (F2, F9).** Recovery reconciles actual 9.0/overrun 4.0 and preserved negative capacity; but cancellation/budget-exhaustion zeroes the actual, and the tolerance boundary raises. |
| 3 | Boundary validation total; dimension preserved; token/money not conflated; non-monetary commitments refused | `spend_boundary_probe.py`, `spend_adapter_probe.py` case 6 | **Partially falsified (F7).** Non-finite/NaN/inf/bool/negative/unknown-dimension/unknown-limit are rejected at config, request, response, ledger and authorization boundaries; `MODEL_TOKENS` commitments are refused by the adapter; but non-monetary completion `units` are accepted (F7). |
| 4 | Same immutable request drives estimation/completion; tokens bounded; exhaustion not reset by restart | `spend_controller_limits_probe.py`, `spend_adapter_probe.py` cases 1–4 | **Partially falsified (F6).** Declaring clients are correctly refused pre-call and reported overruns fail the response; a `(0,0)`-declaring client (the shipped `ExperimentModelClient`) overshoots the run ceiling by a full call, and a run with no `limits` has unbounded tokens. Estimation/completion share the prompt/hash via `run_model_review` (`controller.py:1579-1585`). |
| 5 | Prompt binding honest; filtered prompt reaches client; digest describes what was sent; hidden content cannot reach it | `spend_adapter_probe.py` cases 10–11 | **Attacked; controller path verified, adapter boundary not enforced.** `build_prompt`/`filter_context` drop `HIDDEN` and hidden-reference items; the controller records the same hash it sends. The adapter forwards `prompt` and `prompt_hash` independently and never recomputes the digest (`model_adapter.py:621`); a caller can send prompt X with hash Y, and a `REVIEW` dispatch without `run_model_review` sends no prompt while provenance says `sha256:unset` (attempt hash `None`, so `validate_output` skips the check). No reachable workflow path found that exercises this through `run_model_review`. |
| 6 | Experiment cap: no trial without reserve; spans pilots/retries/in-flight; durable/restart-safe; authorization immutable; all trials accounted | `spend_durable_probe.py`, `spend_runtrial_probe.py`, `spend_lostupdate_probe.py` | **Partially falsified (F5, F8).** Cap, restart-in-flight, widened/different-owner refusal, settle-without-reserve, double-reserve and NaN/bool/negative all behave; pilots/comparison/`run_experiment` require authorization. But `run_trial` can start without a ledger, and concurrent writers lose reservations / crash on the fixed temp name. |
| 7 | Trial identity durable; duplicate invocation cannot overwrite; ledger/identity cannot diverge | source + `spend_durable_probe.py` | **Attacked, not falsified.** `run_trial` refuses when `identity.json` exists and the ledger's `reserve` refuses a re-reserved `trial_id`; a crash before `identity.json` still leaves the reservation outstanding, so a re-run is refused. |
| 8 | Frozen binding immutable; content hash cannot drift; execution derived from frozen spec; env/component/model mismatches rejected; policy version not mislabelable | `spend_frozen_probe.py` | **Partially falsified (F10).** Nested proxied mappings/lists are immutable, repeated `content_hash()` is   stable, the running env/component digests are compared (`experiment.py:2589-2595`), model
  profile is checked, and policy `999` is rejected; but pre/post-freeze hashes diverge for sets and `_deep_freeze` leaves unhandled mutables freeze-exempt. |
| 9 | Direct `ACCEPTANCE_AUTHORISED` cannot bypass nonempty node-owned evidence / result existence | `spend_acceptance_probe.py` | **Falsified (F4).** Fabricated inline checks (including `passed:false` and `[""]`) are admitted and drive `ACCEPTANCE_CLAIMED`; empty/foreign evidence, missing `acceptance_id` and fabricated `result_id` are correctly refused. Deferred-resume stale-grant behaviour was code-read but not exercised (see residual). |

---

## 4. Residual unknowns

- **Deferred acceptance with a stale grant.** `resume_deferred_acceptance` requires *any* `GRANTED`
  `APPROVAL` for the node/`ACCEPTANCE` subject (`controller.py:1782-1795`), not a grant bound to the
  specific deferral/result. I could not construct a reachable double-deferral for one node (accepted
  is terminal), so this is not a finding; a re-validation cycle that makes it reachable should be
  checked.
- **Real provider semantics.** All probes use scripted clients. Whether a real backend can return a
  non-finite cost/token count or non-monetary units (F1/F7) is provider-dependent; the adapter
  boundary is supposed to be the defence regardless.
- **Host/sandbox limits and cgroups.** Out of scope (R15); `build_fixed_target` and the oracle were
  only used as fixtures.
- **Cross-host restart of the experiment ledger.** I verified reopen in-process and via a separate
  process on the same host, but not an fsync/atomic-replace crash mid-`os.replace` on a real
  filesystem; F8 already shows the shared-temp failure mode.
- **R04 process-tree cancellation.** Out of scope as a behaviour; only its accounting consequence is
  reported (F2), with `_cancel_attempt` predating the batches.
- **`run_measured_comparison` env/component mismatch end-to-end.** Verified by source and by the
  presence of the checks, but I did not build a full frozen manifest on a mismatched host to
  observe the refusal; the existing suite exercises the matching path.

---

## 5. Boundary audit — spend paths and whether each reserves

Reserve = a `plan_attempt` against the per-run `Ledger` **and** (for experiments) a
`spend_ledger.reserve` before trial start.

| Path | Reserves? | Notes |
|---|---|---|
| `Controller.run_model_review` → `plan_attempt` → `dispatch_attempt` | Yes (run ledger) | Commit `MODEL_PROFILE.cost_per_call`/caller amount; adapter re-checks declared ≤ commitment. |
| `Controller.execute_attempt` / `schedule_child_attempts` → `plan_attempt` | Yes (run ledger) | Command-executor attempts commit `per_attempt_commitment`. |
| Direct `Controller.plan_attempt` / `dispatch_attempt` | Yes (run ledger) | Low-level; prompt/limits require `run_model_review` for the honest binding. |
| `Controller.replace_root(transferred_budgets=…)` → `ledger.transfer` | N/A (mutates limits) | **F3: can create capacity from already-spent budget.** |
| `experiment.run_trial(..., spend_ledger=None)` | **No experiment reservation** | **F5.** Run ledger still applies inside the trial if it runs. |
| `experiment.run_trial(..., spend_ledger=L)` | Yes | Reserve `limits.model_cost` before durable trial state; settle authoritative actual; unsettled reservation stays liable. |
| `experiment.run_pilots` | Yes (required arg) | `experiment.py:2420-2437`. |
| `experiment.run_measured_comparison` | Yes (required arg) | `experiment.py:2554-2610`; verifies model/env/component bindings. |
| `experiment.run_experiment` | Yes (required authorization) | Opens the durable ledger first (`experiment.py:2741-2748`). |
| `experiment.calibrate_oracle` | No model spend | Oracle/hidden runner only; no `ModelClient`. |
| `orchestrator.model_provider` | Indirect | Builds adapters only; the controller gates. |
| `orchestrator.decisions` / `observability` | No spend | Read-only projections. |
| `orchestrator.conformance` | Fixture controllers | `plan_attempt` used; not a paid entry point. |

---

## 6. Reproduce everything

```
cd /home/ruben/Projectos/meta-project/orchestrator
.venv/bin/python /tmp/kilo/spend_ledger_probe.py
.venv/bin/python /tmp/kilo/spend_overrun_probe.py
.venv/bin/python /tmp/kilo/spend_durable_probe.py
.venv/bin/python /tmp/kilo/spend_adapter_probe.py
.venv/bin/python /tmp/kilo/spend_controller_limits_probe.py
.venv/bin/python /tmp/kilo/spend_runtrial_probe.py
.venv/bin/python /tmp/kilo/spend_boundary_probe.py
.venv/bin/python /tmp/kilo/spend_acceptance_probe.py
.venv/bin/python /tmp/kilo/spend_frozen_probe.py
.venv/bin/python /tmp/kilo/spend_recovery_probe.py
.venv/bin/python /tmp/kilo/spend_cancel_launder_probe.py
.venv/bin/python /tmp/kilo/spend_transfer_overcommit_probe.py
.venv/bin/python /tmp/kilo/spend_lostupdate_probe.py
```

No paid calls were made; all clients are in-process/synthetic.
