Skip to content

docs(mcpx): stand up the mdBook book and .#mcpx-docs flake output (#1939) - #2629

Merged
dezren39 merged 6 commits into
mainfrom
queue/3236-1939-mcpx-mdbook
Oct 30, 2026
Merged

dezren39 merged 6 commits into
mainfrom
queue/3236-1939-mcpx-mdbook

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Implements the #1939 decision (Approach C) — queue task 3236.

  • pkgs/mcpx/book.toml — mdBook config; book root is pkgs/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 — sandboxed runCommand rendering the book with the flake-pinned mdbook from nixpkgs (fileset source: only book.toml + docs/), no network.
  • lib/default.nix — wires it as packages.mcpx-docs in make-root-apps, so nix build .#mcpx-docs and the CI flake-check path cover it.

Verified on the laptop before pushing: nix build .#mcpx-docs succeeds and produces the rendered book (index, configuration.html, story.html, subdirectories). Existing mcpx Go checks, including internal/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.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

)

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.
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 08:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T11:32:19.108099Z 4de2f18 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 872688a3-2f82-4fe0-8edb-6f848a1b9cf9
Commits

Reviewing files that changed from the base of the PR and between 7b76c79 and 9ca8f80.

Files selected for processing: 5
  • lib/default.nix
  • pkgs/mcpx/book.toml
  • pkgs/mcpx/docs.nix
  • pkgs/mcpx/docs/SUMMARY.md
  • pkgs/mcpx/docs/compendium.manifest.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread pkgs/mcpx/docs.nix
Comment on lines +16 to +19
fileset = lib.fileset.unions [
./book.toml
./docs
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@dezren39

Copy link
Copy Markdown
Member Author

🤖 Agent note · duplicate reconciled (queue task 3236)

@dezren39

Copy link
Copy Markdown
Member Author

🤖 Agent note · correction to the salvage note above

  • The nix build .#mcpx-docs evaluation failure I recorded against (now-closed) docs(mcpx): mdBook skeleton + .#mcpx-docs flake output (#1939) #2680 did not reproduce: the completed build run for that identical callPackage pattern finished successfully and produced the book (/nix/store/2klxi61bjnvz3nr6c0cnajj6ji727nrq-mcpx-docs on the laptop). The two earlier failures (missing lib, then mdbook arguments) were transient evaluation flakes, not a defect in this pattern.
  • So: no phantom bug to diagnose here. Resume path for task 3236 is simply this PR's own build/CI verification, then merge under the standing criteria.

…mdbook

# Conflicts:
#	pkgs/mcpx/docs/compendium.manifest.json
@dezren39
dezren39 merged commit c8ee2a6 into main Oct 30, 2026
5 checks passed
@dezren39
dezren39 deleted the queue/3236-1939-mcpx-mdbook branch October 30, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcpx docs: choose the site generator (mdBook, MkDocs Material, Docusaurus, Starlight, Hugo)

1 participant