Retire the curl-style @file/@- sigil on finish --summary; keep --summary-file #794
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#794
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
finish --summaryreads a summary from a file two ways today, and the curl-style@sigil is the redundant one. I am dropping it and keeping the gh-style--summary-file <path>, with--summary-file -for stdin, as the one file form on the CLI. That matches--body-fileonprandissue, and it matches gh.Why
finishreads a summary from a file two ways today:--summary @fileand--summary @-: the curl sigil (internal/cmd/workflow/finish.go:139, expanded atfinish.go:208-227).--summary-file <path>and--summary-file -: a plain file flag (finish.go:140,finish.go:231-244).--summary-filealready does the same job on the same command, so the@sigil is redundant. The@form is a curl idiom (curl -d @file,-F field=@file). madtea already uses it in the one place it fits: the rawapipassthrough (internal/service/api/body.go,-F key=@file). For a first-class text flag the convention is a dedicated--*-fileflag, whichprandissue(--body-file) andfinish(--summary-file) already follow. Sofinish --summary @fileis the only spot that puts the sigil on a first-class flag that has a gh-style twin.Change
--summaryno longer reads a file. A--summaryvalue that would have been read as a file fails loud with a redirect to--summary-file, in the actionable-redirect style of the removed--all/-Astaging flags (finishRemovedStagingFlagHint,finish.go:169). The error names--summary-file <path>and--summary-file -for stdin, and it never changes behavior silently.--summary-fileand its-stdin form are unchanged.@fileand@-text leaves the--summaryflag help (finish.go:139) and the help examples (finish.go:131-132).This is CLI-only. The MCP surface already refuses a file sigil (#792). Removing the sigil on the CLI surface too leaves one rule: a
--*-fileflag for first-class commands, and@only in the rawapipassthrough.Edge
Today
--summaryreads any value that starts with@as a file, so a summary that starts with@, such as@reviewer please look, is already read wrong. The redirect error replaces that, and a summary that really starts with@goes through--summary-fileor stdin.Breaking
Removing a flag behavior is a breaking change, so it waits for the next breaking release and the release notes name it. Update
docs/COMPARISON.md, the gh/tea matrix, anddocs/COMPAT.mdif a caveat applies.Acceptance
finish --summary @summary.mdno longer reads the file; it errors and the message names--summary-file. A test covers the error and the redirect text.finish --summary @-errors with the same redirect, naming--summary-file -.finish --summary-file summary.mdandfinish --summary-file -still read the file and stdin.--summaryhelp and the finish examples no longer mention@fileor@-.docs/COMPARISON.mdreflects the removed flag form.