feat: implement changed-file path policy and resolver for Git diffs#25
Merged
Merged
Conversation
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.
Description
Closes #5.
Adds the reusable changed-file path-policy seam for Pushgate's v2 runner work. The new TypeScript module resolves changed files against the configured local
review.target_branchusing the documented<target_branch>...HEADrange, preserves normalized file metadata for downstream deterministic checks and AI review, and fails explicitly when the configured target ref or merge base cannot be used.This intentionally stops at the core seam: wiring the installed runner to execute policy and deterministic commands remains follow-up runner/check work.
Type of change
fix:— Bug fix (patch version bump)feat:— New feature (minor version bump)feat!:/fix!:— Breaking change (major version bump)docs:— Documentation only (no version bump)chore:— Maintenance or config (no version bump)refactor:— Code restructure, no behaviour change (no version bump)Changes made
src/path-policywith a normalizedChangedFilecontract, target/diff metadata, typed policy errors, NUL-delimited Git parsing, rename metadata, and binary detection.ignore_pathsfiltering through the focusedignoredependency.Testing
pnpm testpassespnpm run buildpassespnpm run check:shellpasses with no output (not run; no shell scripts changed)pnpm run lint:shellpasses (not run; no shell scripts changed)Checklist
eval, heredoc variable expansion, or unquoted variable interpolation in shell scriptsVERSION,CHANGELOG.md,.release-please-manifest.json, andrelease-please-config.jsonwere not manually edited — these are managed by release-pleaseREADME.md(not applicable)install.shusage comment (not applicable)Screenshots / output
No terminal UI changes. Verification run locally:
pnpm test pnpm run build