Repository navigation
Conversation
Code Cycle initial review[CCR-20261019-001] · manual · anthropic/opus→? · high · schema:2Verdict: Summary and scopeReviewed the accumulated diff The change follows the proposal in #243, keeps the required check name Findings[REV-001] · medium · open · - · blocks:yes — Runner selection fails open to self-hosted when the PR head repository is null
The new predicate selects The removed condition failed closed for the same payload: Whether a runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-latest' || fromJSON('["self-hosted","Linux","X64"]') }}Same-repository PRs, pushes to [REV-002] · low · open · - · blocks:yes — PR body does not close #243PR description The body says "Implements #243", which is not a GitHub closing keyword; Security triageThe audit ran: the change edits a CI workflow and the runner trust boundary (default trigger: CI workflows), and #243 is security-sensitive. Result:
Commands executedIn
Unverified
CI (
|
…sed (#243) Compare the head repository with github.repository instead of reading head.repo.fork, so a pull_request payload with a null head repository also selects ubuntu-latest rather than the self-hosted runner (REV-001).
Code Cycle resolution[CCR-20261019-001] · manual · anthropic/opus→? · high · schema:2[CCT-20261019-001] · manual · anthropic/opus→? · high · triaged:bee2c2714ce306d25011dbd1e5a5f62c2692ee35 · schema:2Status: Findings[REV-001] · medium · resolved · valid · blocks:yes — Runner selection fails open to self-hosted when the PR head repository is null
The
The job's comment states the fail-closed intent, and the regression test now pins the new predicate, the unchanged job name, and the absence of [REV-002] · low · resolved · valid · blocks:yes — PR body does not close #243The PR description now opens with VerificationAgent-reported, run in
Not verified: the Post-change review and security
CI (
|
Code Cycle rereview[CCR-20261019-001] · manual · anthropic/opus→? · high · schema:2[CCT-20261019-001] · manual · anthropic/opus→? · high · triaged:bee2c2714ce306d25011dbd1e5a5f62c2692ee35 · schema:2[CCR-20261019-002] · manual · anthropic/opus→? · high · schema:2Verdict:
What changed since the previous review (
|
| Event | Head repository | Result |
|---|---|---|
pull_request |
datacas/code-cycle-toolkit |
self-hosted |
pull_request |
Datacas/Code-Cycle-Toolkit |
self-hosted |
pull_request |
someone/code-cycle-toolkit |
ubuntu-latest |
pull_request |
null |
ubuntu-latest |
push |
— | self-hosted |
workflow_dispatch |
— | self-hosted |
The null case now resolves to ubuntu-latest. On bee2c27, the same case fell through to self-hosted. CI on this head ran the job on the self-hosted runner for this same-repository PR, which is consistent with the first row.
[REV-002] · low · resolved · valid · blocks:yes — PR body does not close #243
Corrected: gh pr view 278 --json closingIssuesReferences returns [243].
New findings
None.
Security triage
The audit ran because the deterministic rule fired on a CI workflow, and the change sits on the self-hosted runner trust boundary. The fix only narrows the self-hosted path. There is no pull_request_target, no secrets.*, and no permission change.
Verification
python3 -m unittest tests.test_validate_workflow: exit 0 at6b6ee24.- Expression model over the six cases above: output as tabulated.
gh pr view 278 --json closingIssuesReferences:[243].
Unverified:
- No real fork PR has run the job on
ubuntu-latest, and thenullhead-repository payload was modelled, not delivered by GitHub. The model follows the documented semantics, but it is not GitHub's evaluator. - ci: validate fork PRs on a GitHub-hosted runner instead of skipping the Linux job #243's acceptance criterion that a fork PR with a deliberately failing test makes the check fail still needs a fork PR to observe.
CI (6b6ee24, read once under the parallel policy)
| Check | State |
|---|---|
Skills, manifests, and Bash installer (required) |
passed |
Windows test shard (windows-2) |
passed |
Windows test shard (windows-1), (windows-3), (windows-4) |
running |
PowerShell installer (required) |
not yet in the rollup; waits for the shards |
The cycle's CI gate decides on these.
Residual risk
The hosted-runner path has not yet been observed on a fork PR. The routing logic itself is now fail-closed for every pull request whose head is not this repository.
Closes #243.
Fork pull requests now run the required Linux validation on GitHub-hosted
ubuntu-latest; same-repository pull requests, pushes tomain, andworkflow_dispatchretain the self-hosted runner. The required check name andcontents: readpermissions stay unchanged.Diagnosis
The
validatejob was skipped for fork pull requests by its job-levelif:condition. The workflow source showed the condition excluded fork heads; GitHub's current documentation confirms that a conditionally skipped job reportsSuccess, even when it is a required check (job conditions). The proposed cause was confirmed.The invariant is that the required Linux check runs the full validation and reports its real result, while fork-controlled code never runs on the self-hosted machine. The fix selects
ubuntu-latestfor everypull_requestwhose head repository is not this repository (a null head repository included) and retains the self-hosted runner for all other events. The workflow's existing systempython3and ShellCheck steps remain unchanged; GitHub's Ubuntu 24.04 image inventory lists Python 3.12.3 and ShellCheck 0.9.0-1.Related work searched at widened depth: #242 (closed; its changes are present in the current workflow), #236 (open; changes the same workflow), #241 (closed), and #259 (open; includes CI security coverage). The same-term search also found merged PRs #170 and #254. This change preserves #242's triggers and concurrency and does not alter #236's path classification or #241's Windows shards.
Work units
WU-1.github/workflows/validate.yml,tests/test_validate_workflow.pypython3 -m unittest discover -s tests— exit 0, 1,609 tests;python3 scripts/validate-package.py— exit 0;python3 -m unittest— exit 0, 0 tests discovered. Agent-reported local verification.Verification
Agent-reported local checks ran in this Linux worktree with system Python 3. GitHub's hosted Ubuntu image inventory lists system Python and ShellCheck. The fork-specific runner route was not exercised by this same-repository pull request; the regression test checks the workflow routing expression, and the pushed-head checks are reported below.
python3 -m unittest discover -s tests— passed, 1,609 tests.python3 scripts/validate-package.py— passed.python3 -m unittest— exited 0, discovered 0 tests.Checks of pushed head
One check read for head
bee2c2714ce306d25011dbd1e5a5f62c2692ee35found these jobs in progress:Skills, manifests, and Bash installer— pending.Windows test shard (windows-1)— pending.Windows test shard (windows-2)— pending.Windows test shard (windows-3)— pending.Windows test shard (windows-4)— pending.PowerShell installerwas not yet present in the rollup; its Windows shard dependencies were still running. The stage did not wait or poll, per the parallel CI policy.