Skip to content

Phase 4b: admin pipeline dashboard and coverage card - #587

Merged
neuromechanist merged 19 commits into
feature/issue-586-epic-pipeline-progressfrom
feature/issue-586-pipeline-dashboard
Nov 23, 2026
Merged

neuromechanist merged 19 commits into
feature/issue-586-epic-pipeline-progressfrom
feature/issue-586-pipeline-dashboard

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Phase 4b of the ADR 0134 epic: a new admin tab, Pipelines, over the three read-only routes nemar-cli phase 4a serves (/admin/compute/pipeline/{coverage,grid,runs/:stamp}, nemar-cli PR #2335).

  • /admin/pipelines: one coverage card per recipe (eligible datasets whose newest version has a succeeded run of the current recipe version, complete, and at any recipe version) with its failed runs per day; a placeholder recipe is shown with a pill; each card's status counts link to the grid.
  • /admin/pipelines/<recipe>: the legacy pipeline status table, datasets by checkpoints, each cell passed/total with the CLI's code (F<n>, x, R, S, W, P, ?, -), an icon and a full phrase for screen readers; filters by status, recipe version, executor, runner and dataset; keyset paging; a filter that is not valid is dropped and named.
  • /admin/pipelines/runs/<id>: each checkpoint's counts, the failed recordings it lists with codes and steps, what it leaves out, and the listed codes; one 404 for a malformed id and for stamp_not_found.
  • /admin: a "Processing recipes" panel with the cards of the recipes that dispatch, read in the page's existing Promise.all and failing on its own.

Read only and never a sync: the client has no field for sync and a source guard pins its absence. The page explains the lag in the CLI's own words. An API that predates the routes reads "not available on this server yet".

Part of epic nemarOrg/nemar-cli#2324

Refs #586 (close by hand after the merges; a PR into an epic branch closes nothing).

Owner answers (2026-11-23)

  • A new Pipelines tab with website-owned copy pinned to the captured CLI help, so the merge is one-directional.
  • Production promotion is allowed before the nemar-cli release that serves the routes; the tab shows "not available on this server yet".
  • For the staging browser check, the driver dispatches two or three nemar-floor runs on dev (test fixtures only, never nm000103-107) after the nemar-cli epic reaches dev.
  • Placeholder recipes are hidden on the overview and shown with a pill on the landing page.
  • No tab badge.
  • Decisions recorded as an addendum to website ADR 0030.
  • --seed-pipeline in scripts/local-backend.mjs.

Merge order

One-directional: nemar-cli reads nothing this PR adds. 1) Merge this PR into the website epic branch (CI red only on test/compute-pipeline-contract-drift.test.ts, which reads nemar-cli dev). 2) The nemar-cli epic #2324 merges to dev. 3) Rerun website CI (green), then merge the website epic into staging. 4) Browser check on test.nemar.org after curl -s https://test.nemar.org/version.json, then close #586 by hand.

Test plan

  • bun run lint (543 files, no fixes), bun run typecheck (0 errors), bun run build (complete)
  • Fixtures captured from the real routes at nemar-cli 146c3efa (scripts/capture-compute-pipeline-fixtures.mjs, scripts/capture-pipeline-cli-help.mjs); a re-capture writes identical bytes (git diff --exit-code test/fixtures/compute)
  • Every row status and every cell mark appears in the captured grid; pages, filters, refusals, coverage (default and 7 days) and run shapes (reconciled, live, unreadable list, unlisted, not found, bad id) are captured
  • Targeted tests with NEMAR_CLI_COMPUTE_ADMIN_CONTRACT at the epic checkout: 226 passed (drift, CLI parity, source guards, client, view, tabs, overview)
  • Full suite with every NEMAR_CLI_* variable pointed at the epic checkout: 243 files, 6743 tests passed
  • Mutations, each reverted, each caught: sync=1 added to the query (2 fail), a path printed without displaySafeLine (1), an unknown mark drawn as success (1), Date.parse on a served time (2), GRID_STATUSES reordered (1), the runner-with-Tapis rule dropped (1), the placeholder filter removed (1)
  • Local check against the real backend (LOCAL_BACKEND_JOBS=1 ... scripts/local-backend.mjs --seed-pipeline, bun run dev): every page rendered over HTTP with the owner's session and checked in the HTML (tab, cards, placeholder pill, status links, grid caption and cells, next-page link, the runner-with-Tapis notice, run sections and failures, 404 for abc and 999999, Cache-Control: no-store)
  • CI drift test green: red until nemar-cli dev carries the grid contract (expected)
  • Staging browser check after the merges (both themes, keyboard scrolling of the grid, screen-reader cell names): not run, would check /admin, /admin/pipelines, /admin/pipelines/nemar-floor (with ?limit=2, ?status=failed, a runner filter), a run page and /admin/pipelines/runs/abc on test.nemar.org
  • Not run: a visual browser check (no browser driven here; the pages were checked as served HTML)

