NVIDIA / NVIDIA/TensorRT-Model-Connect
[Refactor] Render E2E reproduction commands with shlex.join
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 254
- Forks
- 58
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 235
Description
Parent
Inspired by #963: use an existing standard-library implementation rather than maintaining partial quoting logic.
What to build
Make E2E reproduction-command providers return raw argv values consistently, then render a copy-pasteable shell command exactly once with shlex.join at the final presentation seam. Remove the harness's handwritten shell quote implementation and the model-owned pass-through wrappers that only duplicate shlex.quote behavior.
The current interface mixes raw tokens and pre-quoted tokens, and some final commands use a plain space join. Prompts containing spaces can therefore be rendered as different argv when copied back into a shell.
Acceptance criteria
- Every reproduction-command provider returns raw argv tokens with no pre-quoting.
- Human-readable commands are rendered once with
shlex.join. - The handwritten harness quote implementation and shallow pass-through quote wrappers are removed.
- Round-trip tests cover spaces, empty tokens, single quotes, dollar signs, backslashes, and newlines.
- Existing model-owned command selection remains model-local and the rendered commands reconstruct the original argv exactly.
Blocked by
None - can start immediately.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the E2E reproduction-command providers, the harness's handwritten quote implementation, the model-owned pass-through wrappers, and the final command presentation seam. Trace where raw argv and pre-quoted tokens are mixed, then use the round-trip tests to verify spaces, empty tokens, quotes, dollar signs, backslashes, and newlines reconstruct the original argv exactly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100