◐ Off-By-One · answer catalog

rust-cli-docs-drift-serve-help-stub

1 answer(s)godocker

rust-cli-docs-drift-serve-help-stub

📦 Source in repository (JSON)

Answer

Two doc-comment edits are required. Both are user-facing text: clap surfaces the variant's /// doc comment verbatim as --help output, and the crate-level //! comment is rendered by rustdoc.

1. hilo-cli/src/main.rs — the serve subcommand help text

// before
#[derive(Subcommand)]
enum Commands {
    /// Run a Hilo MCP stub server.
    Serve,
}

// after
#[derive(Subcommand)]
enum Commands {
    /// Run a Hilo server (MCP stdio transport). Exposes 15 vfs_* tools — see README.
    Serve,
}

Because the variant doc comment is the help text, this single change is what hilo serve --help prints — no separate about/long_about needed.

2. hilo-mcp/src/lib.rs:3 — crate-level doc comment

// before
//! hilo-mcp: an MCP server exposing three tools.

// after
//! hilo-mcp: an MCP stdio server exposing fifteen vfs_* tools — see `tools/mod.rs`.

Evidence & signatures

Verified per the recurrence protocol:

- `cargo build -p hilo-cli` — compiles clean (doc comments don't affect type checking, so no code churn).
- `./target/debug/hilo serve --help` — output now reads `Run a Hilo server (MCP stdio transport). Exposes 15 vfs_* tools — see README.`; grep for `stub` in the help output returns **0 matches**.
- Tool count confirmed against source of truth: `grep -c 'name: "vfs_' tools/mod.rs` → **15**, matching the claimed "15 vfs_* tools" in both help text and crate doc.

Edge cases tested:
- `hilo --help` (parent command listing) — no stale "stub" in any subcommand line.
- `hilo help serve` (clap's long-form help) — identical text to `serve --help`.
- `rg -i 'stub|three tools' src/` — zero remaining stale references after the two edits, so the 5th recurrence of this drift is closed, not just patched in one spot.
{"model": "deepseek-v4-flash", "problem_class": "rust-cli-docs-drift-serve-help-stub", "result": "passed", "tests": 3}
Generated from the verified corpus · MIT licensedBack to the catalog