Skip to content

Lift nemar-ica's placeholder: an administrator can run it - #2462

Merged
neuromechanist merged 8 commits into
devfrom
feat/nemar-ica-not-placeholder
Nov 27, 2026
Merged

neuromechanist merged 8 commits into
devfrom
feat/nemar-ica-not-placeholder

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Lifts nemar-ica's placeholder flag (owner decision of 2026-11-27): placeholder: false in shared/compute-recipes.ts.
autoDispatch stays false and 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) in shared/compute-recipes.ts (review round 1):

Where Before (nemar-ica) After
POST /admin/compute/pipeline/run (nemar admin compute pipeline run nemar-ica), one dataset, --eligible, and --dry-run 422 recipe_placeholder, after the executor check goes on to every other check of a run
dispatchPipelineJob (the service boundary for every caller) recipe_placeholder every other check, then the serving index staging (ADR 0141)
pipelineDryRun recipe_placeholder the run's own verdict (would_dispatch or blocked)
dispatchEligible (the queue) stopped at once, recipe_placeholder runs over the eligible datasets up to its limit and room
Grid and coverage summary (placeholder field) 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 note

Not 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 only autoDispatch recipes (and the service answers a cron recipe_not_automatic for nemar-ica).
The recipe_placeholder mechanism 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_placeholder is dropped from STOPS_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.
  • A live run then meets, in order, the checks every Tapis run meets: compute_disabled while COMPUTE_ENABLED is off (production today), tapis_unconfigured without a Tapis configuration, registry_drift, the dataset's eligibility and version, the runtime image and the pipelines service account.
  • Past those, it stages the serving index (ADR 0141): a GitHub or index fault defers it (503 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 a nemar-launch Tapis job and tries one submit at once (the 30-minute tick submits a job that waits).
  • --executor runner is still refused (invalid_body, the recipe lists Tapis only), and the daily dispatcher still never runs it.
  • Before the owner turns compute on for it: ADR 0141 decision 1 says a launcher that reads launch specification version 1 must never be registered for this recipe (nemar-process deploy/tapis/released-versions.json is still empty, so none is).
  • Related: Serving indexes are built after the version tag: nemar-ica stages none for 807 of 812 #2461 (807 of 812 serving indexes are built from a later commit than their tag, so a run would stage no index for almost every dataset) and Hand every BIDS run its tag commit; agree on skipped derivatives #2460 (such a run can then be stored).

The website

No website change is needed: the note is shown only while the API says placeholder: true (nemarOrg/website src/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 0141's consequence "nemar-ica stays a placeholder ... until the owner lifts that" now says it was lifted (amended 2026-11-27), and ADR 0118's example of a placeholder recipe says "until 2026-11-27".
    ADR 0140 and the index entry for it keep their sentence that no nemar-ica derivative existed when that was decided, which stays true.
  • CHANGELOG Unreleased, "Changed".
    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.
  • Test comments that gave "nemar-ica is a placeholder" as the reason a stamp is seeded with SQL now give the real reason (the suite does not make a Tapis job or stage an index).

Tests

(backend) bun test test/compute-pipeline-input.test.ts test/compute-pipeline-routes.test.ts test/compute-pipeline-tapis-unconfigured.test.ts test/compute-pipeline.test.ts test/compute-pipeline-grid.test.ts test/compute-derivatives.test.ts test/serving-index-staging.test.ts test/quality-admin-route.test.ts test/quality-documents.test.ts test/quality-route.test.ts
 451 pass, 0 fail (3103 expect() calls)
(root) bun test test/compute-recipes.unit.test.ts test/compute-serving-index-contract.unit.test.ts test/compute-admin-contract.unit.test.ts test/adr-index.unit.test.ts
 134 pass, 0 fail
Round 1: (backend) compute-pipeline-input, -routes, -tapis-unconfigured, compute-pipeline, -grid: 190 pass, 0 fail;
 (root) compute-recipes, compute-serving-index-contract, compute-admin-contract unit tests: 124 pass, 0 fail
bun run typecheck   clean; biome check on every touched file: no errors (the 8 warnings are existing `any`s in compute-pipeline-routes.test.ts)

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 a dispatched nemar-ica bids stamp and a tapis pipeline job. With the world's index (no stores) 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 under serving-index/<sha256>.json with that size and digest.
  • compute-pipeline-routes.test.ts: dry runs of one dataset and of the queue answer would_dispatch, and a live run in a Worker without GitHub credentials is deferred (503 serving_index_deferred, no_github_credentials), never recipe_placeholder.
  • compute-pipeline.test.ts: the service's dry run, run and queue: the run and the queue's one result are serving_index_deferred with no_github_credentials, the queue's stoppedBy is 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 meets tapis_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), and placeholderRefusal refuses 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: true put back: all six changed cases fail (4 backend, 2 unit).
  • Staging forced to stage nothing: the well-formed-index route case fails.
  • placeholderRefusal reading a missing flag as a placeholder, or never refusing: the helper case fails.
  • serving_index_deferred added to STOPS_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 grepping placeholder, recipe_placeholder and nemar-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.ts and compute-pipeline-routes.test.ts expect serving_index_deferred with index_unreadable (was no_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 and source_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.

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.
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR2462

Version: 0.10.50-PR2462.d00ac19
Commit: d00ac19


🤖 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).
@neuromechanist
neuromechanist merged commit d74b781 into dev Nov 27, 2026
27 checks passed
@neuromechanist
neuromechanist deleted the feat/nemar-ica-not-placeholder branch November 27, 2026 12:00
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

This branch was previously deployed

1 inactive deployment
npm — d00ac191 Deployed Nov 27, 2026 by neuromechanist via publish #5127
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