ceremony/changelog.d/199.md
clad2 4e28d437d6 fix(refs-not-closing): gather over REST, so the guard produces verdicts here
The action's entire gather was one GraphQL query asking GitHub for its own
parse of the closing keywords. Forgejo serves no GraphQL at all — /api/graphql
404s here and a forgejo-runner job arrives with GITHUB_GRAPHQL_URL empty — so
there was nothing to translate it to. It is re-expressed, as #188 re-expressed
its own two GraphQL sites, over two reads both backends serve plus this repo's
own parser.

The graph was called authoritative for including "closing keywords and sidebar
links". Those halves resolve differently here: Forgejo has no sidebar-link
concept, so nothing is lost there, but it DOES honour closing keywords in
commit messages. A body-only port would miss a PR that closes an issue from a
commit subject — exactly the contradiction this action exists to catch — so
the closing set unions the body and every commit message.

The hasNextPage refusal is relocated, not dropped: --paginate carries the
forgejo backend's x-total-count completeness proof, and a short gather refuses
rather than returning a partial verdict.

lib/issue_references.sh extracts the LOCAL/CROSS classifier from
issueflow-reconcile's executable. closes_references.sh's header recorded that
dependency in prose; a composite action cannot source a reconciler to borrow
one function, because sourcing a reconciler runs one.

refs-guard.yml's github-only gate is removed in the same change. A portable
action behind that gate is a guard that passes by never running.

The contract test drives the boundary on BOTH backends with stubs at the
transport. Mutations: body-only parse reds 4 cases, dropping --paginate reds
the partial-gather case, ignoring a failed read reds 9.

Refs #199
2026-08-05 17:11:19 +00:00

1.6 KiB

Fixed

  • actions/refs-not-closing gathers over REST through the forge shim instead of one GraphQL query, so it produces a real verdict on Forgejo — which serves no GraphQL surface at all — rather than refusing (#199).

  • The closing set is parsed by lib/closes_references.sh over the PR body and every commit message, unioned. Forgejo honours closing keywords in commit messages, so a body-only port would miss a PR that closes an issue from a commit subject (#199).

  • The hasNextPage refusal is carried onto the paginated commit read: an incomplete gather refuses instead of returning a partial verdict, reusing the backend's x-total-count completeness proof (#199).

  • A failed read never reaches the parser. An unread body parses to an empty closing set, which is a passing verdict the action never earned (#199).

  • .github/workflows/refs-guard.yml no longer gates the job on the forge. A portable action behind a github-only gate is a guard that passes by never running (#199, #198).

  • The CEREMONY_FORGE_CLIENT=gh declaration is gone, and the contract test asserts its absence: an opt-out with no gh behind it is a standing permission slip (#199).

Added

  • lib/issue_references.sh — the LOCAL/CROSS classifier, moved out of actions/issueflow-reconcile's executable so a second caller can use it without sourcing a reconciler, which would run one (#199, #61).

  • test/refs-not-closing.test.sh drives the action's boundary on both backends with stubs at the transport, proving one fixture yields the same verdict on each — including a closing keyword that appears only in a commit message (#199).