diff --git a/packages/mosaic/framework/tools/git/test-wrapper-guard.sh b/packages/mosaic/framework/tools/git/test-wrapper-guard.sh index a280e41a..abe0750a 100755 --- a/packages/mosaic/framework/tools/git/test-wrapper-guard.sh +++ b/packages/mosaic/framework/tools/git/test-wrapper-guard.sh @@ -337,6 +337,23 @@ FIXTURES="$TMP/fixtures.tsv" printf '2\t{"tool_input":{"command":"g\\"h\\" api -X POST repos/a/b/$EP -f title=x"}}\tand so is a quoted one, which is where the two halves disagreed\n' printf '0\t{"tool_input":{"command":"mygh api -X POST repos/a/b/$EP -f title=x"}}\tmygh is still not gh, in the refinement as well as the gate\n' + # Shapes nobody raised. Written down because reasoning that they were already + # covered is precisely what produced two of the rounds above; each one below + # was measured, and the three that fail at df83a9ee are here on that evidence. + # `\curl` is the ordinary way to bypass a shell alias and is a thing people + # actually type, which makes it the least hypothetical entry in the file. + printf '2\t{"tool_input":{"command":"\\\\curl --config /tmp/provider-write.cfg"}}\tescaping the leading character to dodge an alias still names curl\t--config/-K\n' + printf '2\t{"tool_input":{"command":"cur\\"l\\" --config /tmp/provider-write.cfg"}}\tthe quote may sit at any offset in the word\t--config/-K\n' + printf '2\t{"tool_input":{"command":"g\\"h\\" api -X POST \\"repos/a/b/$EP\\" -f title=x"}}\tboth halves dressed at once, which is where they last disagreed\n' + + # Over-blocking is a real failure and not a safe direction: a guard that + # refuses legitimate work gets routed around instead of repaired. These four + # pass at both heads, which is what a regression guard is for. + printf '0\t{"tool_input":{"command":"gh api \\"repos/a/b/issues\\""}}\ta quoted read is still a read\n' + printf '0\t{"tool_input":{"command":"curl https://example.com/file.txt -o /tmp/f"}}\tan ordinary download is not a provider write\n' + printf '0\t{"tool_input":{"command":"echo \\"$EP\\" && gh --version"}}\tno api subcommand, so nothing to refuse\n' + printf '0\t{"tool_input":{"command":"echo \\"not a curl call\\""}}\tthe word inside a string, with no flag, is prose\n' + # Percent-encoded endpoints. Not hypothetical: /issues/1174 and /iss%%75es/1174 # both returned HTTP 200 with the same object from the live forge, so the # encoded spelling IS the wrapped endpoint and the literal comparison below it