Repository navigation
fix: restrict specification publication to declared content - #3
Conversation
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b01a20e4c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const reference of [...new Set([...SPECIFICATION_DOWNLOADS, ...referencedPaths])].sort()) { | ||
| pending.push({ relative: reference }); | ||
| } | ||
| return copied.toSorted(); | ||
| while (pending.length) await copyEntry(pending.shift()); |
There was a problem hiding this comment.
Include root-relative assets in the publication graph
For a framework site built with base /, a page containing  or <img src="/assets/logo.svg"> now loses its image even when assets/logo.svg exists. collectReferencedSupportPaths excludes references starting with /, while rewriteReference leaves them unchanged. Previously, the full support-file walk published the asset; this new reference-only loop omits it, producing a broken image and a missing-target error from checkBuilt. Include source-owned root-relative references in the graph without restoring unrestricted copying.
Useful? React with 👍 / 👎.
| const target = safeRelativeTarget( | ||
| page.sourceName, | ||
| decodedPathname(page.sourceName, pathname), | ||
| ); |
There was a problem hiding this comment.
Preserve encoded delimiters when resolving support filenames
When a linked filename contains an encoded # or ?, decoding the pathname before passing it to safeRelativeTarget truncates the filename: that helper splits its argument on those characters again. For example, assets/a%23b.svg becomes the support target assets/a, so the existing assets/a#b.svg is no longer published, although the rendered URL still points to it. The parent commit published this asset successfully. Normalize the already-separated, decoded pathname without treating its literal filename characters as URL delimiters.
Useful? React with 👍 / 👎.
The framework adapter currently turns linked repository Markdown into extra site pages and copies unrelated non-Markdown files into public downloads. This publishes repository tooling and lockfiles alongside the specification, even when they are absent from
toc.yml.Use root
README.mdandtoc.ymlas the complete page inventory. Reject local Markdown links outside that inventory with a useful error, and remove the synthetic Linked documents group. Publish only selected support links, requirement contract/test references, metadata downloads, and local schema dependencies. Native API declarations independently retain byte-identical source contracts and their dependency files, so Source OpenAPI downloads continue to work.Missing local schema dependencies fail generation. Download-directory indexes list only published files, and output checks validate their links. Existing source-root, hidden-path, symlink, and native API protections remain in place. The API Guide profile keeps its existing behavior.
Validation: