Repository navigation
fix(accountant): Harden stats cache key, state file and panics (#916 #917 #918 #920) - #928
Merged
Merged
Conversation
The key rounded since and until down to 30 s, so a narrower window got the wider window's cached totals. The key now holds the exact values. The UI rounds its own now to 30 s so relative ranges still share a key. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: DAVID BOAZ <DAVIDBO@il.ibm.com>
…past nested cache marks (#917) Wrap the snapshot in a proxy version and refuse another one. Sync before the rename, skip an unchanged write and remove stale temp files at start. Strip cache_control at any depth before hashing a body element. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: DAVID BOAZ <DAVIDBO@il.ibm.com>
The keeper's ping row and PingSavings now recover and log, so a library panic cannot end the process. accBegin recovers and drops its record, so a panic on a hostile body no longer reaches the pre-forward recover. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: DAVID BOAZ <DAVIDBO@il.ibm.com>
…e map (#920) A realistic first turn books its cost when the price is known. The reported rows had no price: the price map loads in the background and the first requests arrived before it finished. No code change. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: DAVID BOAZ <DAVIDBO@il.ibm.com>
This was referenced Nov 5, 2026
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
This PR fixes four accountant and dashboard issues on top of
integ/batch1. It does not bump the accountant pin.What changed
cacheKeykeepssinceanduntilexact. The UI rounds its ownnowto 30 s, so relative ranges still share a key.cgStateVersion(now 2); other versions are refused and the proxy starts empty.SyncbeforeRename. Stale*.tmp*files removed at restore. Save skips an unchanged write.withoutCacheMarksstripscache_controlat any depth. Not done: mtime vs snapshot age (5) andflock(6). Item 5 is only an optimisation, and item 6 changes behavior for two proxies on one DB and needs a human decision.PingSavingsanddashEmitter.KeepAlivePingrecover and log.accBeginrecovers and drops its record, so a panic on a hostile body no longer reaches the pre-forward recover.$0rows in the A/B run had no price: the price map loads in the background, and the first three requests came 1.3 s after start. Tests pin both cases. No code change.Figures can change: the state hash version means one restart after upgrade starts with empty thread state.
How it was tested
accBeginpanic, emitter panic.go test -count=1ondash,proxy,apply,keepalive,components: pass.TestRateFillTableAndPrice.Assisted-By: Claude (Anthropic AI) noreply@anthropic.com