Repository navigation
KNOWN-LIMITS 82 half one: patch-target classifier (proposal for a CORE sitting patch) - #92
Merged
Merged
Conversation
patchApplyTargets finds git apply / git am / patch (behind env assignments, wrappers and sh -c re-entry), reads the patch, returns its write targets, and fails closed when the source cannot be read. Nothing under the core directories changes; the README holds the half-two integration plan. Written by glm-5.3-flash (WO-L82-01, WO-L82-02), probed 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-01 + WO-L82-02 (lane run 78). Addresses: KNOWN-LIMITS 82 (patch-file laundering past the self-mod gate), sitting queue Item E. Half one of two.
Nothing under the core directories changes in this PR. It adds:
proposals/l82-patch-targets/patch-apply.js:patchApplyTargets(cmd, cwd, readFile). It findsgit apply/git am/patchin any segment, including behind env assignments, wrappers (sudo, env, command, exec, nohup, time, nice, xargs) andsh|bash|pwsh -c|-Commandre-entry. It reads the patch and returns its write targets, and fails closed when the source can't be read (missing file, stdin, pipe,<(...),$(...), backticks, xargs). Heredoc patches are parsed inline. Browse-only forms (--check,--stat,am --abort, ...) return null.test/l82-patch-targets.test.js: 21 cases.proposals/l82-patch-targets/README.md: the half-two integration plan (generated patch into the policy module, stamp coverage includingfirstBraceGroup/matchableCommand, cwd plumbing, rehearsal test) and the doubts.Executor: glm-5.3-flash:cloud for both WOs. Receipt read: the executor transcripts show only
glm-5.3-flash(49 and 73 turns). ike wrote the WOs, the README and the probe, and no code.Tested:
node --test test/l82-patch-targets.test.js: 21/21.git.exe,--no-pager,-c k=v,-R,--include=, subshell parens,$(...)/backtick/pipe fail-closed, wrappers, nestedbash -c 'cd w; git apply x', negatives likenpm version patch,git add -p,sudo ls): 34/34.npm test: 1400 tests, 1395 pass, 0 fail.Eval: none of E1-E6 applies (this is gate trust, not v3 granularity).
What a reviewer should doubt:
doas,stdbuf,timeout,chronic,git -c alias.x='!git apply' x, and git aliases generally.cd src; patch -p1 < x.diffwithb/chain/...targets) is not closed. Same pre-existing weakness as the rest of the matcher.No new KNOWN-LIMITS entry. Limit 82's text stays "not staged" until half two lands.
🤖 Generated with Claude Code