Skip to content

fix: include force flags in generated command metadata - #497

Merged
petebacondarwin merged 2 commits into
mainfrom
codex/fix-force-option-metadata
Nov 3, 2026
Merged

petebacondarwin merged 2 commits into
mainfrom
codex/fix-force-option-metadata

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Generated destructive commands accept --force / -f, but their commands.json metadata omits the option, so cf complete cannot suggest the confirmation bypass.

Share the confirmation rule across runtime emission, telemetry aliases, and metadata, then regenerate the 450 affected command entries. Add regression coverage for DELETE operations, confirmation-annotated POST/PUT/PATCH operations, ordinary commands, and empty annotations. Update the flag ownership guard to recognize cf's emitted --force option while retaining API-field collision and duplicate detection. Include a patch changeset and remove the resolved gap from the CLI instructions.

Addresses the generator issue identified in #477 (comment).

Validation:

  • pnpm --filter cf test: full CLI suite passed (2,353 tests passed, six skipped), including the generator, completion, and flag ownership tests.
  • Root pnpm check: passed.
  • CLI completion smoke check: accounts delete --f suggests --force; accounts list --f does not.
  • Compared every regenerated command entry: only the 450 force options were added, with no other metadata changes or runtime/metadata flag mismatches.

@petebacondarwin
petebacondarwin requested a review from a team as a code owner November 3, 2026 15:29
@petebacondarwin
petebacondarwin requested a review from cjol November 3, 2026 15:29
@pkg-pr-new

pkg-pr-new Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/cf@497

commit: b12903e

@ask-bonk

ask-bonk Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@clanky-the-clanker clanky-the-clanker 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.

Superseded by the review of b12903ec.

This review, of 2b19fdcb

✅ Approved — The confirmation rule is now shared correctly across runtime emission, telemetry and metadata, with regression tests; no issues found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

Risk: Low. The patch changeset is appropriate for this fix.


🔒 Security: ✅ LGTM

No security issues found.


📖 AGENTS.md: ✅ LGTM

No issues found.


📋 Code Quality: ✅ LGTM

No issues found.


⚡ Performance: ✅ LGTM

These are build-time generator changes plus static metadata, so nothing here affects performance.


📝 Documentation: ✅ LGTM

No issues found.


Reviewed commit: 2b19fdcb

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

cf --help startup

mean stddev min max
PR 230.4 ms 3.2 ms 224.9 ms 236.0 ms
base 234.0 ms 7.1 ms 226.1 ms 256.9 ms

Δ (PR vs base): ↓ -3.5 ms (-1.5%)

Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.

@clanky-the-clanker clanky-the-clanker 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.

✅ Approved — No issues found. The test-guard update keeps duplicate and API-field collision detection, and the shared confirmation rule is applied the same way to runtime, telemetry and metadata.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

Risk: Low. A patch changeset fits this fix.


🔒 Security: ✅ LGTM

No security issues found. Destructive commands still accept only --force / -f to skip confirmation.


📖 AGENTS.md: ✅ LGTM

Removing the resolved gap from packages/cli/AGENTS.md is accurate.


📋 Code Quality: ✅ LGTM

requiresConfirmation is now the single rule used by the builder, telemetry aliases and metadata. This removes the old disagreement over an empty requireConfirmation annotation. The CF_EMITTED update in the flag-name test still catches duplicate --force options and API fields named force or f.


⚡ Performance: ✅ LGTM

These are build-time generator changes plus static metadata, so nothing here affects performance.


📝 Documentation: ✅ LGTM

No issues found.


Reviewed commit: b12903ec

@ask-bonk

ask-bonk Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@petebacondarwin
petebacondarwin added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 775a37f Nov 3, 2026
12 checks passed
@petebacondarwin
petebacondarwin deleted the codex/fix-force-option-metadata branch November 3, 2026 16:31
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.

2 participants