Repository navigation
Phase 5 N1: plugin checkpoints in the nemar-ica map - #2339
Merged
neuromechanist merged 12 commits intoNov 23, 2026
Merged
neuromechanist merged 12 commits into
neuromechanist merged 12 commits into
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2339Version: 🤖 Updated on each push. |
Contributor
Author
neuromechanist
merged commit Nov 23, 2026
3801e40
into
feature/issue-2324-epic-pipeline-progress
1 check passed
9 tasks done
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 5 N1, the nemar-cli side of the quality plugins (ADR 0134 decisions 6 and 7). The nemar-process side (plugin runner P1, dataQuality document P2, plugins P3a/P3b, wiring P4) follows; P4 re-pins nemar-process to this PR's merged commit.
nemar-ica's checkpoint map gainsquality(nemar-quality) andfigures(nemar-spectrum,nemar-components,nemar-segment) aftericlabel. The steprecordnow counts atfigures.nemar-flooris unchanged.RECIPE_PLUGIN_STEPSnames the plugin steps. They are step words (PROGRESS_STEP_RE) and valid manifest names, mapped only innemar-ica, atqualityorfigures.shared/contract/compute-progress-vectors.jsonis regenerated (NEMAR_WRITE_PROGRESS_VECTORS=1): the map changes, andica_mixedgains a failure atnemar-quality, a skip atnemar-spectrumand a failure atnemar-segment;g.set(record) now counts atfigures.shared/contract/plugin-manifest-vectors.json, generated bytest/plugin-manifest-vectors.unit.test.ts(NEMAR_WRITE_PLUGIN_VECTORS=1): manifests with the schema verdict (Ajv on the shared schema and zod agree) and thepluginManifestProblemword, coveringbounds_reversed,quality_without_metric,figures_without_figure, a time-series SVG refusal, a map SVG acceptance and other refusals, for nemar-process to replay.test/compute-recipes-process-drift.unit.test.tsreads nemar-process'sPLUGINS = (("name", "version"), ...)literal. Until asteps.pydeclares it (nemar-processdevand its epic branch today), the CHECKPOINTS comparison leaves the registry's plugin steps out; once declared, its names must equal the map's plugin steps in order and its CHECKPOINTS the whole map.Owner answers (2026-11-23)
resultLimits.maxFilesfor nemar-ica: NOT done in this PR, see below.Test plan
bun test test/compute-recipes.unit.test.ts test/compute-checkpoints.unit.test.ts test/compute-recipes-process-drift.unit.test.ts test/plugin-manifest-contract.unit.test.ts test/plugin-manifest-vectors.unit.test.ts test/compute-admin-contract.unit.test.ts test/admin-compute-pipeline-cli.test.ts test/contract-schemas.test.ts test/compute-progress-contract.unit.test.ts: 387 pass, 3 skip, 0 failcompute-pipeline-grid,compute-progress-reconcile,compute-progress-route: 70 pass (the grid reads columns from the registry; nothing in backend/src or src names nemar-ica)NEMAR_REQUIRE_PROCESS_RECIPES=1against nemar-processorigin/devandorigin/feature/issue-65-epic-pipeline-progress: 11 pass eachpluginManifestProblem(2 fail in the vectors test); nemar-quality mapped at figures (2 fail)bun run typecheck,bun run lint, Biome on the touched files, changelog format testbun test(epic to dev gate)Update 2026-11-23: owner direction, review round 1
Figures held (owner direction). Stored figure images are being replaced by live browser rendering from data, so the
figurescheckpoint and its three plugin steps are removed from the map and the vectors for now. nemar-ica's map endsquality(nemar-quality);RECIPE_PLUGIN_STEPSis["nemar-quality"];recordcounts atquality. The earlier bullets aboutfiguresabove are superseded.I2, per-recipe result limit (owner decision). A registry entry may declare
resultLimits.maxFiles.resultMaxFilesFor(backendcompute-records.ts) gives a NEMAR pipeline job (source = pipeline, named by a pipeline stamp) its recipe's own value, capped atCOMPUTE_MAX_OUTPUT_FILES(100,000); every other job, a person's and a partner's included, keeps the owner's policyresultLimits.maxFiles. It is used by the outputs route's count check, its body cap (outputsBodyCap(env, job)), the launcher file caps and the launcher-document bound (launcherDocumentLimit(env, job), all callers pass the job). nemar-ica: 25,000 (about 13 files per recording now, so 5,000 stopped at about 384 recordings; 25,000 admits about 1,920, headroom over 1,000 and room for figure files later). nemar-floor: 25,000 too, because its own count needs it (6 files per recording plus 3 for the dataset: 5,000 stopped at about 830 recordings, below some auto-dispatched datasets; 25,000 admits about 4,160).maxBytesis not added: the route's job byte limit (20 GiB policy) is not what binds. Launcher check (nemar-process epic branch):MAX_OUTPUT_FILES = 100_000agrees with the ceiling, but the launcher caps its outputs REQUEST atOUTPUTS_REQUEST_MAX_BYTES = 1 MiB(about 8,000 ordinary entries) and fails a bigger onetoo_many_outputsitself, so a job over that never reaches the Worker: raising it (for example derived from max files, under the Worker's 64 MiB body ceiling; 25,000 entries at the Worker's 1,700-byte worst case is about 42.5 MB) is a nemar-process change. The launch spec'slimitsare the dataset STAGING limits (LAUNCH_DATASET_LIMITS), not outputs, so nothing there carries this value.I1, plugin skips counted per checkpoint (decided, lead), adapted to the existing column. nemar-process already writes a
skipped_stepscolumn in every recordings table (step:reasonpairs joined by COMMAS, for steps a rule skipped, e.g.bad_windows:too_short). A new semicolon column under the same name would have collided and made every floor table with a rule skip unreadable. So the rule reads that column: only pairs whose step is one ofRECIPE_PLUGIN_STEPScount; a succeeded row isskippedat the checkpoint holding a listed plugin step (code and step carried, listed among that checkpoint's failures) and passed elsewhere; a skipped plugin never makes a later checkpoint skipped; totals still sum. The column is optional (absent = empty); a malformed plugin pair (no reason, a reason outside the failure-code pattern, a plugin named twice) is refusedbad_skipped_steps; other steps' pairs are left alone; non-succeeded rows' cells are not read. A plugin absorbed by the runner viaplan.add_skiplands in this column already. The vectors drop the plugin-step failure and skip rows (a recording fails at a plugin step only for a fault the runner does not absorb, which nemar-process has not defined, so no row) and add a succeeded row withnemar-quality:plugin_failed. The two-checkpoint case waits for the figures design. The Phase 4a grid'scompletereadspassed = totalat the last checkpoint, nowquality, so a recording with a skipped plugin is not complete (pinned in the counting test); its drill-downunlistedstays right because plugin skips can only add at the last checkpoint today.S3. The drift test fails when
^PLUGINSis assigned in a form it cannot read (a list).S4. Manifest vectors gain
bounds_equal(min == max, valid) andbounds_reversed_before_figures_without_figure(rule precedence:bounds_reversed), and a test that the document root accepts thecheckpoint_iclabelmanifest that#/$defs/PluginManifestrefuses.S5. nemar-ica stays
1.0.0-b1(placeholder,autoDispatch: false); any existing nemar-ica 1.0.0-b1 stamp is reconciled against the new map, whose last checkpoint isquality, so it reads not complete.Round 1 test plan
bun testPart of epic #2324
Review round 2 (delta, four items)
parseSkippedStepstrims each step and reason (a:b, nemar-quality:plugin_failedandnemar-quality :plugin_failedcount the plugin skip); tested, and the test fails without the trim.resultMaxFilesForlets a recipe's own value RAISE the limit, never lower it (Math.max(policy, min(own, 100,000))), docblock updated; a test with the policy at 30,000 above nemar-ica's 25,000 gives the pipeline job 30,000, and fails with the old replace rule. The changelog says so.passed === totalassertion is dropped from the counting test; the grid'scompleterule (a last-checkpoint progress row with passed < total counts as not complete) is already exercised bybackend/test/compute-pipeline-grid.test.ts"covered, complete and covered at any recipe version".JOB_PIPELINE_RECIPE_SQLandresultMaxFilesFormoved above theoutputsBodyLimitBytesdocblock, which sits on its function again.bun test.