Fix documented flags that don't exist - #215
Conversation
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.
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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:
|
Every flag in
README.mdanddocs/usage.mdis now verified against the binary's--help. Four documented invocations failed outright.Broken copy-paste
README.md:21(Quick Start)tcp postgres:5432 --retry 5 --retry-interval 2sunknown flag: --retry.tcphas only--timeout; neither name exists on any command (http/prometheususe--retry-delay)README.md:33(feature bullet)--min ^1.0invalid version format: "^1.0"— ranges need--rangeusage.md:106,126env --requiredunknown flag: --required— it's--allow-emptyusage.md:1282,1306tcp ... --retry 10in the distroless entrypoint recipeThe
tcpexamples now use--timeout, matching whatexamples/runtime-checks-with-entrypoint/entrypoint.shalready did correctly.16 undocumented flags added
All verified present, with descriptions taken from
--helprather than invented:--not-set,--is-bool,--is-port,--is-url,--is-json,--is-file,--is-dir,--min-value,--max-value--body,--body-file,--contains,--json-path,--follow-redirects--auto,--sha1,--sha384--json-pathis pitched inREADME.md:98as a reason to use preflight overcurl | 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:
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 missingprometheusandrundocs/development.mdlisted 5 of 18 packagesVerification
Extracted every
--flagtoken from both docs and diffed against the union of all 13 subcommands'--helpoutput. 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
tcpgenuinely has no retry, so "block until Postgres is up" still can't be expressed —--timeoutbounds a single attempt rather than retrying a refused connection. That's a feature gap rather than doc drift, and worth deciding on separately.