Skip to content

fix(ci): the fail-to-pass check runs only on pull requests into a release branch, not on the release pull request into main #1721

Closed

Description

@dan-petty

Friction

The release pull request for v0.2.37 (#1720, release/v0.2.37 → main) fails its Fail-to-Pass Check. The check replays the release's changed tests on main's tree, with the release's tests/ laid over main's src/. The release's tests/support/bootstrap.py imports defines_fixture_or_hook, which main's src/devops_cli/core/test_selection.py doesn't have yet, so pytest stops with an INTERNALERROR. Since #1669 (#1718), a replay that can't run fails the check for any pull request.

For a release pull request the replay can't mean anything. Every item it carries already passed its own fail-to-pass check against the release branch. And any release that changes the test harness, which v0.2.37 did through #1312, makes the replay unrunnable against main. Before #1718 the same replay reported "0 failed and 0 passed; 0 errored" and passed in silence.

Evidence

Run 39425010929 on #1720, head f7aef65: "The fail-to-pass replay could not run on base: pytest exited with status 3 replaying tests/test_agent.py, … pytest's last output: INTERNALERROR> ImportError: cannot import name 'defines_fixture_or_hook' from 'devops_cli.core.test_selection'".

.github/workflows/fail-to-pass.yml runs on pull requests into main and release/**, with no exception for release pull requests. The release pull request's body comes from _build_release_pr_body (src/devops_cli/release/cut.py), and it declares no escape line.

Remedy

Don't run the check where it doesn't apply. .github/workflows/fail-to-pass.yml triggers on pull requests into release/** only, so the release pull request into main no longer runs it. Nothing is added to the tool or to the release pull request.

Acceptance criteria

  • Tests first: the workflow contract (tests/test_workflow_contracts.py) expects branches: ["release/**"].
  • feat(release): v0.2.37 #1720 shows no Fail-to-Pass Check on its next head.
  • uv run devops ci passes.

Activity

  1. added
    source/agent
    type/bug
    on Oct 20, 2026
  2. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate fixes a problem with the fail-to-pass check on release pull requests, which is a bug fix.
    • Priority: P2-Medium. This issue affects the release process and CI checks but does not block core functionality or introduce security concerns. The failed run 39425010929 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 on the board.
    • Value: Medium. Fixing the fail-to-pass check for release pull requests improves the reliability of the release workflow for users.
    • Effort: Low. The fix involves adding an escape line to the release pull request body, which is a minimal code change.
  3. added this to the v0.2.37 milestone on Oct 20, 2026
  4. added
    status/in-progress
    on Oct 20, 2026
  5. changed the title [-]fix(release): the release pull request declares fail-to-pass not applicable, since its items each passed the check against the release branch[/-] [+]fix(ci): the fail-to-pass check runs only on pull requests into a release branch, not on the release pull request into main[/+] on Oct 20, 2026
  6. added 2 commits that reference this issue on Oct 20, 2026
    537e73d
    4e61562
  7. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1722, merged into release/v0.2.37 as 4e61562.

    This fixes the failing Fail-to-Pass Check on the v0.2.37 release pull request (#1720) by no longer running the check there. The workflow now triggers only on pull requests into a release branch.

    Why #1720 failed. The check replays a pull request's changed tests on its base. On #1720 that base is main, so the release's tests/ were laid over main's src/. The release's tests/support/bootstrap.py imports defines_fixture_or_hook, which main doesn't have yet, so pytest stopped with an INTERNALERROR (run 39425010929). Since #1669 (#1718), a replay that can't run fails the check.

    Why skip it on main. The check exists for item pull requests into a release branch, where each item proves its fix. The release pull request into main carries items that each already passed it, and a release that changes the test harness can't replay on main's tree at all. So on main the check can only fail, or prove nothing.

    The change.

    • .github/workflows/fail-to-pass.yml: branches: ["release/**"], where it was [main, "release/**"].
    • tests/test_workflow_contracts.py pins the trigger.
    • Task-844's record of the trigger is updated.
    • Nothing is added to the tool or to the release pull request's body.

    5 file(s) changed.

    How it was verified

    Check runs at 537e73d:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Fail-to-Pass Self-Check: pass
    • Fail-to-Pass Check: pass
    • Tests & Coverage: pass
    • Rule Pack Tests: pass
    • Analyze (python): pass
    • Analyze (actions): pass
    • Static Analysis: pass
    • Changed-Test Independence: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1721-fail-to-pass-runs-on-release-branch-pull-requests.md:

    • Tests first: the workflow contract expects branches: ["release/**"]; it failed on the base with ['main', 'release/**'] != ['release/**'].
    • uv run devops ci passes (pre-push hook).
    • Pending a person: feat(release): v0.2.37 #1720 shows no Fail-to-Pass Check on its next head.
  8. removed
    status/in-progress
    on Oct 30, 2026
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions