Repository navigation
docs(mcpx): stand up the mdBook book and .#mcpx-docs flake output (#1939) - #2629
Conversation
) Approach C from #1939: pkgs/mcpx/book.toml (src = docs, create-missing off), docs/SUMMARY.md covering all 101 existing docs pages without rewriting any content, and pkgs/mcpx/docs.nix rendering the book with the flake-pinned mdbook in a sandboxed runCommand. Wired as packages.mcpx-docs in make-root-apps so nix build .#mcpx-docs (verified locally on the laptop) and the CI flake-check path cover it.
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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7530992a2b
ℹ️ 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".
| fileset = lib.fileset.unions [ | ||
| ./book.toml | ||
| ./docs | ||
| ]; |
There was a problem hiding this comment.
Preserve links to resources outside the book source tree
When readers use the rendered book, links to files outside docs/ lead outside the generated artifact instead of to their existing repository targets. For example, quick-start.md:49 directs readers to ../AGENTS.md to configure their agent, while story.md links to ../daemon/README.md and maintenance scripts. Repository-tree inspection confirms those targets exist, but this fileset excludes them and the build provides no link rewriting or corresponding output files. Rewrite these links to repository URLs or explicitly include and publish the referenced resources so the book's onboarding and operational instructions remain usable.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 684a133 (pushed to this PR).
The build in pkgs/mcpx/docs.nix now rewrites links that escape the book source tree — in the copied pages only — to the target file's repository URL, at the depth where each link escapes: ../ from a top-level page and ../../ from a page one directory down both resolve to pkgs/mcpx/<target>, i.e. https://github.com/developing-today/code/blob/main/pkgs/mcpx/<target>. The sources keep their relative links (which keep working on GitHub), and links that stay inside docs/ are left for mdBook to resolve.
Verified locally at the pushed head: nix build .#mcpx-docs succeeds; the rendered story.html carries 9 rewritten links (including ../AGENTS.md), compare/history.html carries 6, no href="../AGENTS.md" remains, and in-book links such as ../story.html are untouched.
TestEveryDocumentHasAChapter requires every markdown file to be placed. SUMMARY.md is the mdBook navigation index the generator reads, not a chapter, so it lands as not-compendium with chapter null.
…x-docs build (#1939) Dispositions the Codex P2 finding on PR #2629: rendered-book links to files outside docs/ (../AGENTS.md, ../daemon/README.md, ../../ASSESSMENT.md, maintenance scripts) led outside the generated artifact and 404ed. The build now rewrites escaping links in the copied pages only - at the depth where each escapes (../ from top-level pages, ../../ from pages one directory down) - to the target file's GitHub URL. Sources keep their relative links, which keep working on GitHub; links that stay inside docs/ are left for mdBook to resolve. Verified on the laptop: nix build .#mcpx-docs succeeds; story.html carries 9 rewritten links and compare/history.html 6, no href="../AGENTS.md" remains, and in-book links (../story.html) are untouched.
|
🤖 Agent note · duplicate reconciled (queue task 3236)
|
|
🤖 Agent note · correction to the salvage note above
|
…mdbook # Conflicts: # pkgs/mcpx/docs/compendium.manifest.json
Implements the #1939 decision (Approach C) — queue task 3236.
pkgs/mcpx/book.toml— mdBook config; book root ispkgs/mcpx,src = "docs",create-missing = false.pkgs/mcpx/docs/SUMMARY.md— covers all 101 existing docs pages (titles taken from each page's first heading); no existing docs content rewritten or dropped.pkgs/mcpx/docs.nix— sandboxedrunCommandrendering the book with the flake-pinnedmdbookfrom nixpkgs (fileset source: onlybook.toml+docs/), no network.lib/default.nix— wires it aspackages.mcpx-docsinmake-root-apps, sonix build .#mcpx-docsand the CI flake-check path cover it.Verified on the laptop before pushing:
nix build .#mcpx-docssucceeds and produces the rendered book (index,configuration.html,story.html, subdirectories). Existing mcpx Go checks, includinginternal/settings/docs_test.go, are untouched and run in CI.Out of scope per the packet: hand-written home page, llms.txt/.md twin emitter, version-history preprocessor, deployment/Pages wiring (sibling issues).
Closes #1939 on merge.
Need help on this PR? Tag
@codesmith-botwith what you need.