feat(reusable): resolve the reviewer image tag at runtime (GADFLY_REVIEWER_TAG)
Build & push image / build-and-push (pull_request) Successful in 5s
Gadfly review (reusable) / review (pull_request) Successful in 6m42s
Adversarial Review (Gadfly) / review (pull_request) Successful in 6m43s

Nearly every consumer re-pin of review-reusable.yml was a reviewer IMAGE bump,
not a structural change — but the tag was baked into a `uses: docker://` step,
which is parsed before any expression context exists and so can't read a
variable. Run the reviewer as the JOB container instead (container.image DOES
accept expressions) with an explicit `run: /entrypoint.sh` step: the tag now
resolves per-run via inputs.reviewer_tag → user var GADFLY_REVIEWER_TAG → the
baked fallback pin (sha-b37cd09, unchanged).

A Gadfly release becomes: build the image, update the ONE user-level variable —
every consumer pinned to this file's @<sha> picks it up on its next review with
no re-pin. Workflow re-pins remain only for structural yml changes (this is one
— intended to be the last routine one).

- Entrypoint contract unchanged: same env block, same /entrypoint.sh brains
  (bash + entrypoint already live in the image; ENTRYPOINT was /entrypoint.sh).
- Keep the variable on immutable sha- tags, never :latest (act_runner caches
  :latest and often does not re-pull a moved one).
- Tradeoff noted in comments: vars are unmasked and move without a commit
  trail — same blast radius as editing this file, minus the audit trail.
- README (image/pinning para + Central config table) and examples/reusable.yml
  updated per the maintenance rule.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-07-22 22:43:37 -04:00
co-authored by Claude Fable 5
parent c9dab69d14
commit 4dafac0d13
3 changed files with 40 additions and 13 deletions
+3 -2
View File
@@ -17,8 +17,9 @@
# review never touches), so prefer the explicit form. Pin to an immutable
# @<sha>: long-lived act_runners CACHE the reusable by ref, so a moved tag (@v1)
# or @main is often not re-fetched and silently runs a stale copy. Bump the @<sha>
# to adopt a structural change; routine swarm tuning rides owner variables (see
# the gadfly README "Central config via variables") with no re-pin needed.
# only to adopt a structural change; routine swarm tuning AND reviewer image
# releases ride owner variables (GADFLY_DEFAULT_*, GADFLY_REVIEWER_TAG — see the
# gadfly README "Central config via variables") with no re-pin needed.
#
# For custom named endpoints (GADFLY_ENDPOINT_<NAME>) or a provider the reusable
# doesn't map, use the full stub in adversarial-review.yml instead.