docs: document flag validation constraints#1230
Conversation
There was a problem hiding this comment.
Pull request overview
Adds documentation for CLI flag validation constraints in docs/usage.md to help users understand incompatible flag combinations and required dependencies (Fixes #496).
Changes:
- Adds a new “Flag Combinations and Constraints” section.
- Documents
--skip-pull+--build-localincompatibility with examples. - Documents
--allow-host-portsrequiring--enable-host-accesswith examples.
Comments suppressed due to low confidence (1)
docs/usage.md:674
- Same as above: the documented error output uses
Error:but the CLI emits this vialogger.error('❌ --allow-host-ports requires --enable-host-access to be set'), which results in a[ERROR]-prefixed line and includes the❌. Please adjust the shown output so it matches the actual CLI output format/message.
# ❌ Error: missing dependency flag
sudo awf --allow-host-ports 3000,8080 --allow-domains github.com -- your-command
# Error: --allow-host-ports requires --enable-host-access to be set
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # ❌ Error: incompatible flags | ||
| sudo awf --skip-pull --build-local --allow-domains github.com -- your-command | ||
| # Error: --skip-pull cannot be used with --build-local. Building images requires pulling base images from the registry. | ||
|
|
There was a problem hiding this comment.
The documented CLI output here doesn’t match what the CLI actually prints. awf logs validation failures via logger.error(...), which prefixes output with [ERROR] and (for these cases) includes a leading ❌, not Error:. Please update the example output lines so they match the real CLI output format/message (including the ❌ prefix, and consider whether to include the [ERROR] prefix as well).
This issue also appears on line 671 of the same file.
| sudo awf --allow-host-ports 3000,8080 --allow-domains github.com -- your-command | ||
| # Error: --allow-host-ports requires --enable-host-access to be set | ||
|
|
||
| # ✅ Correct: include --enable-host-access | ||
| sudo awf --enable-host-access --allow-host-ports 3000,8080 --allow-domains github.com -- your-command |
There was a problem hiding this comment.
The “correct” example for --allow-host-ports uses --allow-domains github.com, but --allow-host-ports only affects access to host services (e.g., host.docker.internal / localhost). This example is valid syntactically, but it doesn’t demonstrate a working/meaningful host-access scenario; consider updating it to include --allow-domains host.docker.internal (or localhost) to align with the explanation and earlier examples in this doc.
| sudo awf --allow-host-ports 3000,8080 --allow-domains github.com -- your-command | |
| # Error: --allow-host-ports requires --enable-host-access to be set | |
| # ✅ Correct: include --enable-host-access | |
| sudo awf --enable-host-access --allow-host-ports 3000,8080 --allow-domains github.com -- your-command | |
| sudo awf --allow-host-ports 3000,8080 --allow-domains host.docker.internal -- your-command | |
| # Error: --allow-host-ports requires --enable-host-access to be set | |
| # ✅ Correct: include --enable-host-access | |
| sudo awf --enable-host-access --allow-host-ports 3000,8080 --allow-domains host.docker.internal -- your-command |
|
Smoke Test Results
Overall: PASS
|
|
Smoke Test Results —
Overall: PASS
|
This comment has been minimized.
This comment has been minimized.
1 similar comment
🏗️ Build Test Suite Results
Overall: 0/8 ecosystems passed — ❌ FAIL Error DetailsAll 8 repository clone attempts failed with: The
|
|
Smoke test results (run 22964980596):
|
Add "Flag Combinations and Constraints" section to usage.md documenting: - --skip-pull + --build-local incompatibility (with error message) - --allow-host-ports requires --enable-host-access (with error message) Fixes #496 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dfd40bd to
7bc1e90
Compare
Smoke Test Results
Overall: PASS
|
Smoke Test Results✅ GitHub MCP — Last 2 merged PRs:
✅ Playwright — Overall: PASS | Author:
|
|
PR titles: feat(cli): add predownload command to pre-pull container images
|
Summary
docs/usage.md--skip-pull+--build-localincompatibility with exact error message--allow-host-portsrequiring--enable-host-accesswith exact error messageFixes #496
Test plan
🤖 Generated with Claude Code