Conversation
Greptile SummaryThis PR reverts merge commit Key changes:
The one substantive issue is the branch-name guard in Confidence Score: 3/5
Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: .github/workflows/pr-policy.yml
Line: 35
Comment:
**Branch-name bypass allows arbitrary lockfile commits**
The condition `github.head_ref != 'chore/refresh-lockfile'` is intended to exempt the bot's auto-generated PR from the lockfile block, but `github.head_ref` is just the source branch name and is fully controlled by the PR author. Any external contributor can name their fork branch `chore/refresh-lockfile` and commit arbitrary changes to `pnpm-lock.yaml` without triggering this check, bypassing the policy entirely.
The guard should additionally verify the PR originates from the same repository (i.e. is not a fork):
```suggestion
if: github.head_ref != 'chore/refresh-lockfile' || github.event.pull_request.head.repo.full_name != github.repository
```
With this fix the exemption only fires when the branch name matches **and** the PR comes from the canonical repo (i.e. the real bot PR), so fork-originated PRs from a branch named `chore/refresh-lockfile` are still subject to the lockfile-edit block.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: doc/DEVELOPING.md
Line: 24
Comment:
**Documentation does not match the actual workflow**
The line states that pushes to `master` "run verification with `--frozen-lockfile`", but the actual `refresh-lockfile.yml` workflow only regenerates the lockfile and opens a PR — it never runs a frozen install. Additionally, `pr-verify.yml` was changed in this same PR to use `--no-frozen-lockfile` for all PRs (including the `chore/refresh-lockfile` PR). The `--frozen-lockfile` verification step described here does not exist anywhere in the current CI setup.
```suggestion
- Pushes to `master` regenerate `pnpm-lock.yaml` with `pnpm install --lockfile-only --no-frozen-lockfile` and open a `chore/refresh-lockfile` PR if the lockfile changed.
```
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: b888f92 |
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| - name: Block manual lockfile edits | ||
| if: github.head_ref != 'chore/refresh-lockfile' |
There was a problem hiding this comment.
Branch-name bypass allows arbitrary lockfile commits
The condition github.head_ref != 'chore/refresh-lockfile' is intended to exempt the bot's auto-generated PR from the lockfile block, but github.head_ref is just the source branch name and is fully controlled by the PR author. Any external contributor can name their fork branch chore/refresh-lockfile and commit arbitrary changes to pnpm-lock.yaml without triggering this check, bypassing the policy entirely.
The guard should additionally verify the PR originates from the same repository (i.e. is not a fork):
| if: github.head_ref != 'chore/refresh-lockfile' | |
| if: github.head_ref != 'chore/refresh-lockfile' || github.event.pull_request.head.repo.full_name != github.repository |
With this fix the exemption only fires when the branch name matches and the PR comes from the canonical repo (i.e. the real bot PR), so fork-originated PRs from a branch named chore/refresh-lockfile are still subject to the lockfile-edit block.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/pr-policy.yml
Line: 35
Comment:
**Branch-name bypass allows arbitrary lockfile commits**
The condition `github.head_ref != 'chore/refresh-lockfile'` is intended to exempt the bot's auto-generated PR from the lockfile block, but `github.head_ref` is just the source branch name and is fully controlled by the PR author. Any external contributor can name their fork branch `chore/refresh-lockfile` and commit arbitrary changes to `pnpm-lock.yaml` without triggering this check, bypassing the policy entirely.
The guard should additionally verify the PR originates from the same repository (i.e. is not a fork):
```suggestion
if: github.head_ref != 'chore/refresh-lockfile' || github.event.pull_request.head.repo.full_name != github.repository
```
With this fix the exemption only fires when the branch name matches **and** the PR comes from the canonical repo (i.e. the real bot PR), so fork-originated PRs from a branch named `chore/refresh-lockfile` are still subject to the lockfile-edit block.
How can I resolve this? If you propose a fix, please make it concise.| - Pull request CI validates lockfile freshness when manifests change and verifies with `--frozen-lockfile`. | ||
| - Do not commit `pnpm-lock.yaml` in pull requests. | ||
| - Pull request CI validates dependency resolution when manifests change. | ||
| - Pushes to `master` regenerate `pnpm-lock.yaml` with `pnpm install --lockfile-only --no-frozen-lockfile`, commit it back if needed, and then run verification with `--frozen-lockfile`. |
There was a problem hiding this comment.
Documentation does not match the actual workflow
The line states that pushes to master "run verification with --frozen-lockfile", but the actual refresh-lockfile.yml workflow only regenerates the lockfile and opens a PR — it never runs a frozen install. Additionally, pr-verify.yml was changed in this same PR to use --no-frozen-lockfile for all PRs (including the chore/refresh-lockfile PR). The --frozen-lockfile verification step described here does not exist anywhere in the current CI setup.
| - Pushes to `master` regenerate `pnpm-lock.yaml` with `pnpm install --lockfile-only --no-frozen-lockfile`, commit it back if needed, and then run verification with `--frozen-lockfile`. | |
| - Pushes to `master` regenerate `pnpm-lock.yaml` with `pnpm install --lockfile-only --no-frozen-lockfile` and open a `chore/refresh-lockfile` PR if the lockfile changed. |
Prompt To Fix With AI
This is a comment left during a code review.
Path: doc/DEVELOPING.md
Line: 24
Comment:
**Documentation does not match the actual workflow**
The line states that pushes to `master` "run verification with `--frozen-lockfile`", but the actual `refresh-lockfile.yml` workflow only regenerates the lockfile and opens a PR — it never runs a frozen install. Additionally, `pr-verify.yml` was changed in this same PR to use `--no-frozen-lockfile` for all PRs (including the `chore/refresh-lockfile` PR). The `--frozen-lockfile` verification step described here does not exist anywhere in the current CI setup.
```suggestion
- Pushes to `master` regenerate `pnpm-lock.yaml` with `pnpm install --lockfile-only --no-frozen-lockfile` and open a `chore/refresh-lockfile` PR if the lockfile changed.
```
How can I resolve this? If you propose a fix, please make it concise.
Summary
56df8d3from PR ci: refresh pnpm lockfile before merge #707Verification
pnpm -r typecheckpnpm test:runpnpm build