[PR #4513] [CLOSED] [Benchmark] run.command is shell-quoted, so a reader can paste it back (#4494) #5073

Closed
opened 2026-11-07 16:32:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4513
Author: @ctr-137
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: bench-redaction-4494


📝 Commits (1)

  • 9040c7b bench: run.command is shell-quoted, so a reader can paste it back (#4494)

📊 Changes

2 files changed (+12 additions, -1 deletions)

View changed files

📝 strata_cli/cli.py (+3 -1)
📝 tests/terminal/test_bench_standard.py (+9 -0)

📄 Description

Fixes #4494.

Problem

run.command in results.json was built as "strata " + " ".join(...). An argument like --track-notes Tuned: both cards, production therefore lost its boundary, and a reader could not tell where one argument ended nor paste the command back into a shell.

Result

strata_cli/cli.py now joins the argv list with shlex.join on POSIX and subprocess.list2cmdline on Windows, so the resulting run.command is shell-quoting faithful. A regression test (test_run_command_can_be_pasted_back_into_a_shell) checks that a --track-notes value containing spaces stays quoted and the command still starts with strata bench run.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4513 **Author:** [@ctr-137](https://github.com/ctr-137) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `bench-redaction-4494` --- ### 📝 Commits (1) - [`9040c7b`](https://github.com/Niko1221/Strata/commit/9040c7bcf857e4a18448f16ba484514df3641886) bench: run.command is shell-quoted, so a reader can paste it back (#4494) ### 📊 Changes **2 files changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `strata_cli/cli.py` (+3 -1) 📝 `tests/terminal/test_bench_standard.py` (+9 -0) </details> ### 📄 Description Fixes #4494. ## Problem `run.command` in `results.json` was built as `"strata " + " ".join(...)`. An argument like `--track-notes Tuned: both cards, production` therefore lost its boundary, and a reader could not tell where one argument ended nor paste the command back into a shell. ## Result `strata_cli/cli.py` now joins the argv list with `shlex.join` on POSIX and `subprocess.list2cmdline` on Windows, so the resulting `run.command` is shell-quoting faithful. A regression test (`test_run_command_can_be_pasted_back_into_a_shell`) checks that a `--track-notes` value containing spaces stays quoted and the command still starts with `strata bench run`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:32:29 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5073
No description provided.