Skip to content

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.

BLOCKED wave 2 · p2 · implementation profile · parallel safe

Part of every-model-call-is-paid-from-a-declared-source — How a model call Majordomus starts can be paid is declared by the vendor with evidence, and each call names the source it was declared to draw on.

Blocked. This issue cannot start until I3660, I3292 are done. The status is derived from that, not declared.

Objective

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.

Why

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).

Current state

Runs keep total_cost_usd as reported; consultations report usage when the transport does; neither names how it was paid.

Desired state

Every run and consultation names its declared funding kind or unknown, and the recorded runs are untouched.

Scope

  • 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

Out of scope

  • EconomicsRequest, the recorded run files and the pairing in economics/stats.rs and report.rs (I3288)

Dependencies

Acceptance criteria

  • 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)

Validation

  • cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test economics
  • node --test scripts/lib/advisors/contract.test.mjs

Evidence required

  • test_a_run_records_its_declared_funding_kind_or_unknown

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Timeline

started
—
verified
—
completed
—

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I3665.yaml. Read it back with majordomus plan show I3665.

Searches the titles and descriptions of every page this site publishes.