Commit 90c6fae
* Bound Codex cost cache persistence size
* Preserve resumable and fork-dependent cache entries
* Prune cache against requested window
* Prune candidate artifacts over byte budget
* Scope cache guards and preserve active sessions
* Keep cache loadable under byte budget
* Mark trimmed caches for catch-up and prune discovery
* Bound sole oversized entries and reset discovery cursors
* Mark stripped entries incomplete
* Preserve full report and live fork protection during trim
* Compact protected fork parents over budget
* Enforce byte cap after underestimated encodes
* Exclude lineage-only parents from fork protection
* Re-encode after forced prune and bound lookback state
* Use report window for catch-up and exclude lineage parents
* Compact parents required by kept trim survivors
* Prune orphaned discovery mappings under budget
* Preserve lookback work and align report bounds
* fix: lower cost-cache load cap and never persist a refusable artifact
The 1 GiB load cap still let a 256 MiB-1 GiB legacy artifact be decoded
in one shot, which is exactly the MALLOC_LARGE multi-GiB spike #2637
traced. Since save now bounds Codex artifacts to 256 MiB, anything
meaningfully above the budget is legacy and cheaper to rebuild bounded;
drop the cap to 320 MiB (budget + enforcement slack).
Also make save uphold the loader's contract: when budget enforcement
cannot shrink the payload below the load cap (unstrippable resume or
buffered state), remove the artifact instead of writing one that every
launch would decode just to refuse.
* Preserve recursive lookback roots and share ID capacity
* Keep legacy lookback roots in the scan queue
* Preserve complete report across repeated trims
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
1 parent 8870914 commit 90c6fae
4 files changed
Lines changed: 1911 additions & 13 deletions
File tree
- Sources/CodexBarCore
- Generated
- Vendored/CostUsage
- Tests/CodexBarTests
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
0 commit comments