Skip to content

feat(upstream): record why each tracked PR is tracked - #442

Merged
incognitojam merged 2 commits into
mainfrom
feat/tracked-pr-reasons
Sep 24, 2026
Merged

incognitojam merged 2 commits into
mainfrom
feat/tracked-pr-reasons

Conversation

@incognitojam

@incognitojam incognitojam commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

The tracked upstream PR list held bare numbers. The reports showed each PR's intake status, but not why the fork was waiting on it or when the entry could be removed.

Each entry in .github/upstream-tracked-prs.json is now { "pr": 123, "reason": "..." }, and the decoder rejects an entry without a reason. upstream-queue.ts status prints the reason under each PR, and the tracked PR report in the Upstream lag report and promotion summaries has a new "Why tracked" column.

List changes:

  • Removed pingdotgg/t3code#9511, #9753, #9773 and #9807, which are already recorded as imported.
  • Added the GitHub stack merge chain: pingdotgg/t3code#10839, #10870, #10875 and #11486, plus the open follow-up #12645. The fork's merge button uses GitHub's legacy merge endpoint, which GitHub documents as unable to merge stacked PRs; #10875 adds a merge stack action and replaces the fork's stack section.
  • Wrote reasons for the other existing entries from the investigations that added them.

The runbook now says to remove an entry once the report shows it recorded or once its reason no longer applies, and that a reason writes a fork PR as "fork #123" while a bare number means an upstream PR.

Validation

  • Ran node scripts/upstream-queue.ts status and node scripts/upstream-tracked-prs-report.ts against freshly fetched fork and upstream refs. All 13 entries show their reason; 11 are pending and #10845 and #12645 are open upstream.
  • Decoder tests cover a valid entry, a bare number, a string PR number, a duplicate PR, and a missing or blank reason. The tracked PR and intake tests pass (16), along with the scripts typecheck and targeted lint.

Written by an agent (Claude Code, claude-opus-5-5).

The tracked upstream PR list held bare numbers, so the reports could
not say why the fork was waiting on a change or when an entry could be
removed.

Each entry is now `{ "pr": 123, "reason": "..." }`. The decoder rejects
entries without a reason. `upstream-queue.ts status` prints the reason
under each PR, and the tracked PR report gains a "Why tracked" column.

Drop the four entries already recorded as imported, and add the
GitHub stack merge chain. The runbook now says to remove an entry once
it is recorded or its reason no longer applies, and to write PR
references as `pingdotgg#123` or `#123`.
@incognitojam
incognitojam enabled auto-merge (squash) September 24, 2026 16:03
@incognitojam
incognitojam merged commit 7cd5136 into main Sep 24, 2026
20 checks passed
@incognitojam
incognitojam deleted the feat/tracked-pr-reasons branch September 24, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant