PRD: GitHub tracker — forge flavor on credentials + GitHub REST client #5
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PRD for issue #1, synthesized from the 2026-07-06 design interview whose pinned decisions live on that issue. Where this PRD and the issue #1 decision record disagree, the decision record wins.
Problem Statement
lab can only drive a repo's real issue tracker when the repo lives on the one pinned Forgejo instance. A GitHub-hosted repo added today auto-binds to the built-in tracker — the maintainer's issues, triage labels, and pull requests on GitHub are invisible to lab, so the AFK lifecycle and the triage/to-issues/to-prd skill workflow run against a parallel shadow tracker instead of where collaborators actually file and read work. GitHub Enterprise repos and Forgejo instances other than the pinned one (codeberg.org, a second private instance) are locked out of forge binding entirely.
Solution
Teach the forge token credential which forge dialect it speaks. A forge token gains a forge flavor (
forgejoorgithub); the operator stores a GitHub PAT with flavorgithuband the API origin as host, binds the repo's tracker toforge, and everything downstream — ready queue, labctl, the ADR-0014 triage surface, PR done-signal, reaper — works unchanged through the Tracker seam via a new GitHub REST client. GitHub Enterprise works by entering the instance's real API root as the host. As an intended side effect, arbitrary Forgejo instances unlock too, because the credential — not host detection — becomes the routing authority.User Stories
ready-for-agentissues are claimed the same way on every binding.Implementation Decisions
All pinned in the issue #1 decision record (2026-07-06 design interview); write them up as ADR-0015 in the PR.
Authorization: Bearer, the pinnedX-GitHub-Api-Versionheader, merged state derived frommerged_at, and client-side filtering of pull requests out of the issues list (GitHub folds PRs into it).forgejo|github); an absent field decodes asforgejo, which is correct by construction for every existing credential. Payloads stay write-only; no schema migration, no new column.Testing Decisions
A good test exercises external behavior at a seam — wire shapes, sentinel errors, routing outcomes — never implementation details. Nothing in CI touches the network. Three hermetic layers, mirroring the Forgejo binding's existing coverage (which is the prior art throughout):
merged_at, Link-header pagination termination and truncation guard, strict unknown-label behavior, rate-limit responses mapping to the typed sentinel, 404 mapping to not-found.Manual gate, left open deliberately: one real GitHub repo added via the UI with a PAT and driven through the full AFK lifecycle (claim → run → PR → reap). GHE ships with unit coverage only — there is no instance to test against.
Out of Scope
Further Notes
dominik.polakovics referenced this issue2026-07-06 22:11:39 +02:00
Folded into #1 — closing as duplicate.
This PRD should have been appended to the source issue, not spun off as a separate issue. The full PRD narrative now lives as a comment on #1, alongside the authoritative pinned decision record in that issue's body and the Agent Brief. Nothing is lost.
The GitHub-tracker work is tracked entirely on #1; the implementing PR closes #1 only.