fix: validate maintenance PRs via standard repo checks#187
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae645cb5d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rawLine.startsWith("@@") | ||
| ) { |
There was a problem hiding this comment.
Reset section tracking at each diff hunk boundary
The parser keeps currentTopLevelKey across @@ hunk boundaries, so a patch that first edits devDependencies and then edits an unrelated top-level scalar in a later hunk can still be treated as devDependencies-only. In that case packageJsonPatchIsMaintenanceOnly returns true, and supportsStandardChecksValidation can route a non-maintenance PR to standard_checks_sufficient instead of escalation.
Useful? React with 👍 / 👎.
| const allowedRootChange = /^ {2}"packageManager": /.test(line) || /^ {2}"pnpm": \{$/.test(line); | ||
| if (allowedRootChange) { |
There was a problem hiding this comment.
Accept full
pnpm block edits as maintenance changes
The maintenance allowlist only matches the opening line "pnpm": {, but real pnpm config updates also change nested lines and closing braces, which immediately hit return false. That means pnpm-only tooling maintenance PRs still fail this check and get escalated as unvalidated, despite the new feature-path behavior intended for maintenance scope.
Useful? React with 👍 / 👎.
Summary
Validation
Live check
validation_status: "standard_checks_sufficient"and proceeds into review instead of escalating immediately from feature validation