From 000b48925dbe5c1f4a1fbb1f357b24abf7e1d6aa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:49:17 +0000 Subject: [PATCH 1/3] Initial plan From cdea32bad878121ab9ea3e1215eb45b6b69941ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:57:15 +0000 Subject: [PATCH 2/3] Improve error messages when flag values are mistaken for mission names When an unknown mission name looks like a common flag value (e.g., 'true', 'false', a number), or a command-line option (starts with '-'), provide a more helpful error message suggesting the user may have passed an argument to a flag that doesn't accept one. Agent-Logs-Url: https://github.com/stellar/supercluster/sessions/599c78dd-f2a6-4294-bdb3-3c150c3c027a Co-authored-by: marta-lokhova <9428003+marta-lokhova@users.noreply.github.com> --- src/App/Program.fs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/App/Program.fs b/src/App/Program.fs index e8fb0560..c55720a4 100644 --- a/src/App/Program.fs +++ b/src/App/Program.fs @@ -754,9 +754,26 @@ let main argv = { LogDebugPartitions = List.ofSeq mission.LogDebugPartitions LogTracePartitions = List.ofSeq mission.LogTracePartitions } + let looksLikeFlagValue (s: string) = + match s.ToLowerInvariant() with + | "true" | "false" -> true + | _ -> + let (isNum, _) = System.Double.TryParse(s) + isNum + match Seq.tryFind (allMissions.ContainsKey >> not) mission.Missions with | Some e -> (LogError "Unknown mission: %s" e + + if looksLikeFlagValue e then + LogError + "Note: '%s' looks like a value for a command-line flag rather than a mission name. You may have passed an argument to a flag that doesn't accept one (e.g. --flag=false instead of --flag)." + e + elif e.StartsWith("-") then + LogError + "Note: '%s' looks like a command-line option rather than a mission name. You may have a typo in the option name, or used an option not supported by the 'mission' verb." + e + LogError "Available missions:" Map.iter (fun k _ -> LogError " %s" k) allMissions 1) From 2a1cb7d5fed30b0c8135b1a7627def0e43bf09c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:58:08 +0000 Subject: [PATCH 3/3] Address code review feedback: rename variable and use specific example in error message Agent-Logs-Url: https://github.com/stellar/supercluster/sessions/599c78dd-f2a6-4294-bdb3-3c150c3c027a Co-authored-by: marta-lokhova <9428003+marta-lokhova@users.noreply.github.com> --- src/App/Program.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App/Program.fs b/src/App/Program.fs index c55720a4..3ffad782 100644 --- a/src/App/Program.fs +++ b/src/App/Program.fs @@ -758,8 +758,8 @@ let main argv = match s.ToLowerInvariant() with | "true" | "false" -> true | _ -> - let (isNum, _) = System.Double.TryParse(s) - isNum + let (isNumeric, _) = System.Double.TryParse(s) + isNumeric match Seq.tryFind (allMissions.ContainsKey >> not) mission.Missions with | Some e -> @@ -767,7 +767,7 @@ let main argv = if looksLikeFlagValue e then LogError - "Note: '%s' looks like a value for a command-line flag rather than a mission name. You may have passed an argument to a flag that doesn't accept one (e.g. --flag=false instead of --flag)." + "Note: '%s' looks like a value for a command-line flag rather than a mission name. You may have passed an argument to a flag that doesn't accept one (e.g. --catchup-skip-known-results-for-testing=false instead of --catchup-skip-known-results-for-testing)." e elif e.StartsWith("-") then LogError