Repository navigation
Align recipe registry versions with the images - #2329
Merged
Merged
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2329Version: 🤖 Updated on each push. |
This was referenced Nov 23, 2026
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ADR 0134 Phase 2 (epic #2324) attaches checkpoint maps to the registry entry's version.
The registry said
nemar-floorandnemar-icaare1.0.0with engine[email protected],but the nemar-process images (origin/dev) report
RECIPE_VERSION = "1.0.0-b1"for both(
recipes/nemar_process/nemar_floor/steps.py,nemar_ica/steps.py; pre-release scheme indocs/recipes.md)and the engine as
[email protected]+edf694c8344b9c4c68672eac3acf9a819f1462a8,because eegprep is installed from a pinned git commit and
common/versions.pyappends the commit (docs/recipes.md, 54 characters).With the old values every real run would reconcile as
no_checkpoint_map, and, already today,end in
tuple_mismatchand hold the registry tuple (registry_drift).The engine is changed with the version: aligning the version alone would leave every run a
tuple_mismatch.Change
shared/compute-recipes.ts: both entriesversion: "1.0.0-b1",enginea sharedRECIPE_ENGINEconstant with the image's text; a docblock says where the values come from.appVersion(the Tapis application version) is unchanged.backend/test/helpers/compute-pipeline-fixture.ts) now writes what the image writes, and the assertions and seeded stamps that stand for the registry tuple follow it.Contract vectors (
shared/contract/derivatives-vectors.json) and the pinned legacy pipeline-key text are fixed inputs, not registry reads, and are unchanged.Investigation: does the string change behavior for existing rows?
Where the registry version and engine are read (origin/dev):
recipe.version, recipe.engine(backend/src/services/compute-pipeline.ts:753,:1400); candidates (--eligibleand the daily dispatcher) bind them at:1281-1282; the tuple hold check at:648.SUCCEED_STAMP_SQL,:346), and a record differing from the claimed tuple holds the claimed tuple (:1086-1104).pipelineKey(:366) and the derivative keys (compute-derivatives.ts:470-472, migration 0143) read the stamp row, never the registry.-and+, and the engine text fits the 64-character column and the derivative-key contract regex.src/commands/admin-compute-pipeline.ts) only prints stamp values; no help text states a version. No website parity reads these values.Effects (also in
CHANGELOG.md## Unreleased):1.0.0/[email protected], only the pre-scheme demonstration image writes it) stop blocking re-dispatch of their dataset.tuple_mismatchholds on the old tuple stop applying, asHOLD_TUPLE_SQLdocuments.tuple_already_stamped. Deploy with no opennemar-floorstamps.1.0.0-b1image already holds the new tuple (rewritten on success) and now blocks re-dispatch, as it should.compute-derivatives.ts:37).Deploy order. No published image reports the new tuple yet (nemar-process
mainis still1.0.0with eegprep from PyPI). If this ships first, the first finished run holds the NEW tuple and that hold never clears. Order: nemar-process release, publish the runtime image frommain, repinCOMPUTE_RUNTIME_IMAGEwherever compute is or will be on, check the pinned digest's tuple withnemar-recipe version, then deploy this.I could not query production or staging D1 for existing stamp rows (read access was denied in this session), so the count of rows on the old tuple is unverified; the code paths above bound the effect.
Review round 1
CHANGELOG.md## Unreleasedentry: the new tuple, the deploy order, the effects on existing rows; mirrored above.shared/compute-recipes.tsnames the sources (RECIPE_VERSIONinrecipes/nemar_process/{nemar_floor,nemar_ica}/steps.py, the eegprep git pin inpyproject.tomlwith the suffix fromcommon/versions.py), says the values must match the imageCOMPUTE_RUNTIME_IMAGEpins and that a move repins the image first, thatRECIPE_ENGINEmoves with the pin and loses+<commit>at an eegprep release, and thatnemar-icamoves on its own pins.test/compute-recipes-process-drift.unit.test.ts: each registryversionequals the recipe'sRECIPE_VERSION, andengineequalseegprep@<uv.lock version>+<pyproject git rev>(bare from an index). The four files are added to the nemar-process sparse checkout (ref: dev) in.github/workflows/test.yml, andNEMAR_REQUIRE_PROCESS_RECIPES=1is set next to its siblings, so a missing checkout or file fails.Evidence on a local sparse extract: against nemar-process
origin/dev4 pass; againstorigin/mainit fails (nemar-floor.versionexpected1.0.0, received1.0.0-b1); with the registry engine mutated to[email protected]againstdevit fails (nemar-floor.engine); with the version mutated to1.0.0it fails (nemar-floor.version); required with no checkout, 2 fail; unset, 2 skip.backend/test/helpers/compute-pipeline-fixture.tssays it catches drift from this copy of the image's record, and names the cross-repo test.tuple_mismatchlog -> now endsversion_differs,engine_differsor both (field names only), with three tests inbackend/test/compute-pipeline.test.ts(mutation: droppingengine_differsfails two).Review round 2
pyproject.toml(false pass) -> the engine now comes only from the eegprep block ofuv.lock: itsversion, plus the resolved commit after#insource = { git = "...#<sha>" }; aregistrysource gives the bare engine;pyproject.tomlis no longer read or checked out. Parser cases: a git lock, an index lock, a[tool.uv.sources]/branch-style lock entry, and the eegprep-lean block's commit never chosen. Reproduced on an extract of nemar-processdevwith the real pin moved to a new commit (lock moved too) and the old pin left commented out above it: the round-1 test passes (4 pass), the new one fails (nemar-floor.engineexpected[email protected]+2222..., received...+edf694c8...).expect(COMPUTE_RECIPES.length).toBeGreaterThan(0)before the loop.test.ymlcheckout comment lists the new paths and their size (uv.lockabout 600 KB);pyproject.tomldropped from the sparse list.recipeVersionOfaccepts a type annotation, either quote style and a trailing comment, and still ignores a commented-out line; cases for each.Tests
Run:
backend: alltest/compute-pipeline*,test/compute-derivatives*,test/compute-runner*(17 files, 674 pass),compute-fixture-eligibility,zarr-source-check(110 pass)test/admin-compute-*.test.tsandtest/compute-*.unit.test.tsfile by file (all pass),test/contract-derivatives.unit.test.tsdev(6 pass), againstmain(fails onnemar-floor.version), unset (skips visibly);compute-recipes.unit,ci-tier-routing.unittest/compute-recipes-process-drift.unit.test.ts(with the checkout),compute-recipes.unit,admin-compute-pipeline-cli,ci-tier-routing.unit,compute-observation-contract.unit,env-undefined-guard.unit,changelog-format.unit; backend compute pipeline, derivatives and runner suites again (677 pass)bun run typecheck,bun run lint,biome checkon the changed filesNot run: the full
bun test(about 80 minutes; it runs at epic todevper the testing rules).