NVIDIA / NVIDIA/TensorRT-Model-Connect

[Refactor] Render E2E reproduction commands with shlex.join

Open
#976 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.