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).
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 insrc/core/runs.ts(one call),scripts/ledger-verify.ts, the test, the doc. Touch nothing insrc/flow/,src/web/ordocs/design/.scout/1386-a-cost-ledger-per-delivery-tokens-computat 169230c70b91 has asrc/core/ledger.tsworth reading.Risk: the finish path is hot; the append must not throw into it (log and carry on).