Repository navigation
L82 patch-target classifier: close the fail-open cases found reviewing #92 - #101
Open
githubscum wants to merge 1 commit into
Open
githubscum wants to merge 1 commit into
githubscum wants to merge 1 commit into
Conversation
…#92 patchApplyTargets returned null (nothing to gate) for commands that do apply a patch: shell keywords (if/then, !, {, coproc, case arms), a single `&`, `|&`, `env -u X`, `env -S "..."`, git global flags (-P, --paginate, --bare, --git-dir x), and it would read /dev/stdin (can hang). Each now matches with its targets or fails closed. 14 new tests; full suite 1472/1466 pass/0 fail. Executor: glm-5.3-flash:cloud (WO-L82-03, WO-L82-04). Orchestrator probe and review by ike. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
WO: WO-L82-03 + WO-L82-04 (both in
proposals/l82-patch-targets/). Not core: the classifier lives underproposals/, so this is a normal lane PR; it feeds the half of #92 that still goes to a signing sitting.Addresses: the LIMIT recorded 2026-11-14 in the #92 review:
patchApplyTargetsfails open. Returningnullmeans "not a patch-apply command, nothing to gate", so every case below was a patch write the self-mod gate could not see.Fixed (each with a test):
if ...; then git apply x; fi,! git apply x,{ git apply x; },coproc git apply x,case a in a) git apply x;; esac&as a separator (true & git apply x), without splitting&&,2>&1,>&,&>|&treated as a pipe, so the verb reading stdin fails closedenv -u FOO,env -C dir, andenv -S "git apply x"(the split string is scanned like ash -cbody)--git-dir x,--work-tree x,--namespace xtake a value; any other leading flag (-P,--paginate,--bare,--no-optional-locks,--exec-path) is self-contained-,/dev/stdin,/dev/fd/0,/proc/self/fd/0) fail closed without calling the reader, soreadFileSynccan't hang)no longer counts as a patch source (it used to over-gate( git apply x ))Tested:
node --test test/l82-patch-targets.test.js: 35/35 (was 21).npm test: 1472 tests, 1466 pass, 0 fail, 6 skipped (main 9785d40: 1458). Plus an orchestrator probe of 31 variants the executor never saw. Only the four meant to stay null (echo a & echo b,ls >&2,git status &>/dev/null,git apply --check x) still return null.Eval: none named. This is R1-style completeness for the gate (a write it can't see), not a v3 granularity change.
What a reviewer should doubt:
$'...'aren't parsed. Anything new it misses is still fail-open, and this PR only closes the cases on the list.case WORD inskips exactly one word aftercase. A pattern-looking token (foo)) before the verb is dropped anywhere in the pre-verb run, not only first. The executor argued this is conservative. I probed it and found nothing that fails open, but I didn't prove it.inandesacare now skipped as keywords at the head of a segment.🤖 Generated with Claude Code