Skip to content

Commit c83a4e1

Browse files
committed
ci: call the review workflow by GitHub's self-repository form
zizmor fails on a reusable workflow called by a local path and asks for the `$/` form, which names this repository at the exact commit that is running. actionlint v1.7.12 does not know that form yet, so its one message about it is ignored, in self-test.yml only. The user chose this over a zizmor ignore. This restores 637778a, which was reverted while the choice was open. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
1 parent 8548515 commit c83a4e1

4 files changed

Lines changed: 17 additions & 8 deletions

File tree

‎.github/actionlint.yaml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@
55
# "property ... is not defined in object type". The shared review workflow uses them to
66
# check out this repository at the commit the caller pinned (see #20, #21 and #22).
77
#
8-
# Only those two messages are ignored, and only in claude-review.yml. Every other check
9-
# still runs on every file. Remove this file once an actionlint release knows the
10-
# job.workflow_* properties, and bump the pin in checks.yml.
8+
# GitHub also added the self-repository form, `uses: $/path`, on 30 July 2026. It names
9+
# this repository at the exact commit that is running. zizmor asks for it in place of
10+
# `./path`, but actionlint v1.7.12 reports it as a badly formed reusable workflow call.
11+
# The self-test calls the review workflow that way (see #29).
12+
#
13+
# Only these messages are ignored, each only in the file named. Every other check still
14+
# runs on every file. Remove an entry once an actionlint release knows the syntax, and
15+
# bump the pin in checks.yml.
1116
paths:
1217
.github/workflows/claude-review.yml:
1318
ignore:
1419
- 'property "workflow_(repository|sha)" is not defined in object type'
20+
.github/workflows/self-test.yml:
21+
ignore:
22+
- 'reusable workflow call "\$/[^"]*" at "uses" is not following the format'

‎.github/workflows/self-test.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# run is fast and cheap and never starts a real review.
44
#
55
# When a pull request here is opened, reopened or marked ready for review, the review job calls this pull request's own
6-
# version of .github/workflows/claude-review.yml (a local path, not a pinned commit), with the stub's trigger id and
6+
# version of .github/workflows/claude-review.yml (`$/`, GitHub's form for this repository at the exact commit that is
7+
# running, not a pinned commit), with the stub's trigger id and
78
# token. The verify job then fails if the review workflow decided not to request a review, naming the skip reason, or
89
# if the request was not sent, and otherwise waits a few minutes for the stub's reply naming this run attempt.
910
#
@@ -63,7 +64,7 @@ jobs:
6364
# even one that will not run. Only its react job uses it, for a comment command, which this test does not make.
6465
permissions:
6566
issues: write
66-
uses: ./.github/workflows/claude-review.yml
67+
uses: $/.github/workflows/claude-review.yml
6768
with:
6869
routine-trigger-id: ${{ vars.CLAUDE_ROUTINE_INTEGRATION_TEST_TRIGGER_ID }}
6970
secrets:

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ The stub only posts a comment saying it received the request, so a test run is f
245245

246246
[`.github/workflows/self-test.yml`](.github/workflows/self-test.yml) runs when a pull request in this repository is opened, reopened or marked ready for review.
247247

248-
1. The `review` job calls the pull request's own version of `.github/workflows/claude-review.yml`, by its local path, so the version under test is the one in the pull request. It passes the stub routine's trigger id and token, never the real routine's.
248+
1. The `review` job calls the pull request's own version of `.github/workflows/claude-review.yml`, by GitHub's self-repository form, `uses: $/.github/workflows/claude-review.yml`, so the version under test is the one in the pull request, at the exact commit that is running. (`$/` needs github.com and runner 2.336.0 or later.) It passes the stub routine's trigger id and token, never the real routine's.
249249
2. The review workflow decides, as it would for any repository. If it decides to request a review, it sends the request to the stub. The request text includes a link to this run attempt, `<server>/<repo>/actions/runs/<id>/attempts/<n>`.
250250
3. The stub posts a comment on the pull request, echoing the attempt's link.
251251
4. The `verify` job checks the review workflow's decision. If it decided to request a review and sent the request, the job reads the pull request's comments every 15 seconds, for up to 5 minutes, until it finds a comment that contains `integration-test: received` and this attempt's link. Only a comment posted by the stub routine's account, `cipherstash-agent` (the `REPLY_AUTHOR` setting in the workflow; the login is compared without regard to case), counts, so someone else cannot pass the test by posting the marker on a public pull request. The comment author's standing in the repository (`author_association`) is not used, because the job's token may see a different standing for an account with private organisation membership. It then shows the reply, and its author, in a notice and in the run's summary.

‎tests/test_self_test.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def test_it_runs_on_the_ready_request_events(self):
1616
self.assertEqual(value(".on.pull_request.types[]").split(), ["opened", "reopened", "ready_for_review"])
1717

1818
def test_it_calls_this_pull_requests_own_review_workflow(self):
19-
# A local path, so the version under test is the pull request's, not a pinned commit.
20-
self.assertEqual(value(".jobs.review.uses"), "./.github/workflows/claude-review.yml")
19+
# GitHub's self-repository form: this repository, at the exact commit that is running, not a pinned commit.
20+
self.assertEqual(value(".jobs.review.uses"), "$/.github/workflows/claude-review.yml")
2121

2222
def test_it_uses_the_stub_routines_trigger_and_token(self):
2323
self.assertEqual(

0 commit comments

Comments
 (0)