Skip to content

fix(loop): rung 1 can never call a claude-workflow PR green, because this repo runs no CI #29

Closed as not planned

Description

@sydevs-bot

Summary

Rung 1 will not merge without green CI. claude-workflow has no CI at all — there is no .github/workflows/ here — so no PR in this repo can ever satisfy that clause, under either the old get_status reading or the corrected get_check_runs one in #26/#28.

Measured on this repo's own PR #28, opened minutes ago:

pull_request_read method:get_check_runs  sydevs/claude-workflow#28
  → {"total_count": 0, "check_runs": []}

pull_request_read method:get_status      sydevs/claude-workflow#28
  → {"state": "pending", "total_count": 0, "statuses": []}

ls .github in the checkout → No such file or directory.

Why this is worth a ticket rather than a shrug

The repo's own CLAUDE.md already says the right answer out loud:

Open the PR; never merge it. Merge authority is an approving review plus zero unresolved threads — never a label, and there is no CI here to be green.

So the outcome — the loop not merging here — is correct. What is wrong is the path to it: rung 1 reaches that outcome by concluding "CI is not green", which is indistinguishable from a PR whose tests are still running. The table's verdict for that row is "Do not merge. One comment naming which of the three clauses failed" — so an approved claude-workflow PR gets a comment on every run saying its checks have not finished, forever, for checks that do not exist.

That is the same shape as the SahajAtlasWeb#181 half of #26 (a healthy PR the loop declines on every pass), except here it is guaranteed rather than incidental, and it lands on the loop's own self-improvement PRs — the ones a reviewer is most likely to be waiting on.

Approach

Three options, cheapest first. I have no strong preference and would rather you pick.

  1. Say it in the skill. Rung 1 gains a row: a repo with no CI configured is not "not green" — its gate is the approving review plus zero unresolved threads. Cheap, but it puts a repo fact in prose, and the skill deliberately hard-codes nothing.
  2. Say it in loop-config.json. A reposWithoutCI list (or a per-repo hasCI: false), read by rung 1. Matches the existing rule that a tuning fact is a data edit reviewable on its own — but it is a fact that can go stale silently the day someone adds a workflow.
  3. Derive it. Rung 1 already reads .claude/workflow.json per repo; leanGate.command here is the plugin validator and packageManager is "none". Nothing currently states "no CI" though, so this still needs a key — it just puts it beside the repo's other settings rather than in the loop's config.

⚠ Whichever is chosen, the loop still must not merge here — CLAUDE.md is explicit, and this ticket does not propose changing that. The ask is only that rung 1 stop reporting a missing CI as an unfinished one, and stop commenting about it every run.

Notes

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

Activity

  1. Ardnived commented on Sep 2, 2026

    @Ardnived
    Contributor

    Go with approach 3, and then implement

  2. sydevs-bot commented on Sep 2, 2026

    @sydevs-bot
    ContributorAuthor

    Not implementing this — your PR #30 already carries it, and its approach is better than the one you picked here. Handing the ticket back to you; it closes when #30 lands.

    You said "go with approach 3" at 16:22 and opened #30 at 16:34, whose lib/merge-gate.mjs derives the answer from the repo's workflow count (claude-workflow → 0). That is approach 3 without the part that would have hurt: it needs no new key anywhere.

    Two reasons that matters, both of which I'd have hit building it myself:

    • Approach 3 as written puts a key in .claude/workflow.json, which is a Protected Path. A write there does not error in an unattended run — it waits, invisibly (CLAUDE.md § "Protected paths"; one WeMeditateWeb run burned ~75 minutes that way). I'd have had to move the key to loop-config.json and depart from the approach you approved.
    • Deriving from the workflow count cannot go stale. It answers correctly the day someone adds .github/workflows/ here, where any stored key — in either file — would keep saying "no CI" until a human noticed.

    #30 also closes the hole that derivation opens, which this ticket did not think of: mergePolicy.loopMayNotMerge: ["claude-workflow"]. Without it, "no CI configured" reads as green and every approved PR in this repo becomes a merge candidate — in the one repo where merging is the deploy of the instructions the next run executes. This ticket asserted the loop still must not merge here but proposed nothing to enforce it, so a straight reading of approach 3 would have shipped exactly that regression.

    Nothing needed from me unless #30 changes shape.

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


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Hold Until

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions