Improve error messages when flag values are mistaken for mission names#374
Draft
Improve error messages when flag values are mistaken for mission names#374
Conversation
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>
…e 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>
Copilot
AI
changed the title
[WIP] Improve error messages around improperly passed arguments
Improve error messages when flag values are mistaken for mission names
Apr 16, 2026
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.
Passing an argument to a boolean flag (e.g.
--catchup-skip-known-results-for-testing=false) causes the parser to treat the value as a positional arg, producing the unhelpful errorUnknown mission: false.Added contextual hints to the unknown mission error when the value looks like it was misrouted from a flag:
true/falseor numeric, suggest the user may have passed a value to a flag that doesn't accept one-, suggest a possible typo or unsupported optionThe existing "Available missions" list still prints in all cases.