Repository navigation
Phase 4: publisher canary for git:-keyed manifest entries (#503) - #518
Merged
neuromechanist merged 1 commit intoMay 16, 2026
Conversation
Option 1 from the issue. After generateManifest builds the file map, HEAD-check a small sample of the git:-keyed URLs on raw.githubusercontent.com pinned to the version tag. If any return non-200, throw GitBackedFileMissingError so the publication workflow fails LOUDLY instead of writing a manifest that would later 302->404 on data.nemar.org. Sampling: dataset_description.json (always when present) + up to 4 additional git: paths in deterministic sorted order. Caps the Worker subrequest cost at 5 HEADs in the happy path. A single 2-second retry per failing canary absorbs raw.githubusercontent.com CDN propagation lag after a fresh tag push; real missing-blob failures stay failed across both attempts. selectGitBackedCanaries is exported and pinned by unit tests so the sampling matrix is legible.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR518Version: 🤖 Updated on each push. |
neuromechanist
merged commit May 16, 2026
60e0a8a
into
feature/issue-514-epic-website-followups
1 check passed
4 of 7 tasks
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.
Closes #503. Phase 4 of epic #514.
Summary
Option 1 from the issue: publisher canary on
git:-keyed manifest entries.After
generateManifestbuilds the file map (backend/src/services/manifest.ts),verifyGitBackedFilesHEAD-checks a small sample of thegit:-keyed URLs againsthttps://raw.githubusercontent.com/nemarDatasets/<repo>/<tag>/<bidsPath>. If any return non-200 after one retry, it throwsGitBackedFileMissingError. All four existinggenerateManifestcallers already wrap the call in try/catch and surface the error message, so a broken manifest never reaches S3.Sampling strategy
Cap the Worker subrequest cost at 5 HEADs in the happy path:
dataset_description.jsonis always included when present (the canonical BIDS root file the website hits first)git:paths in deterministic sorted orderA single 2-second retry per failing canary absorbs
raw.githubusercontent.comCDN propagation lag after a fresh tag push. Real missing-blob failures stay failed across both attempts.selectGitBackedCanaries(files, maxAdditional)is exported and unit-pinned (8 tests) so the sampling matrix is legible and refactor-safe.Failure modes this catches
dataset_versionsrow without minting the corresponding tag → canary 404s on the missing tag.In all three cases, the publish workflow fails LOUDLY with a clear error message instead of silently writing a manifest that 302→404s for every end user.
Test plan
bun test test/manifest.test.ts→ 26 pass / 0 failtsc --noEmitpassesGitBackedFileMissingErrorwith the failing path + HTTP status.[manifest] git-backed canary OK ....Acceptance from the issue
/manifest.jsoncontract for healthy datasetsconsole.logon success,console.error+ thrownGitBackedFileMissingErroron failure (with full failure summary in the message)This is the final phase of epic #514. Next: open epic→dev PR with
/review-pr(sonnet).