0%

Global content-addressed cache migration (D0, D1)

Goal

A relative ori_cache is rejected with a diagnostic and no build silently falls through to a temp-dir cache.

Implementation Sketch

Derived from compiler_repo/docs/ori_lang/proposals/approved/cache-lifecycle-proposal.md. Implement the work items below in order; each maps to a design bullet in the approved proposal.

Spec References

  • Approved proposal: compiler_repo/docs/ori_lang/proposals/approved/cache-lifecycle-proposal.md
  • Umbrella invariant T4: compiler_repo/docs/ori_lang/proposals/approved/toolchain-philosophy-proposal.md

Work Items

  • Introduce the ORI_CACHE root override and add ORI_CACHE + ORI_CACHE_BUDGET to the is_unfingerprinted_environment exemption list in the same change (else setting either disables the cache)
  • Strengthen relative-path detection into rejection with an explicit diagnostic naming the variable; remove the silent $TMPDIR/ori-cache third-tier fallback for a relative-or-unset HOME
  • Migrate ArcIrCache off the project-local build/cache/functions/arc_ir/ layout into the global root; update incremental/mod.rs module docs that describe the superseded build/cache/ tree
  • Adopt the CACHE_FORMAT_VERSION path-component migration gate: an unrecognized version is a cold cache, never a misparse