Skip to content

Document every command, and check that we did - #18

Merged
Claptar merged 1 commit into
mainfrom
fix/document-every-command
Sep 24, 2026
Merged

Claptar merged 1 commit into
mainfrom
fix/document-every-command

Conversation

@Claptar

@Claptar Claptar commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

You were right — convert was under-documented, and the gap was wider than it looked.

What was missing

Where Missing
docs/COMMANDS.md table of contents convert
App help string (adata --help, first line) convert and create

The ## convert section itself was present, as were the README overview and the index "At a glance" — so it read as documented right up until you went looking for it in the contents.

The ToC edit that should have added it matched on - [`split`](#split) with backticks; the file writes - [split](#split) without them. Neither the replacement nor its fallback fired, and nothing failed.

create has been absent from the app help since it was added — which is the clearest sign this wanted a test rather than more care from me.

Why the existing suite missed it

test_docs_are_accurate.py walks one direction only: everything the docs claim must exist. That catches a documented flag that got renamed. It is structurally blind to a command nobody documented.

Three checks now walk the other way, derived from the Click tree rather than a hardcoded list, so a command added tomorrow is covered without anyone remembering to update a list:

  • every visible command has a ## \name`` section in COMMANDS.md
  • every visible command is in the table of contents
  • every visible command is named in the app help

Against the previous state they fail exactly three times — convert in the contents, convert and create in the help — and nowhere else.

Verification

995 tests pass. Same-direction coverage as before is unchanged; this only adds the inverse.

🤖 Generated with Claude Code

`convert` shipped in 0.6.0 with a section in COMMANDS.md that the table of
contents never listed. The edit that was supposed to add it matched on
"- [`split`](#split)" with backticks; the file writes "- [split](#split)"
without them, so neither the replacement nor its fallback fired and nothing
said so.

The app help string -- the first line of `adata --help` -- named neither
`convert` nor `create`. `create` has been missing from it since it was
added, which is the clearest sign this needed a test rather than more care.

The existing docs suite only walks one direction: everything the docs claim
must exist. That catches a documented flag that was renamed, and is blind to
a command nobody documented. Three checks now walk the other way, over the
Click tree rather than a hardcoded list, so a command added tomorrow is
covered without anyone remembering: each visible command needs a section in
COMMANDS.md, an entry in its table of contents, and a mention in the app
help.

Against the previous state they fail three times -- convert in the contents,
convert and create in the help -- and nowhere else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 24, 2026 11:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 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-09-24T11:57:58.592435Z 2f713ae PR opened
ℹ️ 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.

@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: 2f713aed81

ℹ️ 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".

import typer

help_text = typer.main.get_command(app).help or ""
assert name in help_text, (

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 Match complete command names in the help list

When a future visible command has a name that is already a substring elsewhere in the prose, this test passes even if the command is omitted from the parenthesized list. For example, adding a store command without updating the help succeeds because store matches stores, contradicting the stated guarantee that commands added tomorrow are covered. Parse the listed commands or use delimiter-aware whole-name matching instead.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (py3.13)

996 tests  +27   996 ✅ +27   2m 8s ⏱️ - 1m 53s
  1 suites ± 0     0 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit 2f713ae. ± Comparison against base commit daa21dd.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (py3.12)

996 tests  +27   996 ✅ +27   3m 4s ⏱️ - 1m 8s
  1 suites ± 0     0 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit 2f713ae. ± Comparison against base commit daa21dd.

@Claptar
Claptar merged commit 8868fde into main Sep 24, 2026
5 checks passed
@Claptar
Claptar deleted the fix/document-every-command branch September 24, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants