Repository navigation
feat(runner-policy): add scheduled caller for standards-sync-stuck-automerge-alert - #251
Merged
Merged
Conversation
…tomerge-alert standards owns the sync trigger point and already holds the App secrets sync.yml uses, so it hosts the scheduled caller for the new stuck-automerge watchdog reusable (melodic-software/ci-workflows#213) rather than medley. Pinned SHA and runner-policy contract are provisional: they target the reusable as it exists on merged #213, which authors its tracking issue with the caller ambient GITHUB_TOKEN and therefore needs a caller-granted issues:write. That combination cannot satisfy runner-policy's write-caller-permissions invariant (identity-passthrough-only secret mapping) against this reusable's kebab-case app-client-id/app-private-key inputs, so this PR opens as a draft blocked on melodic-software/ci-workflows#223, which moves the reusable's issue writes onto a self-minted App token. The workflow file and policy entry are written for the eventual post-#223 shape (no caller issues:write, no allowedCallerPermissions waiver); only the pinned SHA needs to flip once #223 merges. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KYvF6bWGqemS9aYFfWJRiW
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Warning Automated review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-running the job, or pushing a new commit, will retry the review. |
… SHA melodic-software/ci-workflows#223 merged (43bc8d0), moving the reusable's tracking-issue writes onto a self-minted App token. Flip the caller pin and its policy.json contract key to that SHA now that the blocker is resolved; no other change needed (the caller was already written for this shape: no issues:write, no allowedCallerPermissions waiver). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KYvF6bWGqemS9aYFfWJRiW
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
kyle-sexton
marked this pull request as ready for review
July 22, 2026 21:22
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
kyle-sexton
added a commit
to melodic-software/ci-workflows
that referenced
this pull request
Jul 24, 2026
…to a cheap page fetch and a per-candidate merge-state probe with retry (#234) Closes #226 ## Summary - Splits the stuck-automerge scan into two phases so the hourly cron stops dying on GitHub's opaque server-side GraphQL error: phase 1 pages open PRs selecting only `number`/`url`/`author`/`autoMergeRequest { enabledAt }` (no `mergeStateStatus`), phase 2 probes `mergeStateStatus` one PR at a time via `repository.pullRequest(number:)`, and only for armed, past-threshold bot PRs. - Wraps every GraphQL call in `graphqlWithRetry` — exponential backoff (`GRAPHQL_RETRY_ATTEMPTS=4`, `GRAPHQL_RETRY_BASE_MS=1000`, both step-env-tunable), rethrowing the last error on exhaustion so a persistent failure still fails the run loudly. On a throw the `stuck-count` output is never set, so the close-issue branch cannot fire a false all-clear. - Retains the existing manual-cursor pagination and `MAX_PAGES` soundness guard unchanged; "stuck" semantics are preserved (the `BLOCKED` check moved from the bulk page filter to the per-candidate probe). - No changes to the trigger surface, App-authored issue identity, `uses:` SHA pins, or permissions blocks. ## Test plan - `node --test .github/scripts/*.test.cjs` (CI's exact command): 257/257 pass, including 24 in `standards-sync-stuck-automerge-alert.test.cjs` — new coverage asserts the page query never selects `mergeStateStatus`, exactly one phase-2 probe per candidate (no bulk fan-out), transient-error retry on both page fetch and probe, and persistent-error loud failure with no false all-clear. - `actionlint` on the changed workflow: clean. - `biome check` (CI config/scope): clean. - Post-merge follow-through: the phase-2 query shape is mock-validated only — confirm ≥2 consecutive green scheduled runs against the real fleet (the issue's remaining acceptance criterion). ## Related - Refs melodic-software/standards#251 — deployment PR for the failing hourly caller - Refs #224 — comment-events opt-in context named by the issue - Refs #223 — prior fix on the same workflow (App-authored issue identity), deliberately untouched here 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No related issue: caller rollout for merged melodic-software/ci-workflows#213 (issue #210 closed)
Related
ci-workflows#210, ci-workflows#213, ci-workflows#223
Summary
sync.ymluses, so it hosts the scheduled caller for the stuck-automerge watchdog reusable added in feat(standards-sync): arm auto-merge at PR creation and alert on stuck armed PRs ci-workflows#213, rather than medley.dd45dacd7b74dd05f3334b78769e57225f7356d8) is the reusable as merged in .gitignore is baseline-shaped but not a managed component #213, which authors its tracking issue with the caller's ambientGITHUB_TOKENand therefore needs a caller-grantedissues: write. That combination cannot satisfyrunner-policy's write-caller-permissions invariant (identity-passthrough-only secret mapping, no hyphens) against this reusable's kebab-caseapp-client-id/app-private-keysecret inputs — see feat(claude-permissions): add loop-lane tooling and babysit grants to allow floor #223 for the full diagnosis and the fix (the reusable mints its own App token for issue writes instead).policy.jsonentry here are already written for the post-feat(claude-permissions): add loop-lane tooling and babysit grants to allow floor #223 shape: no callerissues: write, noallowedCallerPermissionswaiver, secrets-only contract. Only the pinned SHA (in both the workflow file and the policy.json key) needs to flip to feat(claude-permissions): add loop-lane tooling and babysit grants to allow floor #223's merge SHA once it lands — no other change.Test plan
npm run test:runner-policy— 228/228 passnpm run lint:runner-policy— Runner policy passedactionlint .github/workflows/standards-sync-stuck-automerge-alert.yml— cleanzizmor .github/workflows/standards-sync-stuck-automerge-alert.yml— no findingsnpx biome check components/runner-policy/policy.json— no fixes needed🤖 Generated with Claude Code
https://claude.ai/code/session_01KYvF6bWGqemS9aYFfWJRiW