Repository navigation
Plugin views, metric prefix, naming port (#2324 N1b) - #2357
Merged
neuromechanist merged 7 commits intoNov 24, 2026
Merged
neuromechanist merged 7 commits into
neuromechanist merged 7 commits into
Conversation
outputs.views replaces outputs.figures (kind, kind_version, caption, 1-8 roles, produced or from the recipe, max_bytes <= 4194304, at most 16 views); checkpoint quality only; plugin name and metric name follow neuroschema 0.6.0; problems bounds_reversed, plugin_without_output, metric_not_prefixed. Vectors regenerated. Tested: plugin-manifest contract and vectors tests.
STANDARD_CHECKPOINTS loses figures (ADR 0137); RECIPE_PLUGIN_STEPS and nemar-ica's quality checkpoint are nemar-quality then nemar-spectrum; resultLimits comment rechecked at about 16 files per recording. Progress vectors regenerated. Tested: compute-recipes, compute-checkpoints and process-drift tests (drift comparison against nemar-process dev fails only on the expected RECIPE_VERSION).
label, productStem, productPath and datasetPath, a literal port of nemar-process common/naming.py at d090d84e, with compute-naming-vectors.json for nemar-process to replay. Tested: compute-naming unit test; the 24 vectors replayed against naming.py at d090d84e with 0 mismatches.
Corpus cases for 64/65 columns, column unit 32/33, unknown column key, 16/17-character format and role names with a capital or hyphen; pins PLUGIN_MAX_VIEW_DIMS and PLUGIN_MAX_VIEW_COLUMNS; each schema pattern equals its regex source; the 64-column cap is documented as NEMAR's own. Tested: review mutations R1-R6 each fail.
PROGRESS_REQUEST_NAMES drops PluginFigureSchema for the five PluginView* schemas, and every listed name must be a zod schema exported by shared/contract/index. Tested: contract-schemas.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2357Version: 🤖 Updated on each push. |
Contributor
Author
|
Review r1 (code+tests+errors+comments+types): 1 Important (corpus limits where zod and the JSON Schema could drift) and 1 Moderate (stale strict-name list) fixed in 04af17f with the reviewer's six mutations now failing; deviations 1-6 accepted; M4b equivalent. Driver verified: plugin-manifest-contract and contract-schemas pass locally (154 tests); CI checks reviewed. P2 question recorded: per-run view parameters (spectrum upper_hz) in PluginResult. Admin-merging into the epic branch. |
neuromechanist
merged commit Nov 24, 2026
bc772b5
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.
Phase N1b of #2324 (ADR 0137 live views): plugin views, the metric prefix rule, the checkpoints, and the naming port.
What changed
shared/contract/plugin-manifest.tsand.schema.json(nemar.plugin-manifest.v1, edited in place per ADR 0137 decision 4):PLUGIN_NAME_REis^[A-Za-z][A-Za-z0-9_-]{0,63}, neuroschema 0.6.0plugin.name. This fixes the failingA.b_c-dagreement case.PLUGIN_METRIC_REfollowsmetricName(^[A-Za-z][A-Za-z0-9_-]*(:[A-Za-z][A-Za-z0-9_-]*)?, at most 128 characters).outputs.viewsreplacesoutputs.figures, per C12. A view has akind(kindName), akind_versionfrom 1 to 999, acaptionand 1 to 8 roles. A role is either produced ({format, max_bytes <= 4194304, dims: up to 2 unique names, columns?}) or{from: "recipe"}. A manifest holds at most 16 views.PLUGIN_CHECKPOINTS = ["quality"]. The figure formats, caps and constants are removed.bounds_reversed,plugin_without_output,metric_not_prefixed(every metric is<plugin>:<name>with the manifest's own name as the prefix).shared/contract/plugin-manifest-vectors.jsonis regenerated. It has prefixed names and view vectors, and nofigures_validorfigures_without_figure.shared/compute-recipes.ts:STANDARD_CHECKPOINTSdropsfigures.RECIPE_PLUGIN_STEPS = ["nemar-quality", "nemar-spectrum"], and nemar-ica'squalitycheckpoint lists both.resultLimitscomment is rechecked: about 16 files per recording, so 25,000 admits about 1,560 recordings.compute-progress-vectors.jsonis regenerated.shared/compute-naming.tsis a literal port of nemar-processcommon/naming.pyat d090d84e:label,productStem,productPathanddatasetPath, includingposixpathslash handling.shared/contract/compute-naming-vectors.jsonis written by the test underNEMAR_WRITE_NAMING_VECTORS=1.plugin-manifest-{contract,vectors}: the describe block is renamed toagreement with neuroschema 0.6.0, and grammar agreement is added for metric, view key, role, dim, kind, format and column names.compute-recipes.compute-recipes-process-drift: the comment and thefiguresfixtures in the helper cases change. The comparison logic is untouched.compute-naming.Tests
bun run typecheck,bun run lintfiguresorPLUGIN_: 207 pass and 4 skip in the root suite; 228 pass and 2 skip in the backend suite.naming.pyat d090d84e, with 0 mismatches.bun test: not run (it runs at epic todev).dev: it fails only onRECIPE_VERSION(1.0.0-b1there,1.0.0-b2here). This is expected, because nemar-processdevlacks PZ. The test is not changed to pass.Mutations (each applied, shown failing, reverted)
figuresas a plugin checkpoint (zod)figuresas a plugin checkpoint (JSON Schema)nemar-quality:9x(zod)nemar-quality:9x(JSON Schema)plugin_without_outputafter the prefix checkoutputspassthrough (afigureskey accepted beside views)figuresback inSTANDARD_CHECKPOINTSnemar-spectrumdropped fromRECIPE_PLUGIN_STEPSReview round fixes
PLUGIN_MAX_VIEW_DIMS(2) andPLUGIN_MAX_VIEW_COLUMNS(64) are pinned in the words-and-numbers test.patternstring equals its TypeScript regex'ssource.test/contract-schemas.test.ts,PROGRESS_REQUEST_NAMESlists the fivePluginView*schemas in place ofPluginFigureSchema. Every listed name must be a zod schema thatshared/contract/indexexports. The strict-name count moves from 31 to 35.PLUGINSparsing fixture namesnemar-spectrumin place ofnemar-segment.The reviewer's mutations, re-applied after the fixes (each now fails, then reverted):
columnsmaxItems 65 (schema) / max 65 (zod)unitcap 33 (schema / zod)format{0,16}(schema / zod)additionalProperties: true(schema) /.passthrough()(zod)rolespropertyNamespattern removed (schema)z.string()Gates after the fixes:
bun run typecheckandbun run lintare clean.Design choices to check
kind,kind_versionandcaptionbeside its roles. C12 names only the roles, but nemar-process P2's loader words (kind_unregistered,format_unwritable) need the kind and the format to be declared. Whether a kind or format is registered is the loader's check, not the schema's: an unregistered namespaced kind is valid neuroschema.dimsis a list of up to two unique dimension names in row-then-column order, the same shape as the registry'sroles.<role>.dims. Units and coordinates go in the record'sviewData, which the runner writes.columnsreuses neuroschema'scolumnshape. The cap of 64 is NEMAR's own limit, not neuroschema's (neuroschema sets none). Unique column names are not enforced, because JSON Schema cannot state it and Ajv and zod would disagree.recipeLabelincompute-recipes.tsis kept rather than imported fromcompute-naming.ts, because that module is held import-free by a test. The naming test ties the two together instead (labelequalsrecipeLabel, anddatasetPathequalsrecipeRequiredOutputs).nemar-process progress pin
The plan moves nemar-process
tests/contract/nemar-cli-progress-pin.jsonto this phase (P2). It re-copiesplugin-manifest.schema.json,plugin-manifest-vectors.json,compute-progress-vectors.json(regenerated here) and the newcompute-naming-vectors.json. Pin the squash commit this PR becomes onfeature/issue-2324-epic-pipeline-progress, not the PR head.Refs #2324