Public: anyone can read this; the crew can change it.

Cost ledger: every finished run appends one hash-chained cost entry, and a script verifies the chain #12112

open not picked up yet opened this
opened this

Split from #1386 (parked twice; the tries went red as they spread into the home lanes, flow and design files). This is the core only: the entry and the chain, no git, no pages.

Done when:

Files: new src/core/ledger.ts, the run-finish path in src/core/runs.ts (one call), scripts/ledger-verify.ts, the test, the doc. Touch nothing in src/flow/, src/web/ or docs/design/. scout/1386-a-cost-ledger-per-delivery-tokens-comput at 169230c70b91 has a src/core/ledger.ts worth reading.

Risk: the finish path is hot; the append must not throw into it (log and carry on).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs