Repository navigation
mcpx docs: finish the generated reference (#4909) - #5177
Merged
Merged
Conversation
Implements the remainder of #1846 slices 2-4: mcpx man --format markdown emits the full reference tree (per-command pages, global flags, /v1 page plus both OpenAPI specs, MCP tools page, protocol tables), protocol.md gains generated feature/capability regions, one consolidated refdoc golden guards configuration/parity/protocol, and package.nix installs the tree.
|
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 25 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. CodeRabbit Verify
|
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. |
This was referenced Nov 4, 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.
Implements issue #4909 — the remainder of #1846 slices 2–4 (parent #1843). Queue task 8798.
What lands
mcpx man --format markdown [-o DIR]— the whole generated reference tree, offline and byte-deterministic (verified: two runs,diff -rclean, 78 files):cli/index.md— every command grouped byGroup, plus theSUMMARY.mdfragmentcli/<command>.md— one page per command: declaration, examples, hand-declared flags (from the generated flag index), and the settings declared for that commandcli/global-flags.md—GlobalFlags()(the flags main() switches on, presence-tested againstcmd/mcpx/main.go) plus every unrestricted setting flag, whichApplyGlobalSettingFlagsalso accepts globallyapi/v1.md— every /v1 operation fromapi.Ops()(newapi.Markdown), with per-operation parameter detailapi/openapi.json— the staticapi.OpenAPIdocument;api/openapi-serve.json— the serve-surfacecli.OpenAPIdocument. Neither fetches a running daemon's/v1/openapi.jsonmcp/tools.md— every served MCP tool frommcpserver.New(nil, …).WithExtras(mcpserver.OpTools(nil)).Tools(): description, annotations, top-level input parameters, and a link to the /v1 operation for proxied toolsprotocol/tables.md— features × revisions and declared capabilitiesdocs/protocol.md— §1 gains a generated features region (FeatureMatrix()); §2.2's hand table is replaced by a generated region rendered from the server's owncapabilities()via the newmcpserver.DeclaredServerCapabilities(push-capable connection; the push-condition prose below the table is the footnote and stays). Regenerating §2.2 corrects the stale hand table (e.g.loggingandcompletionscolumns now match the code).internal/refdoc/regions_test.go(TestCommittedRegionsAreCurrent, one-update) covers the configuration.md inventory region, parity.md, and both protocol.md regions. To make that possible, the settings inventory renderer moved frominternal/settings/docs_test.gointo the settings package assettings.ConfigurationTable(rendering unchanged; the settings docs test now calls it).package.nixpostInstall installs the Markdown tree (including both OpenAPI specs) at$out/share/doc/mcpx/reference; checkPhase note records thatinternal/refdocandinternal/apirun there (they are in the default package enumeration and spawn no runtimes or sockets).man's new--formatis excepted from thelogging.formatsetting binding viahandFlagsMeaningOther, the same patternschema --formatalready uses; the hand-flag index is regenerated.Tests
go test ./internal/refdoc ./internal/api ./internal/mcpserver— passgo test ./internal/cli -run 'TestHandFlagIndexIsCurrent|TestManualMarkdownCoversEverySurface|TestGlobalFlagsAreDeclaredInMain'— pass; full./internal/clisuite — see CIgo test ./internal/settings— the documentation test passes; 5 failures (TestEveryDocumentHasAChapter,TestNoUndeclaredEnvRead,TestEverySettingHasAnEffectProbeOrAnExemption,TestTheScriptEnvironmentIsWhatTheCodeSets,TestTheEnvironmentDocIsCurrent) reproduce identically on cleanmainin this environment — pre-existing, unrelated to this changemcpx man(roff) unchanged;mcpx man --format markdown -o DIRtwice → byte-identical trees;--format boguserrors cleanlynix-instantiate --parse pkgs/mcpx/package.nix— okRefs #4909, #1843, #1846.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.