Label an issue that already has an open PR, reconciled by forge-groom #220
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#220
Loading…
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?
Mark an issue that already has an open pull request, so a tracker reader — human or agent — can tell an unstarted issue from an implemented one awaiting review. An issue stays open until its PR merges, so neither
forge issue listnor the Forgejo web UI can currently distinguish the two, and the cost is re-implementing work that is already sitting in a branch.Primary goals:
forge-groom, which already walks every open issue and PR weekly and already holds label-write authority. Nothing else sets or clears it, and no human maintains it by hand.forge issue list, and is filterable; a computed column would exist only inside this CLI.Current state and specifics
cmd/forge/issue.go:98-104builds each listing row from number, title, author, labels and milestone;:155-165prints the same fields inissue view. Forgejo's issue objects carry no linked-PR field —pull_requestis populated only when the issue is a PR — so the link exists nowhere but in the PR bodies.Measured cost of not having it: a session read
forge issue list, sawallod/archetypes#21open, implemented it end to end, and found at push time thatallod/archetypes#24had implemented the same issue seven weeks earlier and was still open. The issue list was correct and useless.The link is recoverable without new state. Every implementation PR links its issue by convention (
memory.md, PR Workflow:Closes owner/repo#N, orRefs owner/repo#Non the earlier PRs of a chain), so scanning open PR bodies for references recovers it exactly.Why a groom label rather than a computed column
A field rots when more than one thing writes it, or when nothing recomputes it. Both are avoidable here, because the reconciler already exists.
forge-groom(allod/memoryskills/forge-groom/SKILL.md) already walks every open issue and PR in every public repo weekly, already recomputes each answer from what is true on master rather than merging into prior state, and already has label-write authority bounded to a fixed set —landed?,ready-to-merge,blocked,stale,decision. Its table's own rule is the property that matters: "Remove a groom label the run no longer supports." A label added to that set inherits single-writer reconciliation by construction, including removal when a PR closes unmerged — the exact drift a hand-maintained label would suffer.The alternative considered and rejected: deriving the link on every
issue listfrom one extra fetch of open PRs. It costs no stored state and is never stale, but it exists only inside this CLI, so the web UI — where a human actually browses — still shows nothing. Keep it in reserve if a week of staleness proves too slow in practice.Suggested default
has-pror similar, set on an open issue when an open PR's title or body references it, and removed when no open PR does. Accept the bare#Nand the repo-qualifiedowner/repo#Nforms, ignoring a qualified reference naming a different repository. A casual mention is a tolerable false positive — the label only says "go read that PR", which is the right action either way — so prefer matching loosely; a missed link is the expensive direction.Scope
In scope: the groom's action table and report in
allod/memoryskills/forge-groom/SKILL.md, and whateverforgecapability the scan needs beyondforge pr listas it stands.Out of scope: closed PRs, which would make every long-lived issue noisy; any hand-maintained field; blocking or reordering behaviour of any kind; and the derived listing column, kept in reserve as above.
Supersedes the derive-on-read design this issue originally proposed; the owner's reasoning is on allod/memory#59.
Show an issue's open PR in issue list and view, derived not storedto Label an issue that already has an open PR, reconciled by forge-groomMoved to allod/memory#60. The design changed home along with its shape: the artifact is now a label in forge-groom's action table, and that table lives in
allod/memoryskills/forge-groom/SKILL.md, not here. If the scan turns out to need aforgecapability beyond today'sforge pr list, that part comes back as its own issue in this repo.