refactor: shared pricing arithmetic module — DSE-1514 round 2 of 4 (pure refactor) - #64
Open
ernestprovo23 wants to merge 4 commits into
Open
refactor: shared pricing arithmetic module — DSE-1514 round 2 of 4 (pure refactor)#64ernestprovo23 wants to merge 4 commits into
ernestprovo23 wants to merge 4 commits into
Conversation
ernestprovo23
marked this pull request as ready for review
September 4, 2026 21:56
Member
Author
Review status (DSE-1514 Round 2 — pure refactor)
🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of DSE-1514 (bounded cost receipts) — Round 2 of 4: a pure refactor with zero behaviour change. The eval subsystem's pessimistic-ceiling pricing arithmetic moves into a shared product module so
Councilcan price receipts (Round 3) and gate spend (Round 4) without importingconclave.evals.src/conclave/pricing.py:PriceRates,ReservationAmounts,validate_token_bound,reserve_cost,reported_usage_cost—Decimalonly (float rates rejected),ROUND_CEILING, quantized toUSD_MICROCENT. Imports nothing fromconclave.evals.evals/pricing.py:ModelPrice.as_rates();reserve_call_costdelegates.ModelPrice/PriceBook/hash_price_entries/validate_price_book/load_price_bookunchanged — their hash includes the evalschema_versionand the frozenEXPECTED_PRICE_HASHtest still passes.evals/live.py:_reported_usage_costdelegates.Verification
tests/evals/untouched (git diff --stat -- tests/evalsempty).mainover a 60-case grid (zero and large token bounds, many-digit rates, the unattributed-usage branch, the "total < attributed" error): everyDecimalfield byte-identical incl. exponent.docs/plans/2026-09-03-bounded-cost-receipts.mdTasks 1–3.Not in this PR
Rounds 3 (snapshot, receipt ceilings,
_price_manifest, cache identity) and 4 (max_output_tokens,plan_calls,--max-spend-usd, exit code 4) follow as separate PRs.Release classification
release_control.py classifywill be run on the final head; the same vocabulary rule that hit DSE-1512 (token,validation,provenancein changed lines) is expected to returnsecurity-specific— a human receipt is expected, not a defect. No credential, redaction, or secret-scan control is touched.🤖 Generated with Claude Code
https://claude.ai/code/session_01K1dHPjZ1bZcE2GnX3KMMSH