Skip to content

feat: evalWarm (warm-cache eval) + recordedDeps#1

Merged
sini merged 4 commits into
mainfrom
feat/v2-seams
Jun 24, 2026
Merged

feat: evalWarm (warm-cache eval) + recordedDeps#1
sini merged 4 commits into
mainfrom
feat/v2-seams

Conversation

@sini

@sini sini commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Two additive pure-Nix evaluator primitives in lib/eval.nix. Purely additive — eval/evalDebug behaviour is unchanged, and the existing suites stay byte-green.

  • evalWarm — relocatable warm-cache evaluator for incremental re-evaluation. A leaf attribute of a clean node (isClean id) whose value is present in priorResults is served from the cache without forcing its compute function; everything else evaluates cold. children/derived-children are never warm-served — tree structure is always recomputed, so a dirty descendant stays reachable through freshly-materialized parents. Thin wrapper over eval: they share the per-attribute evaluator (evalAttr), and eval carries priorResults/isClean as warm-off defaults, so eval and warm-off evalWarm are byte-identical. (Informed by Acar's self-adjusting computation.)

  • recordedDeps — first-class projection of a consumer's declared read-edges (declaredEdges id). Pure and memo-free. The dynamic read-set is only recoverable via evalDebug's fresh-self-per-get, which defeats memoization, so the declared edges are the inspectable contract.

The first commit factors the duplicated root/child attribute loops into one shared evalAttr with optional warm params — eval stays byte-identical (the existing eval suite gates it).

163 tests (152 existing + 11 new across the eval-warm and recorded-deps suites), TDD red-first, treefmt-clean.

sini added 4 commits June 23, 2026 22:39
…ancements

- README: document evalWarm and recordedDeps (signatures, semantics, examples),
  add them to the ToC, and add an Acar (self-adjusting computation) provenance row
- README: fold in the neron traversal-order stable-contract note and the
  "D over I over P" wording, and refresh the test count (163 tests / 19 suites)
- lib/eval.nix: rewrite the new-primitive comments in house style — drop
  project-internal seam labels, spec-section refs, and brittle line-number
  references; keep the Acar citation
@sini sini changed the title feat: v2 seams — evalWarm (S1), recordedDeps (S2) feat: evalWarm (warm-cache eval) + recordedDeps Jun 24, 2026
@sini sini merged commit 8f66fe1 into main Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant