Build the initial PatchSlim CLI - #1
Merged
Merged
Conversation
Repeat protected-base checks, preserve rename protection, and validate configuration and report inputs. Add release documentation, package smoke coverage, and a Node 20/22/24 CI matrix.
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.
Why
Large refactors and experimental changes often contain files or hunks that are
not required for the behavior a pull request is meant to deliver. Reviewing
that noise by hand is slow, while line-count heuristics cannot determine whether
a change is behaviorally necessary.
PatchSlim treats a focused test command as an oracle and searches for a smaller
committed Git diff that still passes it.
What this adds
doctor,init,inspect,minimize, andreportcommands.
worktree.
a configurable time budget.
documentation, CI, manifests, lockfiles, PatchSlim configuration, and Git
control files.
result is accepted.
apply.patchtransforms the original head into the minimized result.candidate.patchrecreates the minimized result from the merge base.checks, and a Node 20/22/24 CI matrix.
Release-audit fixes
The release pass found and locked down several edge cases:
oracle fails closed as
BASE_ORACLE_UNSTABLE.rule.
instead of silently ignoring misspelled safety settings.
--timeoutnow becomes the default for setup commands as well as theoracle and gates.
npm packbuilds through the local toolchain and no longer depends on aglobally resolved pnpm version.
Safety model
PatchSlim fails closed when:
are removed;
Every candidate and command stage is reconstructed from the merge base. Ignored
test output is cleared between stages, while ignored dependency directories
created by setup are preserved. The current checkout is never reset or cleaned,
and a candidate is never applied automatically.
Validation
pnpm release:checkUnicode paths
setup pollution, cache pollution, and interruption coverage
apply.patchapplied to the original head and verified by the protected test+8/-3to 2 files+6/-2Current limits
behavioral equivalence.
atomically.
globally smallest patch.
current user's host permissions.
Review focus
enough for the first release.
ineffective.
workflows.