Repository navigation
Phase 6: standalone launch, recipe progress and results report contracts - #2340
Merged
neuromechanist merged 9 commits intoNov 23, 2026
Conversation
One refineRunnable and LAUNCH_SPEC_MAX_DATASETS for both specs; local description names --code and --sif-root; strict Ajv. Targeted tests pass.
UTF-8, no duplicate keys, no NaN/Infinity, integers without fraction. Targeted tests pass.
Image uri pinned to digest; failures key bound and keys equal the map; each failure under its key; counts by progressProblem. Strict Ajv. Targeted tests pass.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2340Version: 🤖 Updated on each push. |
Pin rule only with a well-formed digest; no progress rules over an empty map; a stray failure checkpoint is only failure_checkpoint_differs. Refinements exported for direct tests. Targeted tests pass.
Entry and bundle issues checked on both launch specs. Targeted tests pass.
Contributor
Author
|
Review: r1 code+types+tests+comments, 1 Important, 4 Moderate, 2 Suggestions, all fixed (3aebf3e..d769f91); r2 delta converged with one low and two nits, all fixed (cf29577, 4210dae). Targeted tests rerun on 4210dae: 805 pass, 0 fail. Merging into the epic branch per the phase-to-epic gate; full CI runs at epic to dev. |
neuromechanist
merged commit Nov 23, 2026
e8bf3c2
into
feature/issue-2324-epic-pipeline-progress
1 check passed
This was referenced Nov 23, 2026
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
The three public contracts the standalone launcher (Phase 6, ADR 0134 decision 8) reads and writes, declared once in
shared/contract/as closed zod schemas with hand-written JSON Schemas that nemar-process will copy byte for byte under its existing progress pin. This PR lands first; the nemar-process implementation re-pins to its merge commit.nemar.local-launch.v1(compute-local-launch.*): the job file a person handsnemar-launch-local --spec FILE. Itsruntime,entry,command,args,bundle,image,envandresources, and the oneOf and if/then rules, are the launch specification's own (the JSON Schema members are equal value for value, and the zod schema takes them fromLaunchSpecSchema). It dropsjob_id,api_base,job_token,limitsand NEMAR datasets, and adds a requiredformatword anddatasetsby name (unique, at most 20). A launch specification is refused here and a local one byLaunchSpecSchema.nemar.recipe-progress.v1(compute-recipe-progress.*): the file a job writes at$NEMAR_OUT/.nemar-progress/progress.jsonfor the launcher to read. The schema describes exactly what nemar-process's launcher reader accepts: a corpus of 60 documents (8 written by nemar-process's recipe layerTrackerat nemar-process 77922f37, the rest mutations of them), each with the verdict of nemar-process'scheck_recipe_progressat that commit, is replayed through zod (all 60 agree) and Ajv (all agree except the two rules a schema cannot state, a checkpoint named twice and a step in two checkpoints, which zod enforces).nemar.results-report.v1(compute-results-report.*): the launcher's local report. Its counts, failures and their definitions equal the live progress schema's, its checkpoint map equals the recipe progress file's,resultequals the launch specification's$defs/result, and the image reference is the launch specification's, all value for value; zod reuses the same schemas. Every counts object it accepts, neuroschemacheckpointCountsaccepts.ADR 0134's decision 9 table gains a row per schema; the CHANGELOG has an Unreleased entry. The three files join the strict-by-design list and their strict schema names join the import guard. Disjoint from
shared/compute-recipes.tsand the progress vectors (the parallel Phase 5 N1 PR).Owner answers (2026-11-23)
shared/contract/and are copied byte for byte into nemar-process.--pullverifies with cosign inside a narrow fence window; without it nothing is pulled.--pullis limited to NEMAR's two signed repositories.Part of epic #2324
Refs nemarOrg/nemar-process#67
Test plan
bun test test/compute-local-launch-contract.unit.test.ts test/compute-recipe-progress-contract.unit.test.ts test/compute-results-report-contract.unit.test.ts test/contract-schemas.test.ts test/compute-progress-contract.unit.test.ts test/plugin-manifest-contract.unit.test.ts test/compute-contract.unit.test.ts: 744 pass, 0 failtest/adr-index.unit.test.ts,test/changelog-format.unit.test.ts: 17 passbun run typecheck,bun run lint, Biome on the changed files: cleanuniqueItemsoff (1 fail), zod's dataset-name uniqueness off (1), zod's step uniqueness in the recipe map off (1), the running-path cap 4096 -> 4097 (2), the report's checkpoints/reasononeOfremoved (2), the sif-verification rule off (2), the finished-before-started rule off (1)check_recipe_progress(run on the pinned commit's code)bun test(epic to dev gate)Update (review round 1)
Every finding was accepted and fixed.
image.urirule the report did not enforce:ResultsReportSchemanow refuses a@sha256:<hex>suffix that differs fromimage.digest(issue atimage.uri); the case is in thezodOnlycorpus. The report'suridescription no longer mentionssif; the pin against the launch schema compares the member without its description and checks the report's own wording.checkpointsblock:failuresgetsmaxProperties: 8and a zod key-count refine. Zod now requiresfailureskeys to equal the map's checkpoints, each failure'scheckpointto equal its key, and the counts and failures to hold together byprogressProblem(reused, not copied; itscheckpoints_differalso holds thecountskeys to the map).progressProblemtakesreadonly { checkpoint: string }[]so the map can be passed as is. The rules are named in the docblock,$defs/Checkpointsand theResultsReportdescription. ADR 0134's row now says the failure items are the live object's shapes, arranged per checkpoint.--code FILEand--sif-root DIR.strict: false: both tests use{ strict: true, strictRequired: false, allErrors: true }; nothing was flagged.refineRunnable(spec, ctx)exported fromcompute-launch.ts(withSIF_FILE_REand the shared messages), used by both schemas.LAUNCH_SPEC_MAX_DATASETSis used by the launch spec andLOCAL_LAUNCH_MAX_DATASETS; the test pins the local schema'smaxItemsto the launch schema's.Tests: the three new contract tests,
contract-schemas,compute-contract,compute-checkpoints,compute-progress-contractandadr-indexpass (796 tests); typecheck and Biome clean. Each fix was mutated (rule reverted) and a test failed, then restored. The fullbun testwas not run (epic ->devgate).The nemar-process copies of
compute-results-report.v1.json,compute-recipe-progress.v1.jsonandcompute-local-launch.v1.jsonmust be re-copied from this branch.Update (review round 2)
The round-2 delta review had three items. All were accepted and fixed.
image.digestis well formed, asrefineRunnabledoes. A bad digest gives one issue, atimage.digest.progressProblemis not read over an empty map. A failure naming a checkpoint the map lacks is now reported once, asfailure_checkpoint_differs, not also as "listed under its checkpoint". Zod skips a refinement when a field fails, so both guards are reachable only by calling the refinement directly. To test them, the two refinements are exported asrefineResultsReportandrefineResultsCheckpoints, and the tests run them withz.any().superRefine(...).{path, message}for both-entry-and-command, neither, and entry-without-bundle, run against bothLaunchSpecSchemaandLocalLaunchSpecSchema.Tests: 805 targeted tests pass, and typecheck and Biome are clean. I removed each guard in turn and a test failed every time. The full
bun testwas not run.