Validate quoted shell test commands without false path rejections - #765
Open
wwind123 wants to merge 1 commit into
Open
Validate quoted shell test commands without false path rejections#765wwind123 wants to merge 1 commit into
wwind123 wants to merge 1 commit into
Conversation
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.
Summary
Validate explicit quoted shell command strings as commands, rather than treating the whole string as one filesystem path.
Reproduction
The historical llm-dialectic #1136 / PR #1137 run pushed its implementation and then failed test-report validation on:
bash -lc '/home/wwind123/llm-dialectic/.venv/bin/pytest tests/test_grafana_dashboards.py tests/test_production_topology_artifacts.py -q'Reproduced against current main
4b46054, importing the guard explicitly from this checkout withPYTHONPATH=src. The error names the entire quoted command, including test arguments, as an outside-checkout path. The external virtualenv executable should retain the existing interpreter exemption, while test paths and working-directory changes must still be checked independently.Related to #493. This does not close that broader environment-prose issue or change #762's chained managed-wrapper contract.
Changes
sh,bash, andzshcommand strings using-cand a conservative set of no-operand option combinations such as-lc.This validates reported command text. It neither executes shell strings nor evaluates substitutions nor supplies a shell sandbox. No live service tests or provider calls are involved.
Validation
PYTHONPATH=srcand isolated writable runtime-lock storage.env PYTHONPATH=src XDG_RUNTIME_DIR=/tmp/quoted-shell-test-runtime python3 -m pytest tests/ -q --tb=short. Existing tests require user-cache log writes, so the full suite ran with that permission.git diff --check: passed./run/user/1001. WithXDG_RUNTIME_DIR=/tmp/quoted-shell-test-runtime, all focused tests passed; no live locks were removed or runtime-lock implementation changed.-- OpenAI Codex