Repository navigation
Phase 4a: admin pipeline grid API and status command - #2335
Merged
neuromechanist merged 11 commits intoNov 23, 2026
Merged
neuromechanist merged 11 commits into
neuromechanist merged 11 commits into
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2335Version: 🤖 Updated on each push. |
Contributor
Author
neuromechanist
merged commit Nov 23, 2026
146c3ef
into
feature/issue-2324-epic-pipeline-progress
27 checks passed
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
Phase 4a of the ADR 0134 epic: the admin pipeline grid API and
nemar admin compute pipeline status(ADR 0134 decision 5).GET /admin/compute/pipeline/grid: one recipe's runs over the eligible datasets, a row per dataset and a column per declared checkpoint (thenstored), each cellpassed/totalwith a mark (pipelineCellMark). Filters:status,recipe_version,executor,runner,dataset; keyset paging by dataset id (after,limitdefault 100, at most 500);matchedcounts over the whole filtered set; facets (recipe versions, runners).GET /admin/compute/pipeline/coverage: per registry recipe, eligible, covered (a succeeded run at the dataset's newest version with the registry's current recipe version), complete (covered, every recording passed at the recipe's last checkpoint), covered at any recipe version, counts by status, and a daily failure trend from the stamps (30 days by default, 90 at most), zero-filled.GET /admin/compute/pipeline/runs/:stamp: one run's checkpoints, counts, last live counts, and the failures each lists (at most ten, from D1), withunlistedandfailures_unreadable;stamp_not_found(404) for none.PIPELINE_RUN_STATUS_SQL, a SQL expression held equal topipelineRunStatusover every stamp state, job state and report age. A row's run is the newest stamp of the recipe, neverrefusedand never atuple_mismatchhold (NOT_HOLD_STAMP_SQL, now shared with reconciliation).grid?sync=1syncs the open stamps first. No migration, no cron, no switch, nousersread.pipeline statusis the grid (syncs first unless--no-sync),pipeline failures <stamp-id>the drill-down, and the stamp list moved topipeline stamps. The oldGET /admin/compute/pipeline/statusroute is unchanged, so released CLIs keep working.shared/contract/compute-admin.ts): literal word lists and bounds the website's drift tests can read from the text (COMPUTE_PIPELINE_GRID_STATUSES,COMPUTE_PIPELINE_CELL_MARKS,COMPUTE_PIPELINE_RUN_OUTCOMES, the page and trend bounds,COMPUTE_PIPELINE_RECIPE_VERSION_RE) and open response schemas.Owner answers (2026-11-23)
pipeline statusbecomes the grid; the stamp list moves topipeline stamps; newpipeline failures; the old route is kept.completeandcovered_any_versionbeside it.--no-sync; the website never syncs.Deviations from the plan
completeis read at the recipe's last declared checkpoint beforestored(every recording passed processing), not atstored.cellsandby_statusarez.record(...)of open values, so a key a newer Worker adds at that level never breaks a CLI; the CLI parses each cell withComputePipelineCellSchema.PIPELINE_STALLED_SQLnow interpolatesPIPELINE_STALLED_SECONDSandSTALLABLE_JOB_STATESinstead of a literal 180 and state list.pipeline failuresprints the Worker's sentence for an unknown stamp ("There is no such pipeline stamp."), asfailWithdoes for every command.Closes #2326
Part of epic #2324
Test plan
bun run typecheck,bun run lint, Biome on every touched file,bun run migrations:d1-checkbackend/test/compute-pipeline-grid.test.ts(22: who may, rows and cells, stalled, finished and failed runs, hold and refused stamps, totals, filters, runner filter and facet, paging, bad queries, read-only vssync=1, the page's query plan uses the stamp index, run status SQL equalspipelineRunStatus, drill-down, coverage and trend),compute-pipeline-routes,compute-progress-reconcile,compute-pipeline-input,compute-admin-contract,compute-checkpoints,contract-schemas,admin-route-inventory,api-export-surface,help-tiers: 334 pass, 0 failtest/admin-compute-pipeline-cli.test.ts: 65 pass, 0 fail (stamps, the grid, failures, refusals before anything is sent)unreportedbranch and its threshold; the hold exclusion; the eligibility predicate; the cursor>to>=; the run-filter flag; dropping thefailedprecedence and the zero-total rule of the mark; the coverage recipe-version and newest-version checks; the trend zero-fill; dropping a CLI flag's forwarding; extra standard output in--jsonbun test(the epic todevgate)devadmin/commands.mdxand the operations page), to merge only after a nemar-cli release carries thisReview round 1
create_failed,no_job) has its outcome already:pipelineCellMarktakeshasJob, so its cells readno_counts, neverpendingforever (grid and drill-down). Tests: a job-less failed stamp's row and drill-down, apipelineCellMarkcase; mutation "ignore hasJob" fails 2 tests.unlistedcounts only the recordings that first stopped at a checkpoint (its failed and skipped less the previous checkpoint's, which equals the previous checkpoint's passed less this one's once reconciled, and also holds for live rows), never one listed earlier; 0 for an unreconciledstoredrow. Tests: import, preprocess and quality of the four-recording run are 0; a run with 12 load failures lists 10 and leaves out 2. Mutation "count every failed and skipped recording" fails 2 tests. The schema description and the CLI wording ("and N more recordings that stopped here are not listed") say so.cellTextlooks a mark up only withObject.hasOwn, so a Worker word likeconstructorprints as the word. Test over four prototype words; mutation "index the table" fails it.?also covers a job that never reported or no job;completeis read at the last checkpoint beforestored; coverage counts a finished run once a sync has recorded it (read-only views can lag); the grid works in read-only maintenance mode.RUN_DETAIL_SQLusesNEWEST_VERSION_SQL("s");stamp_not_foundis answered by the sharedrefuseofcompute.ts;pipeline failuresaccepts any safe-integer stamp id of up to 16 digits, as the route does.admin compute move-charge, is a GitHub draft, and says the website "will read" the routes.test/admin-compute-pipeline-cli.test.ts66 pass, 0 fail.Review round 2
storedguard stays as a documented defensive guard (the row reconciliation writes already gives 0); a test hand-seeds an unreconciledstoredrow that would otherwise read 4 unlisted. Mutation "drop the guard" fails it.Math.max); a live-run test with a lagging checkpoint gives import 1, preprocess 0, quality 0 unlisted. Mutation "let the total fall" fails it.COMPUTE_PIPELINE_STAMP_ID_REis declared once inshared/contract/compute-admin.tsand used by the route and the CLI; a CLI test sendsfailures 1000000001and gets the Worker's answer.test/admin-compute-pipeline-cli.test.ts66 pass, 0 fail.