fix(incident): rename --channel to --channel-id on incident list#43
Merged
ysyneu merged 2 commits intoJun 15, 2026
Merged
Conversation
`incident list` only accepted --channel, but every sibling channel command (channel info --channel-id, channel escalate-rule-list --channel-id, ...) uses --channel-id. An ai-sre agent that transferred the flag name across commands ran `incident list --channel-id <id>` and got "unknown flag", wasting a turn. Make --channel-id the canonical flag (matching the siblings) and keep --channel as a deprecated alias bound to the same variable so existing callers keep working. Add tests asserting both flags forward to /incident/list as channel_ids.
`incident list` used --channel while every sibling channel command uses --channel-id (channel info --channel-id, channel escalate-rule-list --channel-id, ...). Rename the flag to --channel-id for consistency. --channel is removed (not aliased); only --channel-id exists.
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
fduty incident listused--channel, but every sibling channel command uses--channel-id(e.g.channel info --channel-id,channel escalate-rule-list --channel-id). This renames the flag to--channel-idfor consistency.--channelis removed, not aliased — only--channel-idexists onincident list. It filters by channel id and forwards to/incident/listaschannel_ids.Root cause
From prod audit run audit-2026-06-15 (session
sess_KtAQ9DLCeiEXVbnTYcfGzw, step 25): an ai-sre agent ranfduty incident list --channel-id <id>and gotunknown flag: --channel-id; the working flag was the inconsistently-named--channel. Agents transfer flag knowledge across command groups, so a name that disagrees with the siblingchannelcommands forces a wasted trial-and-error turn. Precedent: cli PR #41 (incident-list flag doc-vs-code drift) and PR #42 (member list --limitconsistency).Verification