Repository navigation
Commit 79894c8
fix(pr-pipeline): run the read runner's signed-commit check only when the lane can commit (#9268)
No related issue: fix-docs report failure on #9245, run 39874313435
## Summary
In [run
39874313435](https://github.com/melodic-software/claude-code-plugins/actions/runs/39874313435),
job "fix-docs / report" on PR #9245 failed. The run job gated no head
SHA, so its `can-commit` output was empty. The report job's `signed`
step gated on `can-commit != 'false'`, which an empty value passes. It
ran `check-signed-commits` with an empty `since-sha`, warned "could not
verify the lane's commits (the PR's head never matched its branch)",
then failed the job when the label escalation got a 403 on `POST
.../issues/9245/labels`.
## Fix
In `.github/workflows/pr-run-activity-read.yml`, the `signed` step now
runs only when `needs.run.outputs.can-commit == 'true'` and
`steps.head.outputs.sha != ''`; the PR number and not-forged conditions
are kept.
No read-runner caller has `can-commit` true. The read workflow fails red
on any effect but `read` (`effect-not-read`), the read effect grants
`contents: read`, and `resolve-config.mjs:260` sets `can-commit` to
`String(grant.contents !== "read")`, so it is `false` whenever config
resolves and empty otherwise. The `fix-ci`, `fix-docs` and
`resolve-issue` activities all forbid `mutate-branch`. The step is kept,
not deleted, so a future read-runner activity with a write grant stays
covered.
`pr-run-activity-write.yml` has the same `!= 'false'` shape but gates on
`pr-number != ''`, and its activities can commit, so it is a different
context and is unchanged.
## Verification
- New test in `.github/actions/resolve-config/callers.test.mjs`
evaluates the step's `if` for `can-commit` `true`, `false` and empty, an
empty head SHA, an empty PR number and a forged head. It fails on the
old gate (`can-commit ''`) and passes on the new one.
- `callers.test.mjs`: 102 pass. `check-signed-commits` tests: 33 pass.
`actionlint` on the workflow: clean.
- `scripts/check-affected.sh --tests`: 9 passed, 5 skipped (no markdown,
shell, plugin, Python or skill changes).
- No changelog fragment: no plugin or convention file changed.
## Related
- Failing run:
https://github.com/melodic-software/claude-code-plugins/actions/runs/39874313435
- PR #9245
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <[email protected]>1 parent bc30613 commit 79894c8
2 files changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2778 | 2778 | | |
2779 | 2779 | | |
2780 | 2780 | | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
2781 | 2793 | | |
2782 | 2794 | | |
2783 | 2795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2742 | 2742 | | |
2743 | 2743 | | |
2744 | 2744 | | |
2745 | | - | |
| 2745 | + | |
2746 | 2746 | | |
| 2747 | + | |
2747 | 2748 | | |
2748 | 2749 | | |
2749 | 2750 | | |
| |||
0 commit comments