receipt-ledger: tariff version 6 prices an endpoint and a third party's usage, and bills an upscale and a tone mapping by what re-derives them #591
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/tariff-v6-b"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tariff and invoice version 6, specified in
extensions/receipt-ledger.md§4.9. It does three things, in one version so a buyer signs one new tariff and not three:usage, takes what the hop's record states the provider bills (route-record §6.2), at that endpoint's price for that unit.Decisions a reviewer should check
tariff_invalid). It would bill one job at both. The alternative, the specific price winning, would mean a buyer has to work out which price applied.chargeisn't on the line. This drops an earlier proposal. A line adds jobs, and a provider's figure is a string in its own terms, so it can't be summed. The line cites the record, which states it signed.What it can't prove
What ran
wai_receipt_ledger_vectors verifyregenerates it byte for byte and gives every vector its outcome.tests/receipt_ledger.rs8 passed, including a new one pinning version 6's figures; the module's unit tests passed.receipt_ledger_verify.pyagrees on all 169, usingupscale_verify.pyandtonemap_verify.pyto re-derive independently. It refuses all 183 mutated copies of the corpus, and the corpus catches it with each of its 51 checks dropped.usagewas refused by a different rule first;wai breaking: nothing unacknowledged. The breaking additions are listed in the changelog.Not run: the mutation run predates this branch's rebase onto main, which moved the commit and changed none of its files' content. The full
cargo teston every workspace is left to CI.Debug test time: CI runs the ledger test in a debug build. It takes 11m29s with this change and 11m57s without on the Framework, the latter while another job was running, so it adds no measurable time.
Follows this:
media.upscaleandmedia.tonemapare priced by name here, and #578 adds them to the catalogue with their commands. waiTransport then re-pins, moves to WAI's third-party record in place of its provisional one, and offers tariff version 6.This replaces #579, whose branch could not be updated in place: the same commit, rebased onto main after #578 merged (CHANGELOG was the only conflict). Retested after the rebase:
receipt_ledger_verify.py(every case, 183 mutated copies, 51 dropped checks), the lib's ledger and route-record tests (23) andtests/receipt_ledgerandtests/route_record(8 each).🤖 Generated with Claude Code