Repository navigation
Savings review fixes that missed 0.7.0 (0.7.1) - #37
Merged
Merged
Conversation
… the settled state (cherry picked from commit 608139d4b17579852a0382f0fe936214f9f390f0)
…odies A failed per-model catalog reload is no longer cached forever: it is retried after CATALOG_RETRY_MS. A models.dev body with no priced models is treated as a failed fetch, so it no longer replaces a good cache. Also: suffix regexes move to constants/, property tests for the catalog and models.dev parsers, a wider fetch-json timeout window, .ts imports. (cherry picked from commit db299a8b07044da8b48004452267b90d3efabb1e)
(cherry picked from commit a745a77ef8231b042a91fe920b1659e44802bd47)
…es start on session turns only (cherry picked from commit 8b452382beb351136f629b260b88dc928561fdea)
(cherry picked from commit 15929d3d6a251757f451977ed572e3d27eb3f615)
(cherry picked from commit 0de02cf5eef72bc47a491ed8f0b0ffb7da8a73c4)
SonarCloud flagged 6.7% duplication on new code (limit 3%): the aged alias test copied the ping mock from the alias test above it, and the split-cache tests repeated the same turn, hit ping and return.
|
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.



This PR bumps the version to 0.7.1, so merging it into
maintriggers the release.These six review-fix commits were made on the local savings stack branches but never pushed, so they missed the 0.7.0 release (#29–#34). They are cherry-picked onto
mainhere with-x, and all six applied without conflicts.Fixes
PriceBook): a failed catalog reload is no longer cached per model, so a later lookup retries. Reloads are spaced at leastCATALOG_RETRY_MS(60s) after a failure.ModelsDevPrices): a body with no priced models is rejected as a failed fetch, not cached for a day. Providers with no priced models are dropped from the pruned body.DATE_SUFFIXandLATEST_SUFFIXmove toconstants/savings.ts.LedgerStore): a storage read error is no longer cached as empty totals. Changes made while the record is unreadable are held back and applied after the next successful read, so a stored ledger is never overwritten blind.KeepaliveEngine): on wires that report no 1h/5m split, the first primary context stands in for the prefix. Only hybrid turns count a 1h write as the prefix. Title and generate calls no longer end a stretch or overtake a pending return; only primary and compaction turns do.pingsshows a cost only when every ping was priced. Thecache.writenote now says it covers 5m and 30m writes, while 1h and 12h writes are priced frominput. Added a CONTRIBUTING note on regenerating all three images.Also in this PR
###sections nested under their parents.Checks
bun run build,fmt:check,lintandtypecheckare clean.bun test: 1139 pass (up from 1122 onmain).bun scripts/capture-sidebar.ts --allregenerates byte-identical images. The changed "Savings turned off" sample renders the same, as it should.detect_changesrates this high risk: 41 symbols in 15 flows, all in the savings and keepalive area.