Repository navigation
Phase 3: versioned access UX + file-removed tombstones - #505
Merged
neuromechanist merged 2 commits intoMay 15, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
Closes #497, part of epic #449. - Sitemap-style dataset landing page at /<id>/ with content negotiation (HTML for browsers, JSON for machine clients). Lists every published version with DOI, publish date, browse URL, and manifest URL. - Version picker (sibling links) in directory index pages when the dataset has more than one published version. Preserves the current sub-path so switching versions on /sub-01/eeg/ lands on the same directory in the target version. - Structured tombstone 404s: when a path 404s but existed in an older version, return reason: 'removed' + last_seen_version + last_seen_url. Lookback walk capped at 10 prior versions. - 'Files removed since vN-1' footer on directory index pages (collapsible details/summary) with links into the prior version. - HTML 404 page form (Accept: text/html) for tombstones. - 32 new unit tests covering findLastSeenVersion, diffRemovedSince, pickResponseFormat, the renderIndexHtml extensions, buildLandingPayload, renderDatasetLandingHtml, and renderTombstone404Html. 84 unit tests total, all passing. - E2E tests for the landing page JSON and HTML forms; tombstone E2E skips gracefully when nm099999 lacks two versions with a path drop (the unit test multi-version fixture covers the same branch).
From the 3-agent /review-pr pass on PR #505: - HIGH (security): renderTombstone404Html now escapes lastSeen.href in the href attribute, not just the link text. Adds a regression test with a synthetic hostile href. - HIGH (silent failure): loadManifest now wraps getManifest in try/catch. A transient S3/network throw on the hot Phase 3 paths (tombstone walk fans out up to 10 fetches per 404, removed-since footer fetches the prior version on every directory render) no longer 500s the request -- degrades to no-tombstone / no-footer. - HIGH (silent failure): loadVersionRows absorbs D1 errors and returns an empty array, with a logged error. The version picker and removed-since features are presentational; their D1 query failing must not cascade a 500 onto a file-redirect that would otherwise succeed. - MEDIUM: file 404 JSON bodies now echo version + path, parity with the HTML 404 form. Lets a JSON consumer self-describe a 404 without re-parsing the request URL. - Promotes toVersionTag to a shared exported helper in data-router.ts; metadataJsonHandler reuses it (was a duplicated inline coercion). Adds focused unit tests; the coercion bug class (mixed tag-form and bare versions in D1) is the highest-impact silent regression identified by the test analyst.
Contributor
Author
Review pass (3 sonnet agents in parallel)Findings addressed in 406f0ac:
Findings dismissed:
Unit test count: 52 -> 88 (Phase 3 adds 36). All passing. Ready to merge. |
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR505Version: 🤖 Updated on each push. |
neuromechanist
merged commit May 15, 2026
b3edd29
into
feature/issue-449-epic-data-https
1 check passed
This was referenced May 15, 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
Phase 3 of epic #449. Closes #497, part of epic #449.
Replaces the Phase 1 placeholder at `//` with a sitemap-style dataset landing page, adds a version picker to directory index pages, and adds structured 404 responses for files that were removed between versions.
What ships