I3665 — A benchmark run and an advisor consultation carry the funding kind the owner declared for them, or unknown
Add an optional funding kind to the economics run record (EconomicsRun, not EconomicsRequest) and to the reasoning consultation record, in the catalogue's vocabulary (I3660), filled from the owner's I3289 declaration through I3292's billing_mode and otherwise unknown; an existing run file without the field reads unknown and is not rewritten; nothing infers the kind from which credential was present.
BLOKOVÁNO vlna 2 · p2 · implementační profil · bezpečné paralelně
Blocked. This issue cannot start until I3660, I3292 are done. The status is derived from that, not declared.
Cíl
Add an optional funding kind to the economics run record (EconomicsRun, not EconomicsRequest) and to the reasoning consultation record, in the catalogue's vocabulary (I3660), filled from the owner's I3289 declaration through I3292's billing_mode and otherwise unknown; an existing run file without the field reads unknown and is not rewritten; nothing infers the kind from which credential was present.
Proč
The economics runner passes ANTHROPIC_API_KEY and CLAUDE_CODE_OAUTH_TOKEN to both arms alike (economics/runner.rs), and Claude Code uses the API key whenever it is present in non-interactive mode (code.claude.com/docs/en/authentication, read 2026-10-21), so a run may be paid by the seat or by the API organization and nothing records which. The advisor driver is the other place Majordomus starts a model call, and the one a credit grant is meant to pay for. I3288 freezes EconomicsRequest, the recorded run files and the pairing calculators; an optional field on the run record that reads unknown when absent changes none of them (critique findings benchmark-runs-have-no-usage-record and advisor-calls-are-the-calls-left-unattributed).
Aktuální stav
Runs keep total_cost_usd as reported; consultations report usage when the transport does; neither names how it was paid.
Cílový stav
Every run and consultation names its declared funding kind or unknown, and the recorded runs are untouched.
Rozsah
- apps/majordomus-cli/src/economics/model.rs
- apps/majordomus-cli/src/economics/runner.rs
- apps/majordomus-cli/src/reasoning
- scripts/lib/advisors/driver.mjs
- apps/majordomus-cli/tests/economics.rs
- share/schemas/generated
- docs/generated
Mimo rozsah
- EconomicsRequest, the recorded run files and the pairing in economics/stats.rs and report.rs (I3288)
Závislosti
- I3660READY A vendor declares its funding sources in the model catalogue, each with dated, quoted vendor evidence
- I3292ZABLOKOVÁNO Hlášené tokeny, odhad podle ceníku a fakturovaná částka jsou tři pole a režim fakturace říká, který účet platil
Kritéria přijetí
- A run under a declaration of credit_grant records credit_grant; a run with no declaration records unknown
- Every recorded run file under .ai/repo/benchmarks/economics/runs still parses and reads unknown, byte for byte unchanged (test)
- A consultation record carries the declared kind or unknown
- No code path writes a kind inferred from credential presence (test)
Validace
- cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test economics
- node --test scripts/lib/advisors/contract.test.mjs
Požadované důkazy
- test_a_run_records_its_declared_funding_kind_or_unknown
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I3665.yaml. Read it back with majordomus plan show I3665.