Skip to content

queen: reconcile issue state from PR linkage -- completed-but-open issues close one at a time, with evidence #9968

Closed as not planned

Description

@gHashTag

Part of the dispatch roadmap epic #9976. Industry reference and the measured gap are below.

Measured 2026-10-17: 508 open issues are skipped as completed every tick. The work is merged but the issue stayed open, so they pollute every count and every board. A bulk close was reverted by the owner on 2026-10-07; closing must be one issue at a time, each with the PR that did it.

Industry reference: a Kubernetes controller is a reconcile loop -- it compares desired with observed state and issues the smallest fix, idempotently, one object at a time, rate-limited.

User Scenarios

  • As the Queen, when an open issue's work was merged by a PR that names it, I close it with a comment linking that PR and its merge commit.
  • As the owner, I never see a bulk close: closes are rate-limited and each one carries its evidence.

Requirements

  • close_decision(issue_open, linked_pr_merged, pr_names_issue, open_followups, is_epic) -> u8 with named reasons (close, keep-epic, keep-followup, keep-no-evidence).
  • An epic or tracking issue is never closed by this rule.
  • A CLOSES_PER_HOUR cap as a named constant, with its reason in a comment.

Success Criteria

  • Tests for every reason, including an epic whose sub-issues are all done (stays open) and a PR that only says Refs #N (no close).
  • Invariant: no close without a merged PR.
  • 0 surviving mutants.

Rules for the bee

Boundary

  • specs/queen/reconcile.t27
  • .trinity/seals/queen_QueenReconcile.json

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 17, 2026
  2. github-actions commented on Oct 17, 2026

    @github-actions
    Contributor

    Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.

    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
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

    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions