Skip to content

perf(pr-require-checks): read the run's workflow and the pull request over GraphQL - #836

Merged
kyle-sexton merged 4 commits into
mainfrom
perf/808-graphql-folding
Oct 20, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
perf/808-graphql-folding

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Closes #808

Summary

ci-status (aggregate-results) and pr-contract (check-contract) now get the reads GraphQL can serve from GraphQL, which has its own rate limit. GraphQL reports a primary rate limit as HTTP 200 with an error. The shared gh-api.sh helper now classifies that response, reports it, waits it out and fails closed, the same as a REST rate limit.

Fix

  • gh-api.sh: gh_api POST graphql ... fails on any errors entry, whatever gh's exit status, and its data is never read.
    • GH_HTTP_STATUS comes from the response status line, GH_MESSAGE from the first error, and GH_GRAPHQL_ERROR_TYPES lists the error types.
    • An error of type RATE_LIMITED, x-ratelimit-remaining: 0, retry-after, or a rate-limit message classifies the error as rate-limit. It is then reported and waited out within rate-limit-wait-seconds, and fails closed if it outlasts that wait.
    • An error of type FORBIDDEN classifies as permission.
    • GraphQL rate limits: "If you exceed your primary rate limit, the response status will still be 200, but you will receive an error message, and the value of the x-ratelimit-remaining header will be 0." That page does not name the RATE_LIMITED type; this PR adds the type rule because the issue names it.
  • aggregate-results: resolve_workflow_id used to read actions/runs/<this run>, the read behind most of the 403s in perf(pr-require-checks): fold ci-status and pr-contract REST reads into one GraphQL query per job #808. It now reads resource(url: <run URL>) { ... on WorkflowRun { databaseId workflow { databaseId } } }.
    • The workflow id is trusted only when __typename is WorkflowRun and databaseId equals GITHUB_RUN_ID. A null result, which GraphQL returns with no error for a URL it cannot resolve, fails closed.
    • Equivalence check, run live on this repository: run 39503598815 reads workflow_id 374434959 over REST and workflow.databaseId 374434959 over GraphQL.
  • check-contract: the pull request and its comments are now read in one query, which replaces REST pulls/N and the comments listing.
    • The response is rewritten into the REST shape the checks already read.
    • A missing title or body, a missing or wrongly typed labels, or labels.totalCount above the nodes returned fails the step closed. A do-not-merge label beyond the first page can therefore never pass.
    • A Bot author's GraphQL login lacks the REST [bot] suffix. Live, PR build: bump the github-actions group across 4 directories with 5 updates #749 reads dependabot over GraphQL and dependabot[bot] over REST, so the suffix is added back for exempt-authors.
    • Comments past the query's one page of 100 fall back to the REST listing.
  • Behavior change (fails safe): the comments are now read in the same query as the pull request. A GraphQL error in the comments part therefore fails the whole read and turns pr-contract red. Before, a failed comments read only affected the advisory comment.
  • README, both action.yml rate-limit-wait-seconds descriptions and the check-contract README now describe the GraphQL path.
  • scan_line and negation_trigger are byte-identical to origin/main.

Stays on REST, and why (references: Actions objects, Checks objects, Commits objects):

  • commits/<sha>/statuses list. StatusContext has no databaseId, and Status.contexts is documented only as "The individual status contexts for this commit", with no full history. The newest bot entry by id, which keeps a forged user success from shadowing the bot's verdict, cannot be selected.
  • actions/workflows/<id>/runs?head_sha= listings (the wait, the yield, the newer-verdict check, the re-run). WorkflowRun has no status, head SHA or run_started_at, and Workflow.runs takes no head-SHA filter.
  • The writer-run fallback actions/runs/<writer>. It needs run_started_at, which WorkflowRun lacks.
  • All jobs reads (actions/jobs/<id>, runs/<id>/jobs?filter=latest, attempts/1/jobs):
    • CheckRun has no runner name, which the fallback identity key needs.
    • resource(url:) returned null for a check-run URL in a live probe.
    • No documentation says CheckRunFilter.checkType: LATEST ("The latest check run") equals REST filter=latest.
    • Neither CheckRun nor CheckSuite exposes an attempt.
    • These reads feed verify_writer_step and job_shape.

