-
Notifications
You must be signed in to change notification settings - Fork 6
fix(OPENFRAM-004): CU-86akbhhau 3 review findings across 2 files #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,19 +58,19 @@ Examples: | |
|
|
||
| // runUpgradeCommand dispatches to change-ref (Mode 1) or force-sync (Mode 2). | ||
| func runUpgradeCommand(cmd *cobra.Command, args []string) error { | ||
| verbose := getVerboseFlag(cmd) | ||
| flags, err := extractInstallFlags(cmd) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ extractInstallFlags error in runUpgradeCommand not wrapped by HandleGlobalError In π€ Prompt for AI agentsfix confidence: π‘ 85 medium β react π/π to teach the reviewer |
||
| if err != nil { | ||
| return err | ||
| return sharedErrors.HandleGlobalError(err, verbose) | ||
| } | ||
| verbose := getVerboseFlag(cmd) | ||
| sync, _ := cmd.Flags().GetBool("sync") | ||
| refChanged := cmd.Flags().Changed("ref") | ||
|
|
||
| // The modes are mutually exclusive. Silently preferring --sync used to | ||
| // force-sync the CURRENT ref and discard an explicit --ref β the user | ||
| // believed they had deployed the new version (audit F5/T1-9). | ||
| if refChanged && sync { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ runUpgradeCommand mutually-exclusive flag error returned without HandleGlobalError/AlreadyHandledError wrapping In π€ Prompt for AI agentsfix confidence: π’ 90 high β react π/π to teach the reviewer |
||
| return fmt.Errorf("--ref and --sync are mutually exclusive: --ref deploys a new ref (Mode 1), --sync re-syncs the current ref (Mode 2); drop one of them") | ||
| return sharedErrors.HandleGlobalError(fmt.Errorf("--ref and --sync are mutually exclusive: --ref deploys a new ref (Mode 1), --sync re-syncs the current ref (Mode 2); drop one of them"), verbose) | ||
| } | ||
|
|
||
| if upgradeIsChangeRef(refChanged, sync) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
𦩠π΄ runStatusCommand returns unwrapped fmt.Errorf without AlreadyHandledError sentinel for the --watch/--output conflict
In
runStatusCommand(cmd/app/status.go), both the--watch/--outputconflict error and the adjacent--watch/--interactive need an interactive terminalerror are now routed throughsharedErrors.HandleGlobalError(..., verbose)instead of being returned as rawfmt.Errorfvalues, matching the pattern used by every other error path in the function so main's double-print suppression via the AlreadyHandledError sentinel works consistently. I also fixed the second (previously unmentioned but identically-shaped) terminal-interactivity error for consistency, since leaving it unwrapped would reintroduce the same bug the finding describes.π€ Prompt for AI agents
fix confidence: π‘ 85 medium β react π/π to teach the reviewer