Bounding the current-generation set (D4)
Goal
After warm configurations exceed the budget, recent-tier generations are reclaimed down to the composed bound and no configuration count pins the cache permanently.
Implementation Sketch
Derived from compiler_repo/docs/ori_lang/proposals/approved/binary-generation-lifecycle-proposal.md. Depends on the cache root, budget, collection pass, and D3a in-flight-reference primitive delivered by plans/cache-lifecycle/ (approved cache-lifecycle-proposal.md). Implement the work items in order.
Spec References
- Approved proposal:
compiler_repo/docs/ori_lang/proposals/approved/binary-generation-lifecycle-proposal.md - Depends on:
compiler_repo/docs/ori_lang/proposals/approved/cache-lifecycle-proposal.md(D3a primitive, composed bound) - Umbrella invariant T4:
compiler_repo/docs/ori_lang/proposals/approved/toolchain-philosophy-proposal.md
Work Items
- Rank current generations in the global reclaim order via DEAD / COLD / RECENT tiers — no permanently-exempt class; contribute the
LEASEDterm to cache-lifecycle’s composed bound - Thrash guard: reclaim the RECENT tier only after DEAD/COLD and every higher class are exhausted, least-recently-built first; defer never cancels — proceed to the budget even when all remaining generations are recent
- Represent the
no current generationstate soori runrebuilds rather than errors;ori cache inforeports the current-generation set and its rank separately