Skip to content

Fix selected outputs in the existing target eval cache - #57

Draft
jacobmichels wants to merge 2 commits into
jacob/tecnix-functional-tests-sqlitefrom
jacob/tecnix-cache-result-contract
Draft

Fix selected outputs in the existing target eval cache#57
jacobmichels wants to merge 2 commits into
jacob/tecnix-functional-tests-sqlitefrom
jacob/tecnix-cache-result-contract

Conversation

@jacobmichels

@jacobmichels jacobmichels commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

A warm Tecnix target-cache hit can return dev even when the target selected out. The existing cache remembers only the .drv path—the build recipe—so importing it loses the original output selection.

This PR fixes that existing behavior. It stores {drvPath, outputName} in a versioned result payload and reconstructs the selected output with its Nix string dependency information intact. Both fields are forced while source tracking is active, including a lazy output selector that does not change the recipe. Malformed payloads, unavailable recipes, and invalid output names fall back to evaluation.

The dependency-blob version advances to 2 so older records are relearned. Those records never tracked output-selection inputs and cannot safely serve even dependency-only queries under the corrected contract. The existing SQLite filename/schema, cache eligibility, evaluator-version handling, and packaging remain unchanged.

Checks:

  • Full build and the repository formatter passed.
  • Isolated Linux functional-test package: 215 passed, 0 failed, 10 skipped, with sandboxing enabled.
  • Tecnix builtins and gc functional suites plus nix-expr-tests: 3/3 passed.
  • Regressions cover selected outputs and string contexts, dependency-only warmup, deleted recipes, malformed payloads, lazy selector changes, and rejection of legacy dependency records.

Revision identities and build metadata for future remote-cache reuse are handled separately in #58. This PR depends on #59 for SQLite in the isolated test environment. #58 is the next layer above this selected-output fix. Native stack order: #59#57#58. This PR adds no remote transport or revision-stamping machinery.

@jacobmichels
jacobmichels force-pushed the jacob/tecnix-cache-result-contract branch from 71495c1 to b5a040c Compare September 5, 2026 04:21
@jacobmichels jacobmichels changed the title Preserve cached target outputs and isolate Tecnix revisions Fix cached target outputs and isolate evaluator revisions Sep 5, 2026
@jacobmichels
jacobmichels changed the base branch from main to jacob/tecnix-eval-cache-contract September 5, 2026 04:22
@jacobmichels
jacobmichels force-pushed the jacob/tecnix-cache-result-contract branch from b5a040c to c6edca7 Compare September 5, 2026 04:49
@jacobmichels
jacobmichels changed the base branch from jacob/tecnix-eval-cache-contract to main September 5, 2026 04:49
@jacobmichels jacobmichels changed the title Fix cached target outputs and isolate evaluator revisions Fix selected outputs in the existing target eval cache Sep 5, 2026
@jacobmichels
jacobmichels force-pushed the jacob/tecnix-cache-result-contract branch from c6edca7 to e4ccd76 Compare September 5, 2026 05:44
@jacobmichels
jacobmichels changed the base branch from main to jacob/tecnix-functional-tests-sqlite September 5, 2026 22:02
@jacobmichels
jacobmichels force-pushed the jacob/tecnix-cache-result-contract branch from 6a47eb0 to a845f0d Compare September 5, 2026 22:03
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