Repository navigation
Leave refused container flags out of move and copy help - #985
Merged
Merged
Conversation
A move or copy command refuses a container flag it inherits but never reads, yet its help still listed the flag: messages copy --help offered --message-board as "required if project has multiple", and following it failed with "does not read --message-board". 28 such flags showed across 20 commands. Help now skips any parent-scoped flag the guard refuses, decided by the same FilingIgnores rule, so the two cannot drift. The refusal's hint also says to drop the flag, not only how to name another destination.
Contributor
There was a problem hiding this comment.
🟢 Approved
No active review issues are reported for the help-text and refused-flag updates.
No open issues 🎉
What changed in this PR
Aligns move and copy help with the container flags those commands actually accept, while preserving flag parsing and usage-error behavior.
Changes:
- Shares
FilingIgnoresbetween the refusal guard and text/agent help. - Clarifies refusal hints to tell users to drop the unsupported flag.
- Adds regression coverage verifying that help hides refused flags and retains supported ones.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
| internal/commands/filing.go | Centralizes refused-flag detection and clarifies recovery hints. |
| internal/commands/filing_guard_test.go | Tests help visibility for inherited container flags. |
| internal/cli/help.go | Omits refused container flags from shared help output. |
Review effort: Balanced
The surface diff reads agent help, so flags help no longer offers show as removals. Each was already refused as a usage error since v0.20.0.
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
October 28, 2026 13:14
* origin/main: Bump golang.org/x/net to v0.62.0 (#986)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A move or copy command refuses a container flag it inherits but doesn't read. Since v0.20.0, that refusal is a usage error. But help still listed those flags.
messages copy --helpoffered--message-boardas "required if project has multiple", and following it failed with "does not read --message-board". The new test found 28 such flags across 20 commands, for example--message-board,--schedule,--questionnaire,--card-tableon copy, and--vault/--folderon docs, uploads and folders.Change
FilingIgnores(internal/commands/filing.go) is now the one rule for "this command refuses this inherited flag". The guard and help (parentScopedFlagsininternal/cli/help.go, used by both text help and--agenthelp) both read it.--to-*destination..surfacedoesn't change. The flags still parse, so they can be refused.Evidence
TestFilingCommandHelpOffersOnlyTheContainerFlagsItReadsrenders help for every guarded command. It checks that refused flags are absent and flags the command reads (e.g.cards move --card-table) are present. It fails on main with 28 offers and passes here.bin/cipasses locally.Summary by cubic
Fixes move and copy help so it no longer offers container flags the command refuses.
Since v0.20.0,
messages copy --message-board(and 27 similar flags across 20 commands) failed with a usage error, but--helpstill listed the flag as usable.FilingIgnores), so the two cannot drift.Written for commit fc4748c. Summary will update on new commits.