Skip to content

pr-issue-linkage gate conflicts with deliberately unlinked PRs, making them permanently red and rung-ineligible #1396

Description

@kyle-sexton

Filed by the autonomous babysit merge lane (AI-generated) after hitting it twice in one session on two unrelated PRs.

The conflict

The pr-issue-linkage check fails any PR without a close-linked issue. But the repo has at least two legitimate, documented workflows that deliberately produce PRs with no close-link — and for those, the gate is not catching a mistake, it is fighting a decision the author made on purpose and explained in the PR body.

Case 1 — topic-tracked lane work. PR #1349:

No linked issue — this PR is lane L3 of the context-engineering-rightsizing topic effort, which is tracked in docs/topics/context-engineering-rightsizing/ rather than as a filed GitHub issue.

Case 2 — deliberately-not-closed refs. PR #1264:

Refs #787 — the originating report. Deliberately not closed. Its causal premise is falsified [...] and its substantive ask [...] is not delivered by this PR.

Case 2 is the sharper one: the author did the right thing. They found the originating issue's premise was falsified, re-scoped the PR to what it actually delivers, split the remainder into #1387, and refused to auto-close an issue the PR does not resolve. The gate punishes exactly that diligence.

Why it matters beyond a red check

For any lane running the loop-lane autonomy ladder, the close-link is not cosmetic — it is what carries the work-class classification. The rung partition reads the close-linked item's work-class: label to decide merge eligibility. No close-link means no class, which means not eligible at any rung, including full-autonomy.

So these PRs are in a permanent double bind:

  1. CI is red forever, on a check that will never pass without changing the authoring decision.
  2. No autonomous lane can ever merge them, at any autonomy level.

They can only ever be merged by a human, and the red check makes that human's job harder by looking like a real failure.

There is also a trap for autonomous lanes here, which is why this lane stopped rather than "fixing" it: adding a close-link to clear the check would mean the lane choosing the work item for the PR, and thereby manufacturing its own merge eligibility. That is exactly the thing the merge lane must never do, so the correct behavior is to leave both PRs permanently red — which is not a good steady state for the repo.

Possible directions (not a decision)

  • Let a PR declare an intentional exemption the gate honors — an explicit body marker or a label — so the decision is machine-readable instead of prose the gate cannot read.
  • Teach the gate to accept a docs/topics/<slug>/ tracking reference as a valid linkage target, covering case 1.
  • Distinguish "closes" from "refs" in the gate: require some issue relationship, but do not require it be a closing one. This covers case 2 without weakening the check.
  • Decide, separately and explicitly, how the autonomy ladder should classify work that is legitimately not issue-tracked — today the answer is "never merges autonomously", which may be intended, but is currently an emergent side effect rather than a stated policy.

Notes

Both PRs were left untouched and report-only. Nothing was merged, no link was added, no label was changed.

Deliberately filed without a work-class label; that classification belongs to triage.

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

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.work-class: structuralRefactors, migrations, contract changes; cross-cutting and hard to reverse.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions