Skip to content

Wait for the pushed head's CI before a resolution or implementation reports success #77

Closed

Description

@datacas

Problem

On PR #74 (issue #72), cc-resolve-comments pushed its fix commit and reported the resolution as finished based on local verification: 642 tests and the validator passed. All four CI checks then failed, on Linux and Windows. Two new tests committed inside a fresh clone that doesn't inherit the test repository's local git identity. On the developer machine a global identity hid this; CI runners have none.

The skill already says, in Mandatory post-change workflow step 6, to inspect checks "if the branch was updated and checks exist". It doesn't say to wait for the checks of the pushed head, or what a failing check means for the functional status. So the stage can return RESOLVED while the head it produced is red, and the failure only surfaces a whole round later, in cc-rereview. cc-implement-issue has the same gap after it opens the PR.

Expected

For cc-resolve-comments, and cc-implement-issue after its push:

  1. After pushing, wait for the checks of the pushed head SHA (not an earlier run), bounded by a timeout. The default is to wait while checks are queued or running, up to about 15 minutes, and repository instructions may state their own. For GitHub: gh pr checks <n> --watch, or poll statusCheckRollup filtered by headRefOid.
  2. Check results change the functional status:
    • all required checks pass → the local result stands;
    • a check fails and the cause is within the stage's scope, such as its own tests or code → fix it in the same stage, push, and wait again. This counts toward the stage's own attempt limit, not the cycle's iterations;
    • a check fails for a reason outside the stage's scope (infrastructure, an unrelated flaky suite) → report PARTIALLY_RESOLVED (or BLOCKED for implement), naming the check and the reason;
    • the timeout expires with checks still pending → report the pending checks by name. The status must not claim they passed.
  3. Before waiting, run the tests in a CI-like way when that is cheap. For example, don't rely on user-global configuration such as the git identity, ~/.gitconfig, or local credentials that CI doesn't have. The resolver should state which environment assumptions its local run shares with CI and which it doesn't.
  4. The structured result and the published summary carry the checks of the final head: names, states, and the SHA they ran on.

Acceptance

  • cc-resolve-comments and cc-implement-issue contain the rule above (the validator still passes, and the duplicated sections stay in sync if touched).
  • The runtime records, on the verdict row, whether the stage's head had passing required checks when it finished (checks_passed / checks_failed already exist as fields but no stage reports them). cc-stats can then show how often a "resolved" head was actually green.
  • Documented in docs/verification.md → CI reporting.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions