Skip to content

Fix documented flags that don't exist - #215

Merged
vertti merged 2 commits into
mainfrom
fix-doc-drift
Aug 11, 2026
Merged

Fix documented flags that don't exist#215
vertti merged 2 commits into
mainfrom
fix-doc-drift

Conversation

@vertti

@vertti vertti commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Every flag in README.md and docs/usage.md is now verified against the binary's --help. Four documented invocations failed outright.

Broken copy-paste

Location Documented Reality
README.md:21 (Quick Start) tcp postgres:5432 --retry 5 --retry-interval 2s unknown flag: --retry. tcp has only --timeout; neither name exists on any command (http/prometheus use --retry-delay)
README.md:33 (feature bullet) --min ^1.0 invalid version format: "^1.0" — ranges need --range
usage.md:106,126 env --required unknown flag: --required — it's --allow-empty
usage.md:1282,1306 tcp ... --retry 10 in the distroless entrypoint recipe same unknown flag

The tcp examples now use --timeout, matching what examples/runtime-checks-with-entrypoint/entrypoint.sh already did correctly.

16 undocumented flags added

All verified present, with descriptions taken from --help rather than invented:

  • env--not-set, --is-bool, --is-port, --is-url, --is-json, --is-file, --is-dir, --min-value, --max-value
  • http--body, --body-file, --contains, --json-path, --follow-redirects
  • hash--auto, --sha1, --sha384

--json-path is pitched in README.md:98 as a reason to use preflight over curl | jq, but was never listed in the http flag table. The "Redirect Handling" section also read as a hard limitation; it now mentions --follow-redirects.

Size claims — corrected in the opposite direction from expected

My review flagged README's "2MB binary" as understated against a 6.9MB build. That was measuring the uncompressed binary. The release pipeline UPX-compresses before publishing and before the Docker build, so what users actually get is:

preflight-linux-amd64 (published):  2.5 MB
preflight-linux-arm64 (published):  2.2 MB
v0.18.0 image layers:               2.5 MB amd64 / 2.2 MB arm64
uncompressed build (not shipped):   6.9 MB

So README's "2MB" was roughly right, and usage.md:1235's "adds ~6MB" was the inaccurate one — it overstated what copying preflight costs you by ~2.5×. Both now say 2.5MB.

Dependency count corrected too: "3 direct dependencies (cobra, semver, x/term)" → 5 runtime deps, since pflag and x/sys are also linked into the binary.

Also

  • ROADMAP.md "Already Implemented" was missing prometheus and run
  • docs/development.md listed 5 of 18 packages

Verification

Extracted every --flag token from both docs and diffed against the union of all 13 subcommands' --help output. The only remaining unmatched token is --version, which is a root-level flag and so absent from subcommand flag lists — confirmed working. The examples I changed were each executed against the binary.

Table realignment in the diff is dprint reformatting rows I edited, not separate formatting churn.

Not fixed here

tcp genuinely has no retry, so "block until Postgres is up" still can't be expressed — --timeout bounds a single attempt rather than retrying a refused connection. That's a feature gap rather than doc drift, and worth deciding on separately.

Every flag in README.md and docs/usage.md is now checked against the
binary's --help. Four documented invocations failed outright:

  tcp --retry / --retry-interval   README quick start + 2 entrypoint
                                   examples; tcp only has --timeout
  --min ^1.0                       ranges need --range
  env --required                   the flag is --allow-empty

Adds 16 flags that existed but were undocumented: the env --is-* family,
--not-set, --min-value/--max-value; http --body, --body-file, --contains,
--json-path, --follow-redirects; hash --auto, --sha1, --sha384. --json-path
was advertised in the README as a selling point without ever being listed.

Corrects the size claims in the opposite direction from what they looked
like: the published binary is UPX-compressed, so what users download and
what lands in an image is 2.5MB, not the 6.9MB uncompressed build. README's
"2MB" was roughly right; usage.md's "adds ~6MB" was the wrong one.
Confirmed against the v0.18.0 image layers (2.5MB amd64, 2.2MB arm64).

Also: prometheus and run were missing from ROADMAP's implemented table, and
development.md listed 5 of 18 packages.
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@vertti, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 202cf91a-c4af-41b5-b6cb-b7a358b9ca52

📥 Commits

Reviewing files that changed from the base of the PR and between af6f474 and 137fea8.

📒 Files selected for processing (4)
  • README.md
  • ROADMAP.md
  • docs/development.md
  • docs/usage.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.00%. Comparing base (af6f474) to head (137fea8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #215   +/-   ##
=======================================
  Coverage   93.00%   93.00%           
=======================================
  Files          49       49           
  Lines        1872     1872           
=======================================
  Hits         1741     1741           
  Misses         94       94           
  Partials       37       37           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vertti
vertti merged commit 41213e0 into main Aug 11, 2026
19 checks passed
@vertti
vertti deleted the fix-doc-drift branch August 11, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant