Repository navigation
test(docs): check that every fctl command the docs show parses - #656
Open
fctl-sh[bot] wants to merge 2 commits into
Open
fctl-sh[bot] wants to merge 2 commits into
fctl-sh[bot] wants to merge 2 commits into
Conversation
cargo test now reads the shell code blocks of docs/*.md, the guides' scripts included, and parses each fctl command in them with the CLI as it is: a renamed command or flag fails until the docs that show it change. It found two commands that only print help (`fctl admin github` and `fctl account two-factor` want `list` and `status`), now fixed, and a diagram and a log in blocks without a language, now marked text. development.md says what the docs' checks cover, and that people try the guides for organizations on real accounts each quarter and before a release that changes what they use. Refs #614
This was referenced Nov 25, 2026
Open
This comment has been minimized.
This comment has been minimized.
The check of the docs' fctl commands now follows a variable a script sets to run fctl (the runner guide's fctl-drain runs `timeout "$1" $fctl host uninstall --wait`), `timeout` and the shell's `if`/`then`/`else`, and reads docs/llms.txt and the `run:` steps of the docs' GitHub workflows. That adds 15 commands, all of which parse. llms.txt's two diagrams are marked text, as the docs' others are. development.md says what it follows and that commands in the text itself aren't checked.
This branch has not been deployed
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.
Summary
cargo testnow parses everyfctlcommand the docs show with the CLI as it is. It reads the shell code blocks ofdocs/*.mdanddocs/llms.txt(markedsh, or not marked), the guides' scripts included, and therun:steps of the docs' GitHub workflows. It follows the shell's quoting, line continuations,$(…), pipes and redirections, and finds fctl behindFCTL_SERVER=…,sudo -u fctl,runuser -u fctl -- env …,timeout, its full path,cargo run -p fctl --and a variable a script sets to run it (the drain script's$fctl). A change that renames a command or a flag, or changes what a value takes, now fails until the docs and guides that show it change too. It finds 755 commands. Four problems turned up, now fixed:fctl admin githubandfctl account two-factoronly print help on their own (cli.mdnow showslistandstatus, as the CLI wants), and diagrams and a log sat in blocks without a language (in architecture.md, self-hosting.md and llms.txt); those are now markedtext. Commands written as inline code in the text aren't checked.This is the decision #614 left open on how the guides stay current: everything CI can check is checked on every pull request (this test, xtask's link checks, and the test that the runner guide shows
deploy/cloud's scripts as they are), anddocs/development.md#checkssays people try the guides for organizations on real accounts each quarter, and before a release that changes what they use. #655 tracks those trials and the microVM section, which need cloud accounts. I checked the test by breaking a flag in the runner guide's enroll and drain scripts, which it then names.Worth confirming
deploy/cloud, webhooks' payloads or a private instance's public paths, rather than for every release, which comes about daily.fctl admin githublist andfctl account two-factorshow the status with no subcommand, asfctl admin early-accessdoes, would be a small CLI change of its own.Refs #614
fctl session
Note
Low risk. It adds a test-only module and edits docs; no shipped code changes.
What it does. Adds a test that reads the shell code blocks in
docs/*.mdanddocs/llms.txt, plus therun:steps of the docs' GitHub workflows, and checks that everyfctlcommand in them parses with the current CLI. It followssudo,runuser,env,timeoutand a$fctlvariable set by a script. It also fixes docs the test flagged, marks two diagrams inllms.txtastext, and describes the check indocs/development.md.fctl review's first look at
a2ecb91· 7 files, +513 −8 · Review agent settings