Repository navigation
fix(cli): hide the internal run worker from lab usage - #1172
Merged
Merged
Conversation
Collaborator
Author
|
Self-review (Birfy) Tip SHA: 594b177
|
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.
Closes #1171
What changed
After #1169,
labmounts every verb, including the internalrunworker thatevolve --detachspawns. Help already omitted its line, and_visible_choicesalready stripped it fromchoose from, but thelabsubparsers left argparse's default metavar, soagentdescent lab --helpand the usage line on alabargparse error (plain and--json) listedrunin the braces.build_parsernow sets that metavar from the public choices, the same #420 contract as the top-level usage line.agentdescent lab run --run-dir …still parses.agentdescent/cli.py: setlab_sub.metavarfrom choices minus_INTERNAL_COMMANDS.tests/test_cli_help_hides_internal_run.py: pin help/usage, a typo error, the--jsonenvelope, and thatlab runstill parses.changelog.d/1171-lab-hides-internal-run.md.No other verb's arguments, output, or exit code change.
Verification
Tip SHA: 594b177
Red first, at
origin/main367d140fwith only the new tests:FAILED test_lab_help_and_usage_do_not_list_run—runin the bracesFAILED test_lab_every_listed_verb_has_a_help_line—runhas no help lineFAILED test_lab_unknown_verb_error_does_not_list_run— usage onlab xyzlistsrunFAILED test_lab_unknown_verb_json_hides_run—--jsonusagelistsruntest_lab_run_still_parsespassed (already reachable)Ran:
pytest -q tests/test_cli_help_hides_internal_run.py tests/test_cli_lab_grouping.py→ 128 passedpython -m tools.changelog_fragments check→ 83 changelog fragment(s) OKagentdescent lab --helpusage braces start{demo,init,plan,evolve,status,watch,...}(norun)agentdescent --json lab xyz—"run"is not inerrororusageNot run:
labusage metavar plus tests that pin cli:agentdescent --helpprintsrun ==SUPPRESS==and advertises the internalrunworker in usage #420; the CI test matrix is the linepython -m tools.gen_api_docs --check— no public API docstring changeNo UI surface: terminal help and argparse error text only.