Skip to content

fix(review-pr): add missing ACTION_PATH env var to filter-diff and score-risk steps#193

Merged
derekmisler merged 2 commits into
docker:mainfrom
docker-agent:fix/review-pr-action-path
May 7, 2026
Merged

fix(review-pr): add missing ACTION_PATH env var to filter-diff and score-risk steps#193
derekmisler merged 2 commits into
docker:mainfrom
docker-agent:fix/review-pr-action-path

Conversation

@docker-agent
Copy link
Copy Markdown
Contributor

Problem

Two steps in review-pr/action.yml referenced $ACTION_PATH in their run: shell block but never declared it as an env: variable:

  • "Filter excluded paths from diff" (~line 241): used node "$ACTION_PATH/dist/filter-diff.js" but ACTION_PATH was not in env:
  • "Score file risk" (~line 322): used node "$ACTION_PATH/dist/score-risk.js" but ACTION_PATH was not in env:

Under set -euo pipefail (or whenever ACTION_PATH happens to be unset in the runner environment) this causes an unbound variable error and the step fails.

Fix

Add ACTION_PATH: ${{ github.action_path }} to the env: section of both steps, matching the pattern already used correctly by several other steps in the same file (e.g. the feedback step at ~line 629, the agent-run steps at ~lines 729 and 742).

Validation

  • pnpm lint passes (Biome CI, tsc --noEmit, actionlint) ✅

… steps

Both the 'Filter excluded paths from diff' and 'Score file risk' steps
used $ACTION_PATH in their run: blocks but never declared it in their
env: sections. This causes 'unbound variable' errors under set -euo pipefail.

Add ACTION_PATH: ${{ github.action_path }} to the env: block of both steps,
matching the pattern already used by other steps in the same file.
@docker-agent docker-agent requested a review from a team as a code owner May 7, 2026 17:18
@docker-agent docker-agent requested a review from derekmisler May 7, 2026 17:18
derekmisler
derekmisler previously approved these changes May 7, 2026
…cquisition

'Ensure cache directory exists' and 'Restore reviewer memory' were
positioned after the diff-processing pipeline (~line 548), meaning any
failure in Filter excluded paths, Split diff, Score file risk, or
Generate file history would silently skip the memory restore — so the
agent would run without its learned history.

Move both steps to run immediately after 'Save review lock' (before
'Add eyes reaction' and 'Get PR information'), where they execute as
soon as the lock is acquired and nothing in the diff pipeline can
preemptively skip them. Their existing if: condition
(steps.lock-check.outputs.skip != 'true') is preserved unchanged.
@derekmisler derekmisler merged commit 8df7787 into docker:main May 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants