Repository navigation
docs: check that every part of the language has a documented home - #543
Merged
Merged
Conversation
The feature list is read out of the compiler rather than hand-maintained, so it cannot fall behind the implementation: keywords from Lexer.keyword_map, attributes from KNOWN_ATTRIBUTES, subcommands from the flow driver's dispatch table, modules from lib/stdlib, backends from the *_generator / *_codegen / *_compiler modules. That is 248 features today. docs/coverage.json maps each one to the page that documents it. A mapping only counts when the page exists and actually mentions the feature, so an entry cannot be a promise nobody kept, and a mapping for something the compiler has since dropped is reported as stale. Bootstrapping it found 16 features no page mentions at all. Twelve are compatibility aliases for `flow demo ...` and two are spelling aliases, all now exempt with reasons. One is the direct wasm32 backend, which PR #539 documents. The last was real: `flow check` has existed since #415 and was documented nowhere, so this adds it to DEVELOPMENT.md with what it reads from flow.toml, what it skips, and what it exits. Coverage now: attribute 20/20, backend 8/9, cli 52/66, keyword 44/44, stdlib 109/109, with 15 exemptions each carrying a written reason and nothing uncovered. Two extraction details worth knowing. Subcommands come from the dispatch `case` arms rather than show_help, so a command that exists but was never added to the help text still counts; the first attempt read every `case` in the driver and picked up architecture and profile arms, which the tests now pin against. And `mentions` is deliberately literal per category: `@gpu` matches the attribute while the bare word "gpu" does not, so a passing mention cannot masquerade as documentation. Reporting only, no CI gate yet. Unit 1428 passed, ruff clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This was referenced Aug 18, 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.
Fourth of the wiki series. Branches from main; independent of #540, #541 and #542.
This is the part that answers "people should be able to find information about every aspect of the language" with a number instead of an opinion.
The inventory is read from the compiler
Never hand-maintained, so it cannot fall behind the implementation:
parser.py,Lexer.keyword_mapattributes.py,KNOWN_ATTRIBUTESflowdriver's dispatchcaselib/stdlib/**/*.flowsrc/flow/*_{generator,codegen,compiler}.pydocs/coverage.jsonmaps each feature to the page that documents it. Three ways a mapping can fail, all of them errors:That last one is the point. A mapping that points somewhere plausible but silent is worse than an admitted gap, because it reads as covered. A mapping for something the compiler has since dropped is reported as stale in the other direction.
What bootstrapping it found
16 features that no page mentions anywhere:
Twelve are compatibility aliases for
flow demo ...and two are spelling aliases (firg,install-tools); all now exempt with that reason written down.wasm_compileris the direct wasm32 backend, which #539 documents.One was a real gap.
flow checkhas existed since #415 and was documented nowhere. It lints.flowsources against[conventions].avoidinflow.toml. This adds it toDEVELOPMENT.mdwith what it reads, what it skips (build/,.freebuff/), and the fact that it exits non-zero on a match so it can be used as a gate.Result
Two extraction details
Subcommands come from the dispatch table, not the help text, so a command that exists but was never added to
show_helpstill counts. My first attempt read everycasein the driver and picked up architecture arms (x86_64,aarch64) and profile arms (safety,flight) as if they were commands. A test now pins that they stay out.mentionsis deliberately literal, per category.@gpumatches the attribute while the bare word "gpu" does not;./flow runmatches the command while "a long run of failures" does not. Parametrised tests cover both directions, because a search loose enough to match anything would make the whole check meaningless.Scope
Reporting only, no CI gate. The gate arrives with the others later in the series.
Validation
check_doc_coverage.pyexits 0check_doc_links.pycleanruff check srcclean