Security review still owed. The issue requires one for any change to how the carried-writer verification reads its data. verify_carried_writer compares the writer's workflow against the id resolve_workflow_id returns, and that id now comes from GraphQL. The checks above (type, run id, numeric) keep it failing closed, but this PR has not had that review yet.

Verification

  • bash .github/actions/pr-require-checks/aggregate-results/run.test.sh: all pass. No existing run_case exit code changed. Existing cases that faulted the own-run read now fault the GraphQL key.

  • bash .github/actions/pr-require-checks/check-contract/run.test.sh: all pass, with no existing exit code changed. Fixtures now come from the GraphQL shape seen live.

  • REST call counts, measured by running the same cases against origin/main (8b41a59):

    Case REST before REST after GraphQL after
    ci-status: contract-only run carrying a success 6 5 1
    pr-contract: conforming PR with a marker comment 3 reads 0 reads 1
    pr-contract: failing PR with a marker comment 2 reads 0 reads 1
  • New tests, each shown to fail under a mutant of the code it guards:

    • RATE_LIMITED on HTTP 200 (both suites): reported as (rate-limit), waited out and retried; fails closed when it persists or the wait exceeds the cap. Fails with the errors detection removed, and the ci-status case (type only, no header or message) fails with the RATE_LIMITED type rule removed.
    • Missing fields (check-contract): an incomplete label page, missing label nodes, or a null pull request fails closed. These fail when the field checks are replaced with // "" and // [] defaults, and the label-page case also fails when only the completeness check is removed.
    • ci-status: a run resource that resolves to another run fails closed (fails with the run-id check removed); a null run fails closed.
    • Bot login: matches exempt-authors (fails without the [bot] suffix).
    • REST counts: the count tests fail when the comments are not taken from the GraphQL read.
  • The FORBIDDEN → permission rule has no test.

  • CI under GITHUB_TOKEN: the full run's ci-status job logged pr-contract: the PR body satisfies the issue-linkage contract., which needs the GraphQL pull request read, and Failed run(s) of this workflow on b41e242... to consider for a re-run: none., which prints only after the GraphQL run read returns a workflow id. Neither step logged a warning.

  • shellcheck --rcfile .shellcheckrc (0.11.0), shfmt -d (3.14.1), and actionlint are clean. node --test .github/scripts/*.test.cjs: 535 pass.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 20, 2026 18:12
… over GraphQL

ci-status and pr-contract drew every read from the repository token's REST
bucket, which runs out during bursts of pull request CI while the GraphQL
bucket sits mostly free.

- gh-api.sh: `gh_api POST graphql` fails on any `errors` entry, whatever gh's
  exit status; a `RATE_LIMITED` error on HTTP 200 is classified, reported,
  waited out and failed closed exactly like a REST rate limit.
- aggregate-results: this run's workflow id comes from `resource(url:)`,
  checked to be this WorkflowRun, instead of `actions/runs/<id>`.
- check-contract: the pull request and its comments come from one query;
  a missing field or an incomplete label page fails closed, a Bot login gets
  its REST `[bot]` suffix back, and comments past one page fall back to REST.

Status lists, run listings, the writer run and every jobs read stay on REST:
GraphQL exposes no status ids or history, no run_started_at, head SHA filter,
or per-attempt jobs.

Closes #808

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aphQL call

`GET repos/.../actions/runs/4242` also matches this run's jobs read, so the
two assertions held whether or not the workflow read happened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 20, 2026 22:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T22:25:08.067042Z 3b28094 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 27s —— View job


Claude code review — code-review lane

  • Gather context (PR diff, CLAUDE.md, REVIEW.md, path-scoped rules, closing issue)
  • Review gh-api.sh GraphQL error classification
  • Review aggregate-results run.sh changes
  • Review check-contract run.sh changes
  • Review tests and README updates
  • Post findings

Summary

I reviewed the GraphQL-folding changes to gh-api.sh, aggregate-results/run.sh, and check-contract/run.sh for correctness, error-handling, and maintainability (security findings are out of scope for this lane — this repo runs a dedicated pr-review-security lane per REVIEW.md, and the author's own "security review still owed" note belongs there).

Traced through the fail-closed paths in detail:

  • gh-api.sh's GraphQL errors-array detection (gh-api.sh#L110-L130): forces status=1 when errors is non-empty regardless of gh's own exit code, correctly recovers GH_HTTP_STATUS from the response's status line when gh's stderr carries no (HTTP nnn) tail (the common case per the PR's own gh 2.102.0 observation), and recovers GH_MESSAGE from the first error. gh_classify (gh-api.sh#L136-L153) correctly classifies a RATE_LIMITED/FORBIDDEN error type on an HTTP 200 the same as a REST 403/429.
  • resolve_workflow_id (aggregate-results/run.sh#L784-L813): the __typename == "WorkflowRun" + run-id-equality check before trusting workflow.databaseId correctly rejects both a null resource and a resource that resolves to a different run; the result is cached so repeated call sites across the file cost one GraphQL read.
  • check-contract's rewritten pull-request JSON (check-contract/run.sh#L198-L216): the completeness select() correctly fails closed on a null pull request, a short label page (totalCount != nodes|length), or a missing field; the [bot] suffix is added back only for __typename == "Bot", matching the REST shape exempt-authors compares against.

I didn't find a correctness bug meeting this lane's bar (one a careful senior reviewer would block on, with a concrete failing input) in the diff. Two items for the record rather than findings:

Author-claimed, not independently verified by me: the REST call-count table, the shellcheck/shfmt/actionlint/node-test results, and the live CI run link in the PR body — I read the code and tests but did not execute them.

claude-lane-summary: lane=claude-review sha=3b28094a38647558b06ea7d7453a046181513683 run=39507478753

@claude

claude Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 20s —— View job


Security review complete

  • Gather context (PR diff, changed files)
  • Review gh-api.sh GraphQL error classification
  • Review aggregate-results resolve_workflow_id GraphQL read
  • Review check-contract GraphQL pull request/comments read
  • Check instruction-surface deletions (CLAUDE.md/AGENTS.md/rules)
  • Adversarial validation of any candidate findings
  • Post final summary

No security issues found.

This PR moves two reads (the run's workflow in aggregate-results, and the pull request + comments in check-contract) from REST to GraphQL, and teaches gh-api.sh to classify a GraphQL errors entry the same way it classifies a REST 403/429. I reviewed the full diff against 3b28094 for logic flaws, trust-boundary gaps, and injection surfaces:

  • No GraphQL injection surface. All variable data (owner, name, number, url) is passed via gh api's -f/-F flags, never spliced into the query text itself. REPOSITORY and the run id are regex-validated (require_pattern) before either query is built, and GITHUB_SERVER_URL/GITHUB_RUN_ID are trusted Actions context, not attacker input.
  • resolve_workflow_id fails closed correctly (run.sh#L784-L808): the workflow id is trusted only when __typename == "WorkflowRun" and the resolved databaseId equals the requesting run's own GITHUB_RUN_ID. A null resource (unresolvable URL) or a resource that resolves to a different run both fail the read rather than silently returning an id. This is the input verify_carried_writer compares the carried-writer's workflow against, so the comparison this PR's own description flags as needing review ("Security review still owed") holds under a mismatched, missing, or wrong-typed GraphQL response.
  • check-contract's PR/labels/comments read fails closed on incompleteness (run.sh#L198-L216): title/body/labels are required to be present with the right JSON type, and labels.totalCount == (labels.nodes | length) is enforced, so a do-not-merge label beyond the first page of 100 can't silently pass. Comments beyond one page of 100 correctly fall back to the REST listing rather than being silently dropped.
  • Bot-login [bot] suffix restoration (run.sh#L204) only fires when GraphQL's author.__typename == "Bot", mirroring REST's [bot]-suffixed login; a regular user can't register a login containing [/] to spoof an exempt-authors entry (same constraint as the pre-existing REST path).
  • gh-api.sh's GraphQL error handling (gh-api.sh#L110-L152) treats any errors entry as a failure regardless of gh's own exit status, and the response data is never read on that path — conservative and fail-closed, including for a RATE_LIMITED/FORBIDDEN type arriving on HTTP 200.
  • No changes touch .github/workflows/*, permissions, or trigger configuration (zizmor's lane), and no instruction files (CLAUDE.md/AGENTS.md/rules) were touched, so the instruction-surface-deletion check does not apply here.

claude-lane-summary: lane=claude-security-review sha=3b28094a38647558b06ea7d7453a046181513683 run=39507478753
· Branch

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

claude-security-review has reviewed this pull request through 553d7fc; a later push is reviewed from there.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

claude-review has reviewed this pull request through 553d7fc; a later push is reviewed from there.

…wo fail-closed reads

- gh-api.sh: a status line that does not yield a three-digit status leaves
  GH_HTTP_STATUS empty rather than carrying arbitrary text.
- aggregate-results: a resource with this run's databaseId but another type
  fails closed.
- check-contract: a FORBIDDEN error beside a complete pull request fails
  closed even when gh exits 0.

Refs: #808

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 50s —— View job


Claude security review — claude-security-review lane (incremental)

  • Read .claude-lane/incremental.diff (changes since 3b28094)
  • Review gh-api.sh GraphQL HTTP-status guard
  • Review aggregate-results/run.test.sh new case
  • Review check-contract/run.test.sh new cases
  • Adversarial check for fail-open regressions
  • Post findings

Scope

Per the lane's incremental instructions, this review covers only what changed since 3b28094a38647558b06ea7d7453a046181513683, in:

  • .github/actions/pr-require-checks/gh-api.sh
  • .github/actions/pr-require-checks/aggregate-results/run.test.sh
  • .github/actions/pr-require-checks/check-contract/run.test.sh

All other files were reviewed at 3b28094 and are unchanged since.

Findings

No security issues found.

  • gh-api.sh (diff): adds [[ "$GH_HTTP_STATUS" =~ ^[0-9]{3}$ ]] || GH_HTTP_STATUS="" after reading the status line from $gh_headers. This only tightens an existing fallback read (used when a GraphQL error arrives with no (HTTP nnn) on stderr) to require an exact 3-digit code, clearing it to empty otherwise. I checked every consumer of GH_HTTP_STATUS across gh-api.sh, aggregate-results/run.sh, and check-contract/run.sh: all either compare it for equality against 403/429 (an empty string simply fails that comparison, same as any non-matching garbage would) or interpolate it into a log/error message with a ${GH_HTTP_STATUS:-unknown} fallback. Rate-limit/permission classification in gh_classify keys off GH_GRAPHQL_ERROR_TYPES, header values, and GH_MESSAGE, not GH_HTTP_STATUS, so this change cannot cause a rate-limit or permission condition to be missed (no fail-open path). It's a correctness tightening, not a behavior change with security weight.
  • aggregate-results/run.test.sh: adds a test case (run_resource 4242 777 CheckRun) confirming the already-reviewed resolve_workflow_id type check (__typename == "WorkflowRun") rejects a same-run-id resource of a different GraphQL type. Test-only; the guarded production logic was reviewed at 3b28094.
  • check-contract/run.test.sh: adds a case where a GraphQL response carries a FORBIDDEN error entry alongside a complete, otherwise-valid pull-request payload, served with HTTP 200 and gh exit 0 (via the new exit0 fixture convention). It confirms the already-reviewed fail-closed rule in gh-api.sh (any errors entry forces failure regardless of gh's exit status) actually prevents the embedded valid-looking PR data from being read and trusted. Test-only, no production logic changed here.

No instruction-surface deletions (CLAUDE.md/AGENTS.md/rules/skills) in this diff. No GitHub Actions trigger/permission changes (zizmor's lane) in this diff.

claude-lane-summary: lane=claude-security-review sha=232ca8c2341c2740c254cbc2d66bf3eeaba79677 run=39508598411

@claude

claude Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 5m 22s —— View job


Claude code review — code-review lane (incremental)

  • Gather context (incremental diff, rule files, REVIEW.md, closing issue)
  • Review gh-api.sh changes since 3b28094
  • Review aggregate-results/run.test.sh changes since 3b28094
  • Review check-contract/run.test.sh changes since 3b28094
  • Post findings

Summary

Incremental review scoped to the diff since 3b28094 (per .claude-lane/incremental.diff): gh-api.sh's GraphQL status-parsing hardening, plus the two new test cases pinning the __typename check in aggregate-results and the "errors beside valid data, exit 0" case in check-contract. Every other file in this PR was reviewed at 3b28094 and is unchanged since.

Traced each addition against the code it exercises:

  • aggregate-results/run.test.sh (new case, "a GraphQL run read that resolves to a non-WorkflowRun fails closed"): correctly exercises the __typename == "WorkflowRun" branch of resolve_workflow_id's trust check (aggregate-results/run.sh#L798-L799) with a distinct fixture (CheckRun typename, same run id) from the existing "resolves to another run" case right above it; both fail closed as expected and don't interfere with the fixture state the following case resets.
  • check-contract/run.test.sh (new case, "a GraphQL FORBIDDEN error beside a complete pull request fails closed"): merges a FORBIDDEN errors entry onto an otherwise-complete, already-passing pull request fixture and serves it with exit0 (gh exiting 0, as real gh does when the GraphQL body carries errors alongside partial data). This is a meaningful case, not a tautology: with the errors-detection in gh_api_once removed, gh exits 0, the complete pull-request body would be read and parsed successfully, and the run would wrongly print title=pass — exactly what expect_no_output 'title=pass' guards against.
  • gh-api.sh (GH_HTTP_STATUS regex guard): see the inline comment on line 123 — this new hardening has no test exercising the branch it changes (a non-numeric second field on the status line), unlike every other new behavior in this PR's diff, which the author's own verification table shows failing under a mutant. It's low-risk (only affects displayed HTTP code text, not the rate-limit/permission classification), so flagged rather than blocking.

No other correctness issues found in the reviewed diff. Security-shaped questions (trust boundaries around the GraphQL error classification) are out of scope for this lane — pr-review-security.yml runs a dedicated lane on this repo.

Verification note: I was unable to execute run.test.sh for either suite in this environment (script execution was not approved), so the above is based on static reading of the shim/test logic against the implementation, not an observed run. The author's own verification table (all tests pass, no exit code changed) is author-claimed and not independently re-run by me here.

claude-lane-summary: lane=claude-review sha=232ca8c2341c2740c254cbc2d66bf3eeaba79677 run=39508598411
· Branch

A GraphQL error under a malformed status line reports an unknown status
instead of the line's text.

Refs: #808

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 22s —— View job


Claude security review — claude-security-review lane (incremental)

  • Read .claude-lane/incremental.diff (changes since 232ca8c)
  • Review check-contract/run.test.sh changes
  • Adversarial check for fail-open regressions
  • Post findings

Scope

Per the lane's incremental instructions, this review covers only what changed since 232ca8c2341c2740c254cbc2d66bf3eeaba79677, in:

  • .github/actions/pr-require-checks/check-contract/run.test.sh

Every other file in this PR was reviewed at 232ca8c and is unchanged since.

Findings

No security issues found.

The only change is one new test case (check-contract/run.test.sh:1106-1116): "a GraphQL error under a malformed status line reports an unknown status." This is test-only code — it adds coverage for the GH_HTTP_STATUS numeric guard in gh-api.sh:123 ([[ "$GH_HTTP_STATUS" =~ ^[0-9]{3}$ ]] || GH_HTTP_STATUS="") that a prior incremental pass on this PR flagged as untested, via a review comment on gh-api.sh:123.

I traced the new case against the production code it exercises:

  • It serves a malformed status line (HTTP/2.0 2OO-bogus) alongside a GraphQL errors entry with no (HTTP nnn) on stderr (the feat!: convert reusable workflows to composite actions #2.102.0 shape this PR targets), forcing gh-api.sh to fall back to parsing the headers file.
  • awk 'NR == 1 && /^HTTP\// { print $2 }' extracts 2OO-bogus as $2; the regex guard correctly rejects it (letters O instead of digits) and clears GH_HTTP_STATUS back to "".
  • The assertion expect_log "...(HTTP unknown): Something went wrong." and expect_no_log '2OO-bogus' both follow correctly from that: check-contract/run.sh:186 renders ${GH_HTTP_STATUS:-unknown}, so an empty status reports unknown rather than ever surfacing the malformed raw text in a log line.
  • This guard only affects display text in ::warning::/::error:: annotations (confirmed in the prior incremental review of gh-api.sh); it does not feed the rate-limit/permission classification in gh_classify, which keys off GH_GRAPHQL_ERROR_TYPES and headers, not GH_HTTP_STATUS. No fail-open path is introduced or exercised by this test.

No production code changed in this increment, no instruction-surface deletions (CLAUDE.md/AGENTS.md/rules/skills), and no GitHub Actions trigger/permission changes (zizmor's lane) in this diff.

claude-lane-summary: lane=claude-security-review sha=553d7fc368bd93a2648ce7b53c2b24fc7a5b84ac run=39509474056
· Branch

@claude

claude Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 52s —— View job


Claude code review — code-review lane (incremental)

  • Read .claude-lane/incremental.diff (changes since 232ca8c)
  • Review new check-contract/run.test.sh case
  • Check path-scoped rules / standards relevance
  • Post findings

Scope

Per the lane's incremental instructions, this review covers only what changed since 232ca8c2341c2740c254cbc2d66bf3eeaba79677, in .github/actions/pr-require-checks/check-contract/run.test.sh. Every other file in this PR was reviewed at prior SHAs and is unchanged since.

Summary

The incremental diff adds exactly one new case: "a GraphQL error under a malformed status line reports an unknown status" (run.test.sh#L1106-L1115). This is the test a prior incremental pass on this lane flagged as missing (inline comment on gh-api.sh:123): the [[ "$GH_HTTP_STATUS" =~ ^[0-9]{3}$ ]] || GH_HTTP_STATUS="" guard had no case exercising a non-numeric status-line field.

I traced the new case against gh-api.sh and the shim in detail:

  • The fixture serves a GraphQL body with an errors entry and no .exit0 marker, so the shim's default gh 2.102.0 emulation applies: stdout carries the error body, stderr gets gh: Something went wrong. with no (HTTP nnn) tail, and the shim exits 1 (run.test.sh#L156-L160).
  • Because GH_HTTP_STATUS from gh_stderr's (HTTP nnn) pattern is empty, gh-api.sh falls into the header-line fallback it added, reading $2 of the HTTP/2.0 2OO-bogus status line — the letter "O"s make it non-numeric, so the new regex guard clears GH_HTTP_STATUS back to "" rather than leaving 2OO-bogus in place.
  • GH_MESSAGE is independently re-derived from the GraphQL errors[0].message (since GH_GRAPHQL_ERRORS=true), giving "Something went wrong." regardless of the status line.
  • The expected log line (HTTP unknown): Something went wrong. and the expect_no_log '2OO-bogus' assertion both follow correctly from check-contract/run.sh's "(HTTP ${GH_HTTP_STATUS:-unknown})" template.
  • Cleanup is correct: set_pull after the case rewrites $fixtures/${pull_key}.json from scratch via compose_pull_read, so the injected .errors key does not leak into later cases, and the .headers fixture is explicitly removed.

This is a well-targeted, non-tautological regression test — it would fail (serving the literal 2OO-bogus text in the error message) if the regex guard it exercises were removed. I was not able to execute run.test.sh in this environment (script execution wasn't approved), so this is a static trace through the shim and gh-api.sh logic, not an observed run; the author's own verification claims (all tests pass) are author-claimed and not independently re-run here.

No findings. No path-scoped rule under .claude/rules/ applies to this test file's content, and no correctness or maintainability issue met this lane's bar.
· Branch

claude-lane-summary: lane=claude-review sha=553d7fc368bd93a2648ce7b53c2b24fc7a5b84ac run=39509474056

@kyle-sexton
kyle-sexton merged commit 1bb8953 into main Oct 20, 2026
30 checks passed
@kyle-sexton
kyle-sexton deleted the perf/808-graphql-folding branch October 20, 2026 22:49
kyle-sexton added a commit to melodic-software/standards that referenced this pull request Oct 21, 2026
…829)

Refs: melodic-software/ci-workflows#818
Refs: melodic-software/ci-workflows#819

## Summary

Registers ci-workflows
[v0.56.0](https://github.com/melodic-software/ci-workflows/releases/tag/v0.56.0)
(`1bb8953644d16f21d10718962c6702f01ea3308a`) contracts for
`intake-triage.yml` and `intake-label-needs-triage.yml`.
[claude-code-plugins#8800](melodic-software/claude-code-plugins#8800)
repins both intake callers to that SHA, and its runner-policy gate fails
with `runner-target-contract: the reusable workflow path@SHA has no
reviewed runner-input contract (auto-approval declined: ... carries a
reviewed allowedCallerPermissions grant; its steps cannot be proven
unchanged by this surface diff, so auto-approval is declined)` for both.

**Owner sign-off pending.** The README rollout line says "sign-off
pending"; replace it with "signed off by hand on <date>" when you sign
off.

## Fix

- `components/runner-policy/policy.json`:
- `intake-triage.yml@1bb8953`: a verbatim copy of the v0.55.0 entry
(`3a2c748`).
- `intake-label-needs-triage.yml@1bb8953`: a verbatim copy of the
v0.42.0 entry (`182aca3`), the newest reviewed SHA for that file.
- `components/runner-policy/README.md`: the v0.56.0 rollout line,
sign-off pending.
- `components/runner-policy/runner-policy.test.mjs`: a test that both
v0.56.0 entries equal their source entries and that they are the only
two keys at that SHA.

### Byte-identity evidence

Git blob SHA of each file, from `gh api
repos/melodic-software/ci-workflows/contents/.github/workflows/<file>?ref=<sha>
--jq .sha`:

| File | `182aca3` | `3a2c748` (v0.55.0) | `1bb8953` (v0.56.0) |
|---|---|---|---|
| `intake-triage.yml` | `fa4e86f8` | `d79b7e9e` | `d79b7e9e` |
| `intake-label-needs-triage.yml` | `8d274a66` | `8d274a66` | `8d274a66`
|

`gh api repos/melodic-software/ci-workflows/compare/3a2c748...1bb8953`
is one commit
([ci-workflows#836](melodic-software/ci-workflows#836))
touching nine files, all under `.github/actions/pr-require-checks/` plus
`README.md`; neither intake file is among them. Against `182aca3`, the
compare lists `intake-triage.yml` as modified (that file's reviewed SHA
is `3a2c748`, not `182aca3`) and not `intake-label-needs-triage.yml`.

No input, secret, caller permission, or `runs-on` routing changes.

## Verification

- `npm run test:runner-policy`: 323 pass, 0 fail, including `✔ both
intake contracts at the v0.56.0 tag copy their reviewed entries forward
verbatim`. Adding an input to the new `intake-label-needs-triage` entry
makes that test fail.
- `npm run lint:runner-policy`: `Runner policy passed.`
- Against the claude-code-plugins#8800 worktree
(`--repository-visibility public`, worktree not modified):
- with its vendored policy: the two `runner-target-contract` failures
above, and no others;
- with `--policy` set to this branch's `policy.json`: `Runner policy
passed.`;
- with this branch's `runner-policy.mjs` and `policy.json`: `Runner
policy passed.`
- Every other ci-workflows reusable that #8800 calls stays on a SHA that
already has a contract (`pr-review` and `pr-review-security` at v0.48.0,
`maintenance-check-links-online` at v0.55.0). The other v0.56.0 pins are
composite actions, which need no contract.
- lefthook pre-commit (typos, editorconfig, markdownlint, gitleaks,
biome): clean.

## Related

-
[claude-code-plugins#8800](melodic-software/claude-code-plugins#8800)
passes its runner-policy gate once this merges and syncs.
- Precedent: #828 (v0.55.0 verbatim copies), #811, #802.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Tje1j8KEYaYSxYe8RgJ3Lw

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

perf(pr-require-checks): fold ci-status and pr-contract REST reads into one GraphQL query per job

1 participant