Repository navigation
Phase 2 (#63): consume summary.readme.content from schema 1.1 - #68
Merged
neuromechanist merged 2 commits intoMay 26, 2026
Conversation
Extends SummaryReadme with the schema 1.1 fields nemar-cli#616 will emit (content, content_bytes, sha256, truncated; all optional) and inserts a Step 0.5 in /api/dataset/<id>/readme that returns the inlined markdown directly. Eliminates the synchronous GitHub raw fetch on the cold-paint path once the upstream backfill completes. Back-compat: schema 1.0 docs miss the new branch and fall through to the unchanged Step 1-4 resolver. Closes #63 Part of epic #66
Deploying nemar-website with
|
| Latest commit: |
ee3f22e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1c02743a.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-63-readme-inli.nemar-website.pages.dev |
Four findings from the parallel sonnet review pass: - pr-test-analyzer: whitespace-only inline content would slip past the length-check, render to empty HTML, and get cached with PUBLISHED_CACHE for the full SWR window. Switch the guard to trim().length === 0; add tests for the whitespace case and for preserving leading whitespace inside otherwise-valid markdown. - type-design-analyzer: declared `content?: string` but the docstring said the generator emits `content: null` on truncation. Align the type to `string | null`. Add a test for the explicit-null case. - comment-analyzer: clarify "leaves content null" in the interface comment now that the type matches; note that nemar-cli#616 is still open so the 256 KB cap is proposed, not enforced. - comment-analyzer: soften the Step 0.5 "abstraction surface tight" rationale and add a forward pointer for the case where a future ReadmeSourceKind needs to distinguish inline vs presigned at render time. 378/378 tests pass (was 375 before this commit).
neuromechanist
merged commit May 26, 2026
1bde6d8
into
feature/issue-66-epic-cold-paint
1 check passed
This was referenced May 26, 2026
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
Wires the website to consume the inline README content that nemar-cli#616 will start emitting under schema 1.1 of
summary.json. The current cold-paint path on/api/dataset/<id>/readmealways pays a synchronousraw.githubusercontent.comRTT for the actual README body, even whensummary.jsonalready resolved the path. After this PR, whensummary.readme.contentis present andtruncated !== true, the route returns immediately from the inline markdown.The change is intentionally back-compat with schema 1.0 docs: every new field is optional, the new helper returns
nullwhencontentis absent, and Steps 1–4 of the existing resolver are untouched. Means the website can deploy this PR independently of the CLI side; the fast path lights up automatically as nemar-cli#616's backfill rolls out.Reuses
kind = "manifest"for the inline branch — the renderer's "manifest" branch already produces banner-less output, which is the correct affordance for content the dataset itself owns. No newReadmeSourceKindvalue needed.Closes #63
Part of epic #66
Test plan
bun run typecheck— 0 errorsbun run lint— cleanbun run test— 375/375 (was 370; 5 new tests forfindReadmeContentInSummarycovering schema 1.0, 1.1, truncated:true, empty-string content, and missing readme object)/api/dataset/on005505/readme?v=1.0.0still resolves via Step 1 GitHub fast path (unchanged behavior)Notes
src/lib/data-api.ts(additive type + helper),src/pages/api/dataset/[id]/readme.ts(Step 0.5 + resolution-order comment),src/lib/data-api.test.ts(5 new tests).render-readme.ts,markdown.ts, or any other endpoint.