caelum0x f909885563 fix(audit-log): mirror deposit-received credits into the audit chain
MarkDepositReceived's ledger credit — the only path by which a deposit's
money becomes spendable headroom — was never mirrored into audit-log,
unlike ApplyEntry's credits and RecordAgentDecision. The claim that
"every money move is mirrored" (README, docs/SUBMISSION.md) didn't
actually hold for it.

Ledger::mark_deposit_received_with_entry now returns the credit
LedgerEntryRecord it produces (mark_deposit_received keeps its original
signature, delegating to the new method and dropping the entry, so
existing callers/tests are unchanged); grpc.rs's MarkDepositReceived
handler mirrors it into audit-log exactly like ApplyEntry's handler
already does.

Also wires audit-log into scripts/run-demo.sh (the bare-metal demo path
every judge following README's Quickstart/docs/DEMO-SCRIPT.md actually
runs) — it was only ever started via docker-compose, so the headline
"audit trail is the point" claim and the standalone verify-chain tool
were never exercised end to end by the documented demo flow. Verified
live: after a seed + simulate-deposit + agent-decision run, verify-chain
now reports real records (6, matching the 6 live Append RPCs audit-log's
own metrics counted) and correctly flags a single flipped byte as a
broken chain at the right sequence.
2026-10-22 02:19:21 +03:00
..