feat(estimate-history): price get_estimate_history at the API list price (ST-074) #216
No reviewers
Labels
No labels
severity/s2
severity/s3
severity/s4
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
janpeter/scrum4me-mcp!216
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/st074-estimate-history-list-price"
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?
Part of ST-074 (ISS-4 part 2):
get_estimate_historypriced actual USD with the ClaudeUSD_PROXYsubscription card. After this PR nothing in the mcp readsUSD_PROXYorCREDITScards, so the 11 production USD_PROXY rows can be deleted.What
get_estimate_historyprices at the API list price (model_prices:billing_mode = API,billing_unit = USD, standard tier) of the runtime of each usage segment, withfullyListPricedTaskSqlText,listPriceJoinSqlTextandlistPriceUsdSqlTextfrom scrum4me-shared (same definitions as Scrum4Me Insights and workers/usage). A Codex segment is priced too. A task with a line without an API/USD card keepsactual.usd: nullandusd_status: 'no_price', also when a subscription card exists, so the API/USD cards must be seeded (production has all 12 Claude cards).buildSubscriptionRateCardCriteria/findSubscriptionRateCard(no caller insrc) with their test;resolveCodexPricingModelandgetCodexPricingModelDefaultstay.vendor/scrum4me-sharedto6109a4a(scrum4me-shared#82). Its fixturemeasurable-v1now carries the real rates on API/USD cards, so the fixture test expects themeasurabletask priced again (0.2320, ratio 0.09).ppe-bundle1-paritypins the new gitlink.Verified
npm testwithout database: 271 files / 2683 tests pass (84 skipped);tsc --noEmitclean.postgres:17-alpine(TEST_DATABASE_URL):usage-ledger.integration15/15 and the full suite 2732 pass. New cases: Claude task priced from the API card (proxy card ignored), task with only a subscription card / one unpriced line givesno_price, Codex segment priced from the openai card, same model on a Claude segment givesno_price. Swapping the old implementation back made four of them fail.Rollout
Takes effect on the workers after the MCP rollout (pin on both hosts, 154 and max2).
🤖 Generated with Claude Code
APPROVED
Findings
De prijsjoin en de volledigheidscontrole gebruiken dezelfde gedeelde API/USD-definitie, inclusief runtime per segment. Ontbrekende kaarten leveren geen gedeeltelijk USD-bedrag op. De verwijderde subscription-helpers hebben geen resterende aanroepers; de Codex-modelresolutie blijft behouden. De submodulewijziging en documentatie sluiten aan op deze wijziging en de productstandaarden.
Plan
plan gekoppeld via pr_refs (product scrum4me-workers).
Referentie: ST-074 (scrum4me-workers). Geen omitted onderdelen.
De diff voldoet aan de codeonderdelen van T-235 en T-236 en bevat de bijbehorende shared-pin. Deze PR noemt zichzelf onderdeel van ST-074 en claimt geen volledige story-oplevering. De read-only vergelijkingssnapshot is niet bij de review-invoer gevoegd; de productievergelijking, uitrol op beide hosts en data-opruiming moeten bij de vervolgplantaken worden aangetoond.
Verificatie
Beoordeeld op head
8f9b8d3206; PR en head via Forgejo gecontroleerd.De overige optionele database- en dispatch-gates zijn niet uitgevoerd.