Repository navigation
fix: quote describe() argv, isolate rm -rf test jail, unique job ids - #125
Merged
Merged
Conversation
…120) Three cora full-scan MAJORs on the command surfaces: - run_command describe() re-quotes tokens containing whitespace, quotes, or shell metacharacters (embedded quotes widen to '\'' ): approval prompts now preserve token boundaries — 'printf a b' (one arg) renders differently from 'printf a b' (two args). - benign_commands test EXECUTES 'rm -rf ./build' against the SHARED temp dir; now each run gets an isolated scratch jail with its own build/ dir (peer tests' files can no longer be deleted). - job_start ids gain a process-wide AtomicU64 counter segment (j-<ms>-<pid>-<n>): two starts in the same millisecond can no longer collide on the same id. Unit tests: ambiguous-argv rendering matrix, id uniqueness covered by the counter; full suites + clippy -D warnings green.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What (description of the change)
Three cora full-scan MAJORs on the command surfaces, one PR:
describe()re-quotes ambiguous tokens (feat(core): state machine legality + effect sandwich (E2) #16): tokens with whitespace/quotes/metacharacters render single-quoted (embedded'widened to'\''), so approval prompts show true token boundaries —printf 'a b'(one arg) renders differently fromprintf a b(two args);echo a;bcan no longer masquerade as two harmless tokens.benign_commands_with_destructive_looking_args_passactually EXECUTESrm -rf ./build; it now runs against a per-test scratch jail (with its ownbuild/dir and fixture files) instead of the shared temp dir, and cleans up after itself.new_job_id()gains a process-wideAtomicU64counter segment —j-<ms>-<pid>-<n>— so twojob_startcalls within the same millisecond can never collide.Why (the problem you're solving)
Closes #120. #16 is an approval-surface integrity issue (the human must see exact token boundaries to approve knowingly); #18 is a test-isolation defect that can delete peer tests' fixtures mid-run; #34 breaks job bookkeeping (two jobs, one id → poll/log confusion).
Testing (how you verified this works)
describe_shows_exact_argvupdated + newdescribe_quotes_ambiguous_tokens: one-arg-with-space vs two-args render differently; embedded quotes widen; metacharacters quoted.rm -rf ./buildinside its own scratch dir and passes; full workspace suites green; mobile (--no-default-features) green; clippy-D warningsclean; cora review: No issues found.