docs(cli): correct boolean flag syntax and pipeline defaults - #48
Conversation
incur boolean flags do not consume the following token: `--flag false` sets the flag to **true** and leaves `false` as a stray positional. Every documented example used that form, so following the docs did the opposite of what the reader asked for. The forms the parser honours are `--flag`, `--flag=false`, and `--no-flag` (all verified against incur's parser). - Fix the `contracts update --include-in-pipeline false` example in SKILLS.md and add a note on both affected flags. - Correct the `--include-in-pipeline` description. It read "`true` by default in the API"; the API default is decode-only (false), and after the backend fix an omitted field preserves the stored value. - Clarify `--is-public` on create (defaults to private) and update (omitting preserves). - Extend the incur patch so rendered `--help` examples emit `--flag` and `--flag=false` instead of the broken `--flag false`, which stops the CLI's own help from teaching the wrong syntax. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012hZAuHtXHkZN3BPnHqyRQK
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68c26d73df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| + for (const [key, value] of Object.entries(ex.options)) { | ||
| + const flag = `--${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`; |
There was a problem hiding this comment.
Refresh the lockfile after changing the dependency patch
These edits change the patch digest from ae188796… to 01acbccc…, but pnpm-lock.yaml still records the old digest in both patchedDependencies and the incur resolution. Consequently, every build, test, and release job that runs pnpm install --frozen-lockfile (for example, .github/workflows/ci.yml:33-34) will reject the stale lockfile before running any checks. Regenerate and commit the lockfile alongside this patch.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
- Editing patches/incur@0.4.26.patch changes its sha256, which pnpm records in pnpm-lock.yaml (patchedDependencies plus the incur resolution). The lockfile still held the old digest, so every CI job running `pnpm install --frozen-lockfile` rejected it before any check ran. Updated all three references; a frozen install now succeeds and applies the patch. - The pipeline-toggle example omitted `--name`, `--abi`, and `--events`. `contracts update` is a full replace and requires them, so copying the snippet failed with a missing-option error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012hZAuHtXHkZN3BPnHqyRQK
|
Both review points are addressed in
|
Why
incur boolean flags do not consume the following token.
--flag falsesets the flag to true and leavesfalseas a stray positional argument, so every documented example did the opposite of what the reader asked for.Verified against incur's parser:
--include-in-pipeline falsetrue← the documented form--include-in-pipelinetrue--include-in-pipeline=falsefalse--no-include-in-pipelinefalseWhat changed
SKILLS.mdtold readers to exclude a contract from the pipeline withformo contracts update <chain> <address> --include-in-pipeline false, which included it instead. Added a note on both affected flags (--include-in-pipeline,--is-public).--include-in-pipelinedescription. It read "trueby default in the API". The API default is decode-only (false), and after getformo/formono#2251 an omitted field preserves the stored value rather than resetting it.--is-publicon create (defaults to private) and update (omitting preserves the stored value).--helpexamples emit--flag/--flag=falseinstead of--flag false, which stopped the CLI's own help from teaching the wrong syntax. This follows the existing patch precedent in this repo for incur's flag rendering.Related
Companion to getformo/formono#2251, which makes an omitted
include_in_pipelineonPUT /v0/contracts/{chain}/{address}preserve the stored value instead of silently disabling pipeline ingestion.Testing
197 passing, 1 pending, 0 failing. Typecheck and lint clean.Docs-only plus a dependency patch; no source behaviour changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_012hZAuHtXHkZN3BPnHqyRQK
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.