Skip to content

docs(cli): correct boolean flag syntax and pipeline defaults - #48

Merged
yosriady merged 2 commits into
mainfrom
fix/cli-boolean-flag-docs
Aug 25, 2026
Merged

docs(cli): correct boolean flag syntax and pipeline defaults#48
yosriady merged 2 commits into
mainfrom
fix/cli-boolean-flag-docs

Conversation

@yosriady

@yosriady yosriady commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Why

incur boolean flags do not consume the following token. --flag false sets the flag to true and leaves false as a stray positional argument, so every documented example did the opposite of what the reader asked for.

Verified against incur's parser:

Written Parsed
--include-in-pipeline false true ← the documented form
--include-in-pipeline true
--include-in-pipeline=false false
--no-include-in-pipeline false

What changed

  • Fixed the broken example. SKILLS.md told readers to exclude a contract from the pipeline with formo contracts update <chain> <address> --include-in-pipeline false, which included it instead. Added a note on both affected flags (--include-in-pipeline, --is-public).
  • Corrected the --include-in-pipeline description. It read "true by 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.
  • Clarified --is-public on create (defaults to private) and update (omitting preserves the stored value).
  • Extended the incur patch so rendered --help examples emit --flag / --flag=false instead 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_pipeline on PUT /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


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +11 to +12
+ for (const [key, value] of Object.entries(ex.options)) {
+ const flag = `--${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread SKILLS.md Outdated
- 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
@yosriady

Copy link
Copy Markdown
Contributor Author

Both review points are addressed in 6c8ae62. CI is green.

  • P1, lockfile digest. Correct — editing the patch changes its sha256, and pnpm-lock.yaml still held ae188796… in patchedDependencies, the importer entry, and the incur resolution, so every pnpm install --frozen-lockfile job rejected it before running. Updated all three to 01acbccc…. Verified locally: pnpm install --frozen-lockfile now succeeds and applies the patch (pnpm re-hashes the file, so a wrong digest would fail).
  • P2, incomplete example. Correct — contracts update is a full replace and requires --name, --abi, and --events. The snippet now includes them, with a line saying why.

197 passing, 1 pending, 0 failing; lint and typecheck clean.

@yosriady
yosriady merged commit 0f192fe into main Aug 25, 2026
9 checks passed
@yosriady
yosriady deleted the fix/cli-boolean-flag-docs branch August 25, 2026 05:54
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