Repository navigation
Conversation
The arguments were joined with spaces, so a --track-notes or --background with spaces could not be told apart from the next option and the line could not be run again. shlex.join, list2cmdline on Windows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Problem and result
Fixes #4494.
run.commandin results.json was the arguments joined with spaces, so a report from--track-notes "Strata 0.2.7 official Linux release, engine 0.1.52. Tuned: ..."reads--track-notes Strata 0.2.7 official Linux release, ... --background headless server; ...(the run in #4468): areader cannot tell where an argument ends, and the line cannot be run again.
After: the arguments are quoted as a shell takes them back,
shlex.joinon POSIX andsubprocess.list2cmdlineon Windows, before the existing redaction.
Related discussion
#4494
Approach
Two lines in
strata_cli/cli.py(bench run) and animport shlex. Redaction still runs on the joinedstring, so a quoted home path is replaced as before.
Validation
Passed:
python3.12 -m unittest tests.terminal.test_bench_standard tests.terminal.test_bench: Ran 93 tests in 65.229s, OK (1 skipped).Strata Control 0.1.52's bundled Python 3.12.15, Ubuntu 26.10, this branch (main 46c152a + this commit).
CommandLineTests.test_the_options_reach_the_report(asserts--track-notes '0.2.0 release, setup choices'inrun.command) against main'scli.py(production file stashed, test kept): Ran 1 test in 0.892s FAILED (failures=1)Failed:
Not run:
list2cmdlinebranch; the test expects double quotes there).Limits
bench report.🤖 Generated with Claude Code