Repository navigation
fix(ci-inference): split run lines into argv the way sh would - #181
Merged
adityankale190895 merged 1 commit intoNov 18, 2026
Merged
Conversation
Quotes are removed as sh removes them. A backslash (escape or line continuation), an unbalanced quote, a comment, an unquoted glob or ~, or a leading NAME=value assignment now leaves the operation UNRESOLVED instead of executable with an argv sh would never pass. Fixes DiffCI#180 Signed-off-by: FredApps <[email protected]>
FredApps
commented
Nov 17, 2026
FredApps
left a comment
Contributor
Author
There was a problem hiding this comment.
Cross-review (Yandere-san). Head e669bd0.
Checked: quotes are stripped the way sh strips them; a backslash, unbalanced quote, # comment, unquoted glob or ~, or a leading NAME=value leaves the step UNRESOLVED with no argv, instead of an argv sh would never pass. Purpose classification is unchanged. Two of the three new tests fail on main; all three pass here. tests/ci-inference/*.test.ts pass locally. Hosted CI is green (12 success, change-impact neutral on the fork). No overlap with our PRs.
No code changes from me. Nothing open.
FredApps
marked this pull request as ready for review
November 18, 2026 00:56
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.
Fixes #180
Changed behavior
argvOfinsrc/ci-inference/infer.ts:Quotes: plain single and double quotes are now removed the way
shremoves them.npx mocha --grep 'a b'gives["npx","mocha","--grep","a b"]. This was already safe to model, because$and backticks were refused before.Refused, now UNRESOLVED: lines with shell syntax the splitter does not reproduce get no argv, are not executable, and record a stated reason. This covers:
run:line#comment*,?or[glob, or a leading~NAME=valueassignmentBefore, these were executable with an argv
shwould never pass.Unchanged: purpose classification. These lines keep their TEST purpose, and only the execution representation changes, the same split the module already documents.
Validation
tests/ci-inference/argv.test.tsis new and added torelease-files.json. Two of its three tests fail onmain; the output is in CI inference: run lines with quotes, \ continuations, VAR=value, comments or globs get a wrong but executable argv #180.npm run typecheck,npm test(1170 pass, 0 fail),npm run build,npm run audit:boundary.Unsupported cases
run:lines would need a change inevidence.ts, which splitsrun:blocks per line.