Repository navigation
Render service: read the release's files from a local folder (RENDER_FILES) - #777
Merged
Merged
Conversation
…FILES) The render page fetches a diagram's layout and an illustration from the download site, as a reader's browser does. For the render service that is the wrong source: it draws in bulk, and a release's own figures are drawn before the release's files are on the download site. With RENDER_FILES set (--files for the CLI), every request the page makes to the download site is answered from that folder, laid out as the site is, and a file the folder lacks is a 404, never a request to the site. Unset, nothing changes. /health names the source in use. Wanted by pdf-export's spec 001 (research R10), whose figures' step draws a release's figures before it is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adamjohnwright
added a commit
that referenced
this pull request
Nov 2, 2026
Render service, from #777's review: RENDER_FILES checked, contained and keyed
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.
The render page fetches a diagram's layout (
{release}/diagram/{id}.json,.graph.json) and an illustration ({release}/ehld/{id}.svg) from the download site, as a reader's browser does. That is right for a reader's browser, which is what the CDN is for, and wrong for the render service: it draws in bulk, and a release's own figures are drawn before the release's files are on the download site.What changes
tools/render/local-files.ts: with a folder given, every request the page makes to the download site is answered from that folder, laid out as the site is (<folder>/98/diagram/R-HSA-73857.json). A file the folder lacks is a 404, never a request to the site. A path that would leave the folder (an encoded../) is a 404 too.render()takes afilesoption and installs the route only while it draws; the service readsRENDER_FILES; the CLI takes--files./healthnames the source in use.Checked
Wanted by pdf-export spec 001 (research R10): its figures' step draws a release's figures before the release is published.
🤖 Generated with Claude Code