Repository navigation
Phase B4: checkpoint outcomes and signalJourney links per recording (#2324) - #2416
Merged
neuromechanist merged 16 commits intoNov 26, 2026
Conversation
Export the recordings header and row readers that parseRecordingsTable now uses, so one row is read by the same rules as the whole table. Add storedCounts, processingRecordEntry and processingRecordProblem for a recording's processing entry, and check a completed link's location against neuroschema's relativeLocation so a recording's record path can be linked. Tested: bun test test/compute-checkpoints.unit.test.ts (66 pass).
metadata.json and the page bundle now build the dataset-level processing entry and signalJourney link from each recipe's current public derivative, as dataQuality already was: the run's reconciled counts with stored worked out as kept, and the completed link reconciliation keeps on the run row. A run in progress, a canary run and a failed run show nothing; no in_progress link is served. Migration 0154 adds compute_pipeline_progress_runs.link (backfilled from the last documents) and compute_derivatives.checkpoint_map, and drops compute_pipeline_documents, which nothing reads any more. Tested: bun test of compute-progress-reconcile, metadata-json-pipeline-route, metadata-json-quality, quality-documents, compute-runner-progress, compute-progress-route, compute-pipeline-grid, compute-pipeline, compute-pipeline-progress-migration and the new compute-pipeline-promoted-run-migration suites (all pass).
Keying writes the recipe version's checkpoint map into compute_derivatives.checkpoint_map beside quality_plugins, so a recording's outcomes can be read with the map of the version that made the derivative after the registry moves on. Tested: bun test test/compute-derivatives.test.ts (91 pass).
Add GET /<id>/quality/v1/<recipe>/processing/<recording> to the public quality route: the recording's neuroschema processing entry (each declared checkpoint, then stored) and its signalJourney link, built on request from the current public derivative's recordings table (a ranged scan for the exact path, bounded) and the recording's record, under the route's gate, epoch-keyed edge cache, Cache-Tag and ETag. A recording that failed or was skipped has a failed link. The contract gains the segment, the answer's format, the table bounds and the path builder; no word changes. Tested: bun test of quality-processing-route (new, 20 pass), quality-route, quality-admin-views, quality-cache-purge and test/quality-route-contract.unit.test.ts.
Amend ADR 0134 after decision 9: a public page's processing and signalJourney entries, at the dataset and the record level, describe the promoted run, built on read; no in_progress link and no row per recording. The index line says so. Tested: bun test test/adr-index.unit.test.ts (11 pass).
Correct the phase 2 entry to the end state (no stored documents, the run's link on its row) and describe phase B4: the promoted run on public pages, the processing endpoint, migration 0154 and the contract additions. Not tested: documentation only.
Give the newer canary run a record of its own so dropping the public derivative term shows, add a tail of a listed path to the exact-path case, and name only mutations each test was watched failing under. Tested: the three suites (56 pass); each named mutation applied alone fails its tests (scratchpad b4-mutate.py, 20 mutations).
promotedProcessingEntry, checkpointMapOfRow and scanRecordingRow have no caller outside their modules. Tested: typecheck; bun test quality-processing-route and metadata-json-pipeline-route (26 pass).
parseRecordingsTable refuses a path two rows name (duplicate_path). A record-level entry writes unrecorded_code for a code that does not fit failureCode, and derives stored from the last declared checkpoint, as storedCounts does; the docblocks say what stored means and where the cascade rule and a skipped plugin would conflict. A registry test holds every plugin step to the last declared checkpoint. Tested: bun test test/compute-checkpoints.unit.test.ts test/compute-recipes.unit.test.ts.
The admin run-quality listing now gets duplicate_path from parseRecordingsTable and answers table_unreadable; its own de-duplication is gone, and the contract's unlisted comment says so. Tested: bun test test/quality-admin-route.test.ts (27 pass).
The derivative sync gives a row with no checkpoint map its recipe version's map while the registry holds that version, never replacing a recorded one. TABLE_READ_MAX_BYTES is now the contract's QUALITY_TABLE_MAX_BYTES. Tested: bun test test/compute-derivatives.test.ts.
The processing endpoint scans the whole table and refuses a recording two rows name (duplicate_path); a recording with no checkpoint map is record_unreadable. A miss is charged to checkDataMissBudget, and a recording the table does not list is remembered in the edge cache under the same key while the client still gets no-store. Tests add the served-counts invariant after a real reconciliation, the size bound with no ranged read, BOM and CRLF, identity by recipe and version, a non-UTF-8 record, map validity and precedence, and the tombstoned and never-published gate. Tested: bun test test/quality-processing-route.test.ts (28 pass).
readPipelineExtensions shows a promoted run's processing entry and link only when they pass the vendored neuroschema, as a recording's do. Tests: each term of the read's own gate alone (not_anonymous with the trigger dropped, first publication, tombstone and the rest), tombstoned and never-published datasets through metadata.json, the concealed-deposit test relabelled to the two guards it holds, and a succeeded run whose table repeats a path. Tested: bun test of metadata-json-pipeline-route, metadata-json-quality and compute-progress-reconcile.
A completed link longer than the new column takes is left out of the backfill. Tested: bun test test/compute-pipeline-promoted-run-migration.test.ts.
ADR 0134's amendment says stored follows the last declared checkpoint and that a table repeating a path is refused; the changelog describes the miss budget, the absent memo, unrecorded_code, the map fill, the schema check and the duplicate refusal. Tested: bun test test/adr-index.unit.test.ts.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2416Version: 🤖 Updated on each push. |
Route tests: a failed row whose code does not fit failureCode answers unrecorded_code on the failed checkpoint and on stored; a newer promoted derivative under the same epoch serves neither the old answer nor the old remembered absence. The route's header now says the absent-recording marker is the one refusal kept in the cache, never sent; the cache test is renamed to match. Tested: bun test test/quality-processing-route.test.ts (30 pass); removing the substitution, and dropping the derivative key from the cache key, each fail this suite.
neuromechanist
merged commit Nov 26, 2026
8c5de7a
into
feature/issue-2324-epic-pipeline-progress
27 checks passed
This was referenced Nov 26, 2026
Merged
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 B4 of epic #2324: checkpoint outcomes and signalJourney links per recording (ADR 0134 decision 9), and, under the same rule, the dataset level.
Both levels now describe each recipe's promoted run (its current public derivative, ADR 0137 decision 7), built on read; nothing is stored per recording.
GET /<id>/quality/v1/<recipe>/processing/<recording>answersnemar.processing-record.v1: the recording's neuroschemaprocessingentry (each declared checkpoint's status, code and step, thenstored) and itssignalJourneylink (completedwith its record's location, SHA-256 of the bytes andsj_version, orfailedfor a recording the run wrote no record for). It is built from the promoted derivative's recordings table (a scan of ranged reads of the whole table for the exact path: at most 32 MiB, refused unread above that, lines of at most 65,536 characters; a recording that two rows name refuses the table) and the recording's record. A cache miss is charged to the caller's data miss budget (as a brokered git file's miss is), and a recording the table does not list is remembered in the edge cache under the same key; the client still getsno-store.storedfollows the last declared checkpoint, so a recording whose quality plugin was skipped showsstored: skippedwith the plugin's code. A code that does not fitfailureCodeis writtenunrecorded_code. The route's gate, derivative choice, epoch-keyed edge cache,Cache-Tagpurge andETagapply unchanged; no new word.metadata.jsonand the page bundle buildprocessingfrom the promoted run's reconciled counts (withstoredworked out as kept) andsignalJourneyfrom the link reconciliation now keeps on the run row, soprocessing,signalJourneyanddataQualityof one answer describe one run. A run in progress, a canary run and a failed run show nothing publicly; noin_progresslink is served. Admins keep the grid.metadata.jsonserves after the real reconciliation of the same run (a test checks it through both routes). A recording's link SHA-256 equals therecord_sha256of itsdataQualityentry. Every entry at either level is checked against the vendored neuroschema before it is shown.parseRecordingsTablerefuses a path that two rows name (duplicate_path). Reconciliation gives that run the outcometable_unreadablewith no counts, and the admin run-quality listing answerstable_unreadable(its own de-duplication is gone).What the alignment changes (Q2)
in_progress.metadata.jsonkeepsmax-age=60. The quality route's cache key carries the derivative key and the dataset's epoch, so no purge is needed on promotion; unpublishing, making private and concealing already purgenemar-dq-<id>. No code lowers a class.compute_pipeline_documents(nothing reads it any more). It keeps the run's completed link oncompute_pipeline_progress_runs.link.storedresolution is unchanged in its counts (storedCounts), and the grid still reads it.compute-progress-reconcile,metadata-json-pipeline-route,metadata-json-quality,quality-documents,compute-runner-progress,compute-progress-route,compute-pipeline-grid,compute-pipeline(deletion) and the 0150 migration test.liveSignalJourneyLinks,LIVE_LINKS_SQL,PIPELINE_DOCUMENTS_SQLandFINAL_DOCUMENT_SQLare gone.feature/issue-586-epic-pipeline-progress): no reader ofmetadata.jsonprocessingorsignalJourney(it reads onlyextensions.dataQuality), so nothing there changes behavior. Its capturedmetadata-*.jsonfixtures seed no run rows and stay byte-identical. Its quality-route drift test compares a fixed list of constants and the word table, both unchanged.main, the gatedadmin/design/compute-gateway.mdmirrors ADR 0134's decision 9 table (lines 1096 to 1097:processing_statusin_progresswhile reports arrive) and decision 4 (line 1153), so it needs the amendment when it is next synced. The docs repo was not edited.Migration 0154
0154_compute_pipeline_promoted_run.sql:compute_pipeline_progress_runs.link(a JSON object or NULL, CHECK named), backfilled from the lastsignalJourneydocuments (completed links only);compute_pipeline_documents;compute_derivatives.checkpoint_map(a JSON array or NULL), written at keying besidequality_plugins, so a derivative of a recipe version the registry has moved past is read with its own map. The derivative sync fills a NULL map while the registry holds the row's version. A row with neither answersrecord_unreadable(checkpoint_map_unknown).#2397 (
feature/issue-2182-epic-pq-decide) also numbers 0150-0154; whichever reachesdevsecond renumbers, andtest/migration-prefixes.unit.test.tscatches a clash.Contract files changed
shared/contract/quality-route.ts: addsQUALITY_PROCESSING_SEGMENT,QUALITY_PROCESSING_FORMAT,QUALITY_TABLE_MAX_BYTES(the backend'sTABLE_READ_MAX_BYTESis now this constant),QUALITY_TABLE_LINE_MAX,qualityProcessingPathand the endpoint's docblock. The words are unchanged. The website copies these when it reads the endpoint.shared/contract/compute-admin.ts: comment only (the run-quality listing'sunlistedno longer counts repeated paths). The website's drift test reads constants, not comments.shared/compute-checkpoints.ts(not undercontract/, but on nemar-process's advisory drift list):readRecordingsHeader,readRecordingsRow(now used byparseRecordingsTable),storedCounts,processingRecordEntry,processingRecordProblem,UNRECORDED_CODE, and the newduplicate_pathrefusal. nemar-process's launcher reader is its own, so it may want the same refusal. A completed link's location is checked against neuroschema'srelativeLocation, so a non-ASCII recording path can be linked.compute-progress-vectors.jsonis unchanged, so nemar-process's pin bump is a no-op copy.ADR and changelog
storedfollows the last declared checkpoint; one row per recording. Plus its index line. No owner attribution.Follow-ups
processing/<recording>for a run's own (canary) derivative (Q3, deferred).Test plan
bun run typecheck,bun run lint,bunx biome checkon every touched filebun run migrations:d1-check(145 migrations on real D1; catalog matches bun:sqlite)bun test: not run. It would check the whole process for shared-state leaks; it is the epic-to-devgate (Pipeline checkpoints, live progress and quality views (ADR 0134, ADR 0137) #2412)Agentic AI tools were used. The author assumes full responsibility for this content.