Repository navigation
Lift nemar-ica's placeholder: an administrator can run it - #2462
Merged
Merged
Conversation
Owner decision of 2026-11-27: nemar-ica is no longer refused with recipe_placeholder, so an administrator's run (one dataset, the queue, the dry run) goes through every other check and stages the serving index. autoDispatch stays false and it stays Tapis-only. Tests that used nemar-ica as the registry's placeholder now assert it passes that gate. Tested: compute-pipeline, -input, -routes, -tapis-unconfigured, -grid, compute-derivatives, serving-index-staging, quality suites, recipe and contract unit tests; each changed case fails with the flag set back.
Not tested: ADR text only (adr-index unit test passes).
Not tested: changelog text only.
The 201 case served an index without stores, so it ran index_unusable and nothing checked the recorded serving_index. It now asserts that word, and a new case with a well-formed index asserts the recorded digest and size, the --serving-index and --source-commit arguments, and the copy kept under its digest. Tested: compute-pipeline-input; the new case fails when staging is forced to stage nothing.
placeholderRefusal is the one decision the run route, the dispatch, the dry run and the queue ask, unit-tested with a synthetic placeholder entry. The queue refuses a placeholder before its loop, so the word is dropped from STOPS_A_RUN. The registry test names nemar-ica's state only, so a future placeholder needs no rewrite. Tested: compute-recipes unit, compute-pipeline suites; the helper case fails with a missing flag read as a placeholder, or the check dropped.
Tested: compute-pipeline; fails when a deferral stops the queue.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2462Version: 🤖 Updated on each push. |
The queue refuses an unknown recipe, then a placeholder, in two plain branches with the same words as before. The registry loop in the placeholderRefusal test restated the function and could not fail. Tested: compute-recipes unit (53 pass), compute-pipeline (63 pass).
…ceholder # Conflicts: # CHANGELOG.md
neuromechanist
added a commit
that referenced
this pull request
Nov 27, 2026
Tested: adr-index unit test.
neuromechanist
added a commit
that referenced
this pull request
Nov 27, 2026
…e tag's (#2464) * Hand unstaged BIDS runs the tag commit A nemar-ica run of the archive with no serving index staged got no --source-commit, so its record stated no commit, its stamp had no input digest and its derivative was skipped for good (no_input_digest). The staging answer now carries the tag's commit whenever it was read, and the job spec hands it as --source-commit with or without an index. Tested: serving-index-staging, compute-derivatives (nemar-ica cases), compute-serving-index-contract; each new case fails with the fix reverted. * Amend ADR 0141: unstaged runs get the tag commit Names the mechanism decision 6 always implied: a run staged without a serving index is handed --source-commit and the tag's commit whenever it was read, so its derivative is keyed none and stored. Tested: adr-index unit test. * Agree on a skipped derivative in every view The grid and a run's detail read the stored checkpoint from a progress row that only the stamp sync resolved, so after the derivative store skipped a run they showed it pending until the next sync, and coverage counted it complete. The store's pass now resolves the stored rows it decided, and coverage complete excludes a run whose decided stored row did not keep every recording. Tested: compute-derivatives (new view cases), compute-progress-reconcile, compute-pipeline-grid, quality-admin-route; both parts revert-checked. * Changelog: unstaged BIDS commit, stored views Not tested: changelog text only. * Move the source commit case before the index args Keeps the new case apart from the nemar-ica placeholder case, which a parallel change edits. Tested: compute-serving-index-contract unit test (13 pass). * Import the stored resolver statically The read bounds and the derivative object prefix move to a leaf module the progress and quality modules read, so the store imports resolveDecidedStored at the top with no cycle; the dynamic import and its catch, which only guarded the module load, are gone. Tested: compute-derivatives, compute-progress-reconcile, quality suites (252 pass). * Key a BIDS stamp only by the commit it was handed keyStamp trusted the record's git: digest. When the recorded spec hands --source-commit, the stamp's digest must be exactly git:<that commit>; another commit, or two handed, is digest_mismatch. Tested: compute-derivatives (98 pass); the two mismatch cases fail with the check removed. * Hand every BIDS run its tag commit, or defer it Every Worker-dispatched run of the archive, nemar-floor included, now reads its version's tag commit at dispatch and gets --source-commit. A GitHub fault defers the run (source_commit_deferred, a refused stamp, no end; it stops the queue); an absent tag refuses it (version_tag_absent, nothing written). Staging is handed the commit and reads only the index. Suites that dispatch a BIDS run use a GitHub tag stand-in (helpers/github-tags.ts). The coverage case now uses a genuinely unkeyable run (digest_mismatch), as does the CLI help. Tested: 29 backend compute and quality suites (1059 pass) plus the callback, cron, sweep, metadata and CLI suites; revert-checked. * ADR 0143: BIDS runs get their tag commit Supersedes the last clause of ADR 0121 decision 10 and refines ADR 0141 decisions 3 and 4 (pointers in both); the 0141 amendment added earlier on this branch is folded into it. Tolerates the 0142 gap that PR #2458 reserves. Tested: adr-index unit test. * Changelog: every BIDS run gets its tag commit Not tested: changelog text only. * Stage an index ahead of its tag by NEMAR metadata One GitHub compare of the tag's commit and the index's admits an index whose commit is ahead by .nemar/, .github/ and .gitattributes paths only; the spec records ahead_of_tag (both commits, changed paths) and the run is handed the index's commit, the one the recipe accepts. Behind, diverged, content changes and unlisted deltas are refused with their own words; an unread compare defers. Keying checks the handed commit is the admitted one. Tested: serving-index-staging (96), compute-derivatives (100), the contract unit tests and the compute suites (1127 pass); revert-checked. * ADR 0144: admit an index ahead by NEMAR metadata Supersedes ADR 0141 decision 2 in part, refines ADR 0143 decision 1 and ADR 0123 decision 3 for such a run; pointers in 0141 and 0143. Tested: adr-index unit test. * Changelog: metadata-ahead serving index Not tested: changelog text only. * Keep refused BIDS heads from stalling the queue Only a GitHub credential fault (no_github_credentials, token_mint_ failed) stops a run over the queue, and it ends the daily tick; a github_unreadable deferral is one repository's and is passed over. A run asks for PIPELINE_RUN_EXTRA_TRIES (10) candidates beyond its room, so datasets refused for a missing tag or deferred never fill it. The tag stand-in now answers both tag spellings. Tested: compute-pipeline-queue (33 pass); each new case fails with its mutation. * Keep the index deferral clock across commit waits A source_commit_deferred stamp no longer counts as another kind in SERVING_INDEX_DEFERRAL_AGE_SQL, so it does not restart the 24 hours. Tested: serving-index-staging (79 pass); the new case fails when the word is counted as another kind. * ADR 0143: only credential faults stop the queue Narrows decision 2, adds the extra tries to decision 3 and the clock to decision 5; index line and changelog follow. Tested: adr-index unit test. * Keep an admitted index the tag's; read patches Owner ruling: the run is the tag's. An index admitted ahead of its tag is handed with the tag's commit (--source-commit T) and keyed git:T; its own commit is provenance in ahead_of_tag (tag_commit, index_commit, changed_path_count, renamed from changed_paths). recipeJobSpec refuses an admission compared with another tag commit, or one ahead by nothing; StagedServingIndex drops its duplicate sourceCommit; keyStamp checks the handed commit is the recorded tag_commit. A .gitattributes edit is admitted only when its patch adds or removes no eol=crlf, working-tree-encoding, ident or non-annex filter, and refused unlisted without a patch. An over-bound compare is index_delta_unlisted, not a fault. The nemar-process arguments that let the recipe use an admitted index come in a later commit. Tested: serving-index-staging (116), compute-derivatives (100) and 14 more compute suites (834 pass in all), root contract, recipe, adr and CLI tests (146); seven revert checks. * ADR 0144: the run is the tag's; patch rule Hand T, keep S as provenance, state the owner's invariant, correct the claim that .gitattributes never changes bytes, say why the rule differs from ZARR_SOURCE_DELTA_ROOTS, and note that an unanswerable compare costs one 24-hour deferral. Renamed for the new title. Tested: adr-index unit test. * Attest an admitted index to the recipe The plumbing for nemarOrg/nemar-process#108: a run handed an index ahead of its tag keeps --source-commit T and adds --serving-index- commit S and one --serving-index-delta-path per changed path (old names of renamed files included, each once, code-unit order). A job's 64 arguments fit 24 paths, so admission refuses a larger delta as index_delta_unlisted instead of cutting it; a path with no UTF-8 form is refused. keyStamp keys such a run only when the arguments attest the recorded index commit and path count, and attest nothing when no index ahead of its tag was staged. The marker is gone. Tested: serving-index-staging (120), compute-derivatives (105), 14 more compute suites (843 pass), contract/recipes/adr/CLI unit (160), the drift test against nemar-process dev and #108 (16 each); six revert checks. * ADR 0144: the attestation arguments, 24 paths Tested: adr-index unit test. * Admit .gitattributes edits by an allow-list A block-list admitted !eol, -eol, -text and macro uses that change checkout bytes when CR LF conversion is in effect. Every attribute of every added or removed line, macro definitions included, must now be annex.* or diff/merge (any form), filter=annex, or text, binary, eol=lf set; any patch line, context included, that can turn CR LF on (eol=crlf, legacy crlf) refuses the edit. Lines starting +++ or --- are no longer skipped: a compare patch has hunk lines only. Tested: serving-index-staging (135 pass); the old block-list fails 7 cases, skipping +++/--- fails 2, dropping the context check fails 1. * Note the launch bytes of long non-ASCII paths Not tested: comment only. * ADR 0144: allow-list, deploy order after #2462 Tested: adr-index unit test. * Read each changed .gitattributes whole at S The patch shows only touched lines and a little context, so an unchanged eol=crlf line elsewhere in the file went unseen. Each changed .gitattributes the edit leaves at the index's commit is now read whole (GitHub contents at S, 1 MiB bound; a deleted file is skipped, a renamed one read under its new name) and any line, macro definitions too, that turns CR LF on refuses the index. A file that cannot be read whole is github_unreadable and defers. The stand-in answers contents. Tested: serving-index-staging (139), compute-derivatives (105) and six more compute suites; dropping the read fails 3 cases. * Docs: whole-file .gitattributes read, its cost Tested: adr-index unit test. * List every .gitattributes at S and read each * Docs: every .gitattributes read, its bound
7 of 8 tasks
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.
Summary
Lifts nemar-ica's placeholder flag (owner decision of 2026-11-27):
placeholder: falseinshared/compute-recipes.ts.autoDispatchstaysfalseand the recipe stays Tapis-only (executors: ["tapis"],inputs: ["bids"]); nothing in the code required otherwise.Compute stays dark: no switch, no Tapis configuration and no policy is touched.
What the flag gated
Every gate now asks one pure helper,
placeholderRefusal(recipe)inshared/compute-recipes.ts(review round 1):POST /admin/compute/pipeline/run(nemar admin compute pipeline run nemar-ica), one dataset,--eligible, and--dry-runrecipe_placeholder, after the executor checkdispatchPipelineJob(the service boundary for every caller)recipe_placeholderpipelineDryRunrecipe_placeholderwould_dispatchorblocked)dispatchEligible(the queue)recipe_placeholderplaceholderfield)true, so the admin page shows "This recipe is a placeholder: it is not dispatched automatically yet."false, so the page no longer shows that noteNot gated by the flag, and unchanged: the eligibility predicate (
eeg), the grid's rows and coverage counts, the derivative store, the quality routes, and the daily dispatcher, which runs onlyautoDispatchrecipes (and the service answers a cronrecipe_not_automaticfor nemar-ica).The
recipe_placeholdermechanism stays for a future placeholder.With none left in the registry, no real door can be driven into it, so the decision is unit-tested on a synthetic registry entry (the floor's, with
placeholder: true), and the four call sites use the helper.The queue refuses a placeholder before its loop, so
recipe_placeholderis dropped fromSTOPS_A_RUN, where no dispatch inside the loop could return it.What changes for an administrator
nemar admin compute pipeline run nemar-ica --dataset <id>(or--eligible --limit <n>, with or without--dry-run) is no longer refused as a placeholder.A dry run now says what a run would do.
compute_disabledwhileCOMPUTE_ENABLEDis off (production today),tapis_unconfiguredwithout a Tapis configuration,registry_drift, the dataset's eligibility and version, the runtime image and the pipelines service account.serving_index_deferred, a refused stamp, no job, no hold) for up to 24 hours; otherwise it claims a stamp, holds the estimate against the pipelines GPU pool (gpu-shared, 10 cores, 1 GPU, 720 minutes) makes anemar-launchTapis job and tries one submit at once (the 30-minute tick submits a job that waits).--executor runneris still refused (invalid_body, the recipe lists Tapis only), and the daily dispatcher still never runs it.deploy/tapis/released-versions.jsonis still empty, so none is).The website
No website change is needed: the note is shown only while the API says
placeholder: true(nemarOrg/websitesrc/pages/admin/pipelines/[recipe].astro, line 145), and its copy (src/lib/compute-pipeline-labels.ts,placeholderNote, line 62) stays for a future placeholder.Docs
ADR 0140 and the index entry for it keep their sentence that no nemar-ica derivative existed when that was decided, which stays true.
It will conflict with Hand every BIDS run its tag commit; agree on skipped derivatives #2460's "Fixed" entry under the same heading, whichever merges second; keep both.
Tests
Changed cases:
compute-pipeline-input.test.ts: through the real route and the GitHub stand-in, a dry run of nemar-ica would dispatch, and an administrator's live run answers 201 with adispatchednemar-icabidsstamp and atapispipelinejob. With the world's index (nostores) the recorded specification says{reason: "index_unusable"}and nothing is kept; with a well-formed index of the tag's commit it records{sha256, size}, the arguments carry--serving-index /data/serving-index/index.json --source-commit <commit>, and the copy is kept underserving-index/<sha256>.jsonwith that size and digest.compute-pipeline-routes.test.ts: dry runs of one dataset and of the queue answerwould_dispatch, and a live run in a Worker without GitHub credentials is deferred (503serving_index_deferred,no_github_credentials), neverrecipe_placeholder.compute-pipeline.test.ts: the service's dry run, run and queue: the run and the queue's one result areserving_index_deferredwithno_github_credentials, the queue'sstoppedByis null, and only refused stamps, no job and no submit are written.compute-pipeline-tapis-unconfigured.test.ts: in the service's order nemar-ica now meetstapis_unconfigured.compute-recipes.unit.test.ts: nemar-ica is not a placeholder, not automatic and Tapis-only (the test names nemar-ica only, so a future placeholder needs no rewrite), andplaceholderRefusalrefuses a synthetic placeholder entry and nothing else.compute-serving-index-contract.unit.test.ts: nemar-ica is Tapis-only.Revert checks (each restored afterwards):
placeholder: trueput back: all six changed cases fail (4 backend, 2 unit).placeholderRefusalreading a missing flag as a placeholder, or never refusing: the helper case fails.serving_index_deferredadded toSTOPS_A_RUN: the queue case fails.Not run: the full
bun test(about 80 minutes); would check every other suite that names nemar-ica or reads the registry (the website-facing contract tests and the docs generators), because only the files above were found by greppingplaceholder,recipe_placeholderandnemar-ica.Merged with dev after #2460
#2460 (978a55b) is merged in (a merge commit). It hands every run of the archive its tag's commit, read before the serving index (ADR 0143), and gives the suites that dispatch such a run a GitHub tag stand-in, so the two nemar-ica cases here now see the run deferred by the index read:
compute-pipeline.test.tsandcompute-pipeline-routes.test.tsexpectserving_index_deferredwithindex_unreadable(wasno_github_credentials). The CHANGELOG keeps this PR's "Changed" entry above #2460's "Fixed" entries under Unreleased, and its sentence now names the tag's commit read andsource_commit_deferred.After the merge: compute-pipeline and compute-pipeline-routes 99 pass; compute-pipeline-input 36, compute-pipeline-tapis-unconfigured 29, compute-pipeline-queue 33, serving-index-staging 79, compute-derivatives 98; compute-recipes unit and adr-index 64; typecheck clean; all 0 fail.
Agentic AI tools were used. Workflows follow the Research Skills (doi:10.5281/zenodo.20696515). The author assumes full responsibility for this content and associated changes.