Repository navigation
fix(cli): keep every positional argument; show plain-text help descriptions - #25
Merged
Merged
Conversation
…ptions Cli.Run wrote each positional to the same "_arg" key, so only the last one survived: `export 1234 fight.json` lost the 1234. Positionals now keep their order in "_args" (read with the new Options.Args), and "_arg" is the first, which is what every single-argument caller in the estate already expects. docs/commands.md already promised repeated arguments; the code now matches. PrintHelp treated a hand-written Description as an i18n key, found no translation and printed the bare path. An untranslated Description now shows as written; a translator still wins, and path-derived keys still print the path alone. Checked against the heaviest "_arg" users: agent and cli tests pass with this core (agent's 6 QA/dispatch tests fail under any go.work, with or without the change, because GOWORK leaks into the repos they spawn). Co-Authored-By: Virgil <virgil@lethean.io>
Contributor
|
Caution Review failedThe pull request is closed.
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…he AX-7 guard The naming guard matches Test<File>_<Type>_<Method>_<Variant>; the short names left Options_Args counted as untested. The guard is back to main's baseline (29 gaps, none from this branch). Co-Authored-By: Virgil <virgil@lethean.io>
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.
Two bugs found while building GrootDPS's terminal commands on
core.Cli.1. Positional arguments overwrote each other.
Cli.Runset every non-flag argument to the same_argkey, so only the last survived (export 1234 fight.json→_arg = "fight.json", the 1234 gone)._argsnow holds every positional in order; read it with the newOptions.Args()._argis the first positional. Every estate caller (agent, cli, go-build, go-crypt, go-scm, …) reads_argas "the argument", so single-argument commands are unchanged.docs/commands.mdalready said "repeated_argoptions"; the docs now describe the real shape.2. Help never showed a hand-written
Description.PrintHelptreated it as an i18n key, found no translation, and printed only the path. An untranslatedDescriptionnow shows as written. A translator still wins, and path-derived keys still print the path alone.Tests:
TestOptions_Args_{Good,Bad,Ugly},ExampleOptions_Args,TestCli_Cli_PrintHelpDescription_{Good,Ugly},TestCli_Cli_RunPositionals_Good.go test,go vetandgofmtare clean.Estate check: agent and cli pass their tests against this branch, through a temporary go.work in a scratch directory (not committed anywhere). The exceptions are 6 agent QA/dispatch tests, which fail the same way without this change under any go.work, because GOWORK leaks into the repos those tests spawn.
core/go is written under review: not merged, waiting for Snider.
🤖 Generated with Claude Code
Co-Authored-By: Virgil virgil@lethean.io