Skip to content

01a09004 - Confirm Guard Ready mutations against REST draft - #93

Merged
TaprootFreak merged 1 commit into
developfrom
fix/01a09004-guard-ready-rest-verify
Sep 11, 2026
Merged

TaprootFreak merged 1 commit into
developfrom
fix/01a09004-guard-ready-rest-verify

Conversation

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
After GraphQL reports a successful Ready or Draft mutation, the guard re-reads the REST draft field before recording the transition as applied.
HTTP 200 with a matching GraphQL isDraft is not enough if REST still shows the old value.
This is confirmation only; token permissions stay on the consumer workflow.

DE:
Nachdem GraphQL eine erfolgreiche Ready- oder Draft-Mutation gemeldet hat, liest der Guard das REST-Feld draft erneut, bevor er den Wechsel als applied verbucht.
HTTP 200 mit passendem GraphQL-isDraft reicht nicht, wenn REST noch den alten Wert zeigt.
Das ist nur die Bestätigung; Token-Rechte bleiben im Adopter-Workflow.

Details

_transition still performs the GraphQL mutation and its existing checks. reconcile_lifecycle then GET /repos/{owner}/{repo}/pulls/{n}. If draft is missing, non-boolean, or not the intended state, the scan fails closed and does not write the applied lifecycle comment.

Tests cover GraphQL Ready success that does not update REST draft, and a non-boolean REST draft after GraphQL success.

Do not confuse this with the separate contents: write requirement for GITHUB_TOKEN / markPullRequestReadyForReview. That permission lives on the adopting workflow.

@TaprootFreakAI

TaprootFreakAI commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 1 review pass.
After a GraphQL Ready or Draft mutation reports success, the guard re-reads REST draft before recording the transition as applied.

DE:
Bereit nach 1 Review-Durchlauf.
Nach einer erfolgreichen GraphQL-Ready- oder Draft-Mutation liest der Guard REST-draft erneut, bevor er den Wechsel als applied verbucht.

Details

Head a53e6fcc663719f99a6bc4e8cbc81e0631ef222d. Mergeable. Pytest SUCCESS on this head (GitHub Actions run 34591080806; build-host 1764 passed, 3 skipped).

Comment gate: no review threads, no inline review comments, no human review requests. The only issue comment is this wrap-up.

Codex quality reported two items that are not counted: REST after the Ready head/base restore already fail-closes via GraphQL and never writes applied; extra Draft/missing-draft tests are not required because the REST predicate is shared and covered by the Ready stale and non-boolean cases.

No required status checks on develop (branch protection 404, ruleset list empty). The expected pull_request workflow test / job pytest ran and passed.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 11, 2026 11:18
@TaprootFreak
TaprootFreak merged commit a1e9df0 into develop Sep 11, 2026
1 check passed
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.

2 participants