@@ -22,16 +22,15 @@ jobs:
2222 # Version of the published engine used for BOTH the guard and the review, so
2323 # the guard that clears a config is the same engine that then reads it. Override
2424 # with repo variable ECR_VERSION; pin to a specific version to freeze it.
25- ECR_VERSION : ${{ vars.ECR_VERSION || 'latest' }}
26- # Trigger policy lives in .expo-code-review/config.jsonc (review.trigger); `ecr ci`
27- # self-gates on it (and honors the ai-review:skip label). This coarse gate just
28- # avoids spinning up a runner for a PR that explicitly opted out. Uses the array
29- # form of contains() for an EXACT label match ("ai-review:skip" is not "ai-review").
30- # Prefer to gate entirely here instead? Set config trigger to "label" and replace
31- # the line below with, e.g.:
32- # if: contains(github.event.pull_request.labels.*.name, 'ai-review')
33- # @ref LLP 0009#guard-step-ordering-and-job-budgets [explains] — spin-up avoidance only; real policy is config.jsonc review.trigger
34- if : ${{ !contains(github.event.pull_request.labels.*.name, 'ai-review:skip') }}
25+ ECR_VERSION : ${{ vars.ECR_VERSION || '0.14.0' }}
26+ # Auto-review only labeled same-repository branches. GitHub withholds the model
27+ # secret and write token from fork pull_request jobs; maintainers can use /review
28+ # for forks through the base-context issue_comment workflow.
29+ # @ref LLP 0009#guard-step-ordering-and-job-budgets [explains] — exact label and fork gates avoid guaranteed no-op runners
30+ if : >-
31+ contains(github.event.pull_request.labels.*.name, 'ai-review') &&
32+ !contains(github.event.pull_request.labels.*.name, 'ai-review:skip') &&
33+ github.event.pull_request.head.repo.full_name == github.repository
3534 # Backstop so a stalled review fails fast instead of hanging. This is the ONE cap
3635 # with no soft landing (GitHub hard-kills the job and nothing is posted), so keep
3736 # margin over the worst-case internal chain: the passes budget
8584 # from the registry — it never builds or executes the PR's code.
8685 # @ref LLP 0009#guard-step-ordering-and-job-budgets [implements] — layer 2; layer 1 is ecr ci's own runtime check
8786 - name : Guard config tokenEnv (root + routing + all scopes)
88- continue-on-error : true
8987 env :
9088 # (Comma-separated set for a multi-credential auth.providers config.)
9189 ECR_EXPECTED_TOKEN_ENV : ${{ vars.ECR_EXPECTED_TOKEN_ENV || 'META_API_KEY' }}
0 commit comments