Skip to content

feat(ticket-audit): audit a GitHub Issues tracker (#59, part D) - #124

Merged
mmaclay merged 8 commits into
mainfrom
feat/59-github-issues-audit
Nov 7, 2026
Merged

mmaclay merged 8 commits into
mainfrom
feat/59-github-issues-audit

Conversation

@mmaclay

@mmaclay mmaclay commented Nov 7, 2026

Copy link
Copy Markdown
Member

Part D of #59. Parts A (#113, #115) and B (#116) have merged. Part C, onboard detecting GitHub Issues, has its own branch and is still open, so this PR does not close #59.

What it does

On a project whose tracker is GitHub Issues (issue_tracker.kind: github), ticket-audit runs two sweeps and gives each of the other three one line:

  • duplicates lists the open issues and pairs issues that ask for the same thing. For each pair it recommends which issue to keep and whether the other should be closed as a duplicate or merged in. It also flags stale issues that existing work already satisfies. To find the pull requests that name an issue, it searches origin's pull requests, since those live in origin and not in the tracker's repository.
  • pulls checks each open pull request against the issue its Ticket: line names. A pull request gets one of four findings:
    • it names no issue;
    • its line names another tracker's ticket;
    • its issue is closed;
    • its issue is open but has no approved or implementation label.

Writes go through the existing write plan and issue gate (skills/using-github/issues.md). The issues' repository is taken from origin and never guessed.

Also in this PR

  • scripts/save_page.py now saves a result that arrives as one text block. This partly reverses d30fb671. It could be split into its own PR if the reviewer prefers.
  • docs/contracts.md "The ticket shape" goes to version 3: ticket-audit reads issue_tracker.roles on a GitHub tracker.

Review

Three adversarial review rounds; the last found 0 blocking issues. Every should-fix from rounds 1–3 has been applied. bash tests/checks.sh --all passes on Python 3.13 and 3.9.

Origin: #59
Sandbox: Haiku, branch vs. current plugin. tracker-gh-audit-duplicates: 9/10, then 3/3 after the gate fix (baseline 0/1). tracker-gh-audit-declined: 3/5, then 5/5. tracker-gh-audit-pulls: 2/2 after the save_page fix. The round 2–3 wording changes (the origin pull request search, the no-issue boundary, and the tighter #18 check) were not rerun in the sandbox.
Canary: none

🤖 Generated with Claude Code

mmaclay and others added 8 commits November 6, 2026 23:09
…uests

On a GitHub tracker, ticket-audit runs the duplicates sweep over the
repository's open issues and the pulls sweep against each pull request's
issue, read from its Ticket: line; planned, links and estimates say in one
line that they do not apply. Apply closes issues, with state_reason and
duplicate_of, through the GitHub write plan and the issue gate on a yes.

The tracker-github pack gains three audit scenarios, and its stub serves
list_pull_requests and pull_request_read for open pull requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uess

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude Code 2.1.319 passes a PostToolUse hook a stdio or plain HTTP MCP
server's result as a list of one text block, so pr-reader could not dump a
pull request the GitHub tracker pack's stub serves. The block's text is the
server's text as sent; any other list is still refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into feat/59-github-issues-audit

# Conflicts:
#	README.md
The duplicates scenario accepts only #19 closed into #18. source-reader
reads a GitHub role from issue_tracker.roles and searches the pull requests
naming each issue of a pair. github.md spells out which Ticket: lines are
the tracker's and recommends a sweep. The stub's list_pull_requests matches
a head by its branch, a fixture pull request names the open #18, #20 no
longer shares by_part's words, and tracker-gh-work-pr says the stub refuses
a closed pull request's read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The duplicates sweep searches origin's pull requests for an issue, in
the form origin's bodies write it, URL form included. The pulls sweep's
"names no issue" finding covers a Ticket: line from which no issue is
read, and leaves another tracker's link to the correct-the-line finding.
The scenarios require the pull request search and tie #18 to its
approval finding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmaclay
mmaclay marked this pull request as ready for review November 7, 2026 17:18
@mmaclay
mmaclay merged commit 25ef7bd into main Nov 7, 2026
1 check passed
@mmaclay
mmaclay deleted the feat/59-github-issues-audit branch November 7, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracker role: GitHub Issues as a tracker adapter

1 participant