Summary
docs/cli.md describes the bench --dir flag as "Source directory (inferred from the DB path if omitted)" — but runBench immediately errors with --dir is required if it's empty. There is no inference anywhere in the code. The doc's own example invocation omitting --dir would fail.
Location
- Doc claim:
docs/cli.md:93 —
\| --dir \| Source directory (inferred from the DB path if omitted). \|
- Code reality:
cmd/remindb/bench.go:27,36-38 —
benchCmd.Flags().StringVar(&benchDir, "dir", "", "Source directory to compile and benchmark (required)")
...
if benchDir == "" {
return errors.New("--dir is required")
}
- The flag's own description string already says
(required). Only the docs disagree.
Category
documentation
Impact
High (for a docs finding). A user following the prose ends up with a failing command. Agents reading docs/cli.md as their canonical CLI reference get the same wrong mental model.
Rationale
grep -n "infer\|benchDir" cmd/remindb/bench.go pkg/... finds zero inference logic. The required-flag path is the only code path. The doc claim is simply stale.
Suggested change direction
Two options, pick one:
-
Fix the docs to match the code (lower-effort, current behavior). Change docs/cli.md:93 to:
\| --dir \| Source directory to compile and benchmark. **Required.** \|
-
Implement the inference the docs already promise (better UX). Default --dir to the parent directory of --db (or apply the same derivation compile uses in the inverse direction). This matches the rest of the CLI's "do the obvious thing" defaulting style: compile <path> derives ./<dirname>.db, so bench --db ./notes.db deriving ./notes is symmetric.
Option 2 is more in keeping with the project's flag-defaulting style elsewhere (e.g. compile's --db derivation). Option 1 is the safe one-line fix if the inference was a planned-but-dropped feature.
Filed by the nightly enhancement-scanner routine at commit f11c9f1.
Summary
docs/cli.mddescribes thebench --dirflag as "Source directory (inferred from the DB path if omitted)" — butrunBenchimmediately errors with--dir is requiredif it's empty. There is no inference anywhere in the code. The doc's own example invocation omitting--dirwould fail.Location
docs/cli.md:93—cmd/remindb/bench.go:27,36-38—(required). Only the docs disagree.Category
documentation
Impact
High (for a docs finding). A user following the prose ends up with a failing command. Agents reading
docs/cli.mdas their canonical CLI reference get the same wrong mental model.Rationale
grep -n "infer\|benchDir" cmd/remindb/bench.go pkg/...finds zero inference logic. The required-flag path is the only code path. The doc claim is simply stale.Suggested change direction
Two options, pick one:
Fix the docs to match the code (lower-effort, current behavior). Change
docs/cli.md:93to:Implement the inference the docs already promise (better UX). Default
--dirto the parent directory of--db(or apply the same derivationcompileuses in the inverse direction). This matches the rest of the CLI's "do the obvious thing" defaulting style:compile <path>derives./<dirname>.db, sobench --db ./notes.dbderiving./notesis symmetric.Option 2 is more in keeping with the project's flag-defaulting style elsewhere (e.g.
compile's--dbderivation). Option 1 is the safe one-line fix if the inference was a planned-but-dropped feature.Filed by the nightly enhancement-scanner routine at commit f11c9f1.