Deviations from the plan

  • The coverage panel component is shared by the Overview and the landing page instead of two components; status links come from the card model.
  • compute-pipeline-labels.ts is added to test/compute-dashboard-ui.test.ts's list of sentence files (it is the tab's words file, as compute-labels.ts is the dashboard's).
  • computeFetch and its Init type are exported from compute-admin-api.ts (one-word changes).

Review round 1

Two reviewers; every finding fixed on this branch (commits ff09295 to c12ad5c).

  • I1 absent required-nullable keys -> strOrNull now treats an absent key as a shape error; tests drop next_after from a grid page and outcome from a run, both read compute_admin.error.malformed.
  • I2 untested owner-relied behavior -> tests for isNotAvailable (true for the router's code-less {error, message} 404, false for stamp_not_found and recipe_unknown), getPipelineCoverage(7) ending ?days=7 and no query when undefined, and a client timeout (timeoutMs: 1, fetch waiting on the signal) reading compute_admin.error.timeout. The two round-1 survivors (isNotAvailable ignoring the code, days never sent) now fail.
  • I3 backend words in hrefs -> statusCounts marks each word known; grid chips and landing counts link only known statuses and draw unknown ones as neutral text; pipelinePager builds Next only from a cursor matching COMPUTE_DATASET_ID_RE; docblocks say so; source-scan assertions added.
  • S1 -> chips use matched.by_status and matched.total when filters are set, else the summary.
  • S2 -> run page checkpoint mark is an aria-hidden code plus a visually-hidden spoken phrase.
  • S3 -> website-owned lead-ins (gridLead, coverageLead, failuresLead) before the pinned clauses, which stay verbatim.
  • S4 -> stalledMeaning takes seconds and says minutes only when whole; parity test covers 90 s and 180 s.
  • S5 -> a passed cell with no counts draws - as the CLI does.
  • S6 -> recipe_unknown shows the not-a-recipe copy with a 404, like a malformed segment.
  • S7 -> ComputeSectionError what is a lowercase noun phrase (whatGrid, whatCoverage, whatRun).
  • S8 -> runner options filtered by RUNNER_ID_RE; a hidden limit input when the query has one.
  • S9 -> "labelled" -> "labeled" (two places).
  • S10 -> /admin sets Cache-Control: no-store after the gate; OVERVIEW joins the gate and no-store guard set.
  • S11 -> parity test flattens Object.values(PIPELINE_HELP) and derives flags from the exported PIPELINE_GRID_FILTERS, which filterParams also uses.
  • S12 -> PIPELINE_RECIPE_SEGMENT_RE docblock names the route-local RECIPE_NAME it mirrors; export requested in Export the pipeline recipe-name pattern from the contract nemar-cli#2338.
  • S13 -> grid cells and status counts use null-prototype objects and reads use Object.hasOwn; tested with a column named constructor.
  • S14 -> seedPipelineRuns throws when recordProgress is not accepted.

Gates: bun run lint clean, bun run typecheck 0 errors, targeted tests 257 passed (10 files, NEMAR_CLI_COMPUTE_ADMIN_CONTRACT at nemar-cli 146c3efa). Mutations, each now failing at least one test: isNotAvailable ignoring the code, days never sent, absent nullable read as null, cells with a prototype, pager trusting any cursor, unknown status linked, stalled always in minutes, passed-without-counts blank.

Review round 2

Fixed in bec1a06.

  • I1 chips under a status filter -> new gridChips in the view: chips and "All" always count summary.by_status and summary.eligible (the CLI's "all runs" line); any filter adds the separate "Matching N" line from matched.total. View tests with a status filter (status_failed) and with only a runner filter.
  • S1 run page mark -> new runMarkView: a checkpoint with no counts shows its mark word; the grid cell keeps -. Tested.

Gates: bun run lint clean, bun run typecheck 0 errors, targeted tests 262 passed (10 files, contract at nemar-cli 146c3efa), bun run build complete.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

@neuromechanist

Copy link
Copy Markdown
Contributor Author

Review converged: round 1 by a two-reviewer panel (client+tests; safety, copy, accessibility), round 2 delta; every finding fixed, the last round verified by the driver (bec1a06). The only red check is test/compute-pipeline-contract-drift.test.ts, which reads nemar-cli dev and is red by design until the nemar-cli epic #2324 merges to dev (it passes against the epic branch locally). Merging into the website epic branch per the phase-to-epic gate; full green CI is required at the epic-to-staging merge, after nemar-cli dev carries the contract.

@neuromechanist
neuromechanist merged commit e66148e into feature/issue-586-epic-pipeline-progress Nov 23, 2026
3 of 4 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-586-pipeline-dashboard branch November 23, 2026 15:10
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