Skip to content

fix(loop): the merge gate reads commit statuses, which are not where our CI reports #26

Closed

Description

@sydevs-bot

Summary

Rung 1 of workflow/skills/loop-run/SKILL.md reads CI with pull_request_read method:get_status. That call returns commit statuses, and our CI does not post commit statuses — it posts check runs, because every repo runs GitHub Actions. The two are separate GitHub surfaces and get_status cannot see check runs at all.

Measured tonight on two live PRs, and it fails in both directions:

PR get_status get_check_runs
sydevs/SahajAtlasWeb#181 state: "pending", total_count: 0, statuses: [] 5 of 5 conclusion: "success"
sydevs/SahajCloud#672 state: "success", total_count: 1 1 of 1 success

The SahajCloud row is the dangerous one. Its single "success" status is Railway's deploy (context: "sahajcloud - SahajCloud", created_at: 2026-09-01T21:14:17Z). The actual test job — Lint, Test & Smoke — is a check run that did not finish until 21:31:40Z, seventeen minutes later. Between those two timestamps get_status said success while the test suite was still running. A rung-1 run that woke in that window on an approved PR would have merged code whose tests had not completed, and would have been following the skill exactly.

The SahajAtlasWeb row is the harmless-but-wrong direction: an approved PR with all five checks green reads as pending forever, so the loop would comment "CI still running" on every run and never merge it.

Found while reading PR #181's state to write tonight's journal, not by going looking — filing per the incidental-finding rule in loop-run/SKILL.md § Rung 5.

Approach

In workflow/skills/loop-run/SKILL.md, Rung 1:

  • Add pull_request_read method:get_check_runs beside the existing two calls.
  • State the definition of green explicitly, because neither call alone is it: every check run has conclusion: "success", and every commit status has state: "success", and there is at least one check run. The "at least one" clause is what stops an empty check_runs array reading as green on a repo where Actions did not schedule a run — which is exactly the shape a merge conflict produces in SahajCloud (CLAUDE.md → "A conflicted PR runs NO CI at all").
  • Say plainly that a commit status is a deploy signal here, not a test signal, so a green get_status is never sufficient on its own.

ciPollAttempts and the /finalize-pr step-8 poll read the same call and need the same change; check that skill too.

Acceptance criteria

  • Rung 1's table names get_check_runs as the source of CI truth and get_status as a supplementary signal.
  • The skill states the green definition above, including the "at least one check run" clause.
  • /finalize-pr's CI watch reads check runs rather than statuses.
  • claude plugin validate ./workflow --strict passes.

Verification checklist

Notes

  • No ticket covers this: search_issues repo:sydevs/claude-workflow is:issue is:open -label:ops-journal returns only chore(loop): read Relationships directly once the MCP tools are reachable #3.
  • This is a prose change to a skill, so it cannot be validated by running it — CLAUDE.md § "You cannot validate a change by running it". The evidence available before merge is the four tool calls in the table above; the PR body should carry them.
  • **/*.md is in prAllowlistGlobs, so this could ship ticketless. It is filed anyway because the reasoning is worth having somewhere a PR body would bury it, and because the merge gate is the one rule in the skill that is a safety property rather than a preference.

🤖 Written by the sydevs autonomous loop — see what this is

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

Critical

Hold Until

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions