Skip to content

feat(upstream): review each intake commit against its upstream source - #562

Merged
incognitojam merged 1 commit into
mainfrom
feat/intake-audit-commit-review
Sep 30, 2026
Merged

incognitojam merged 1 commit into
mainfrom
feat/intake-audit-commit-review

Conversation

@incognitojam

@incognitojam incognitojam commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Note

The intake audit now shows, for each picked commit, whether it changes exactly what its upstream source changed and, if not, how it differs.

Reviewing an intake meant opening every linked upstream PR and commit, but the audit gave no way to see what the fork changed in each commit it actually picked.

Change

The audit summary gains a Commits section, before the fork feature overlap list, with one entry per candidate commit in order:

  • the upstream PR link, plus any commits named in Upstream-Commit trailers. The commit cherry-picked from a linked PR is not repeated;
  • the commit's Fork adaptation note, quoted;
  • one of: matches upstream, differs from upstream in N files, changes no files (provenance only), or not compared with the reason, for example an upstream source that has not been fetched;
  • for a commit that differs, the difference per file as a diff between upstream's changed lines and the commit's changed lines, capped at 80 lines, followed by a git range-diff command for the full comparison;
  • the fork features whose ledger paths the commit touches.

A commit matches when, file by file, it adds and removes the same lines as its upstream sources, ignoring line numbers and context. A conflict resolved by keeping upstream's lines around fork code therefore still matches; resolving it by changing upstream's lines does not. The runbook mentions the section.

Example

From the audit of the batch promoted as 71c9fe3f94, where 10 of 25 commits differ from their sources:

### 11. fix(web): complete thread status icons and keep input threads prominent (#11461)

`5ef9574fb6` from [pingdotgg/t3code#11461](https://github.com/pingdotgg/t3code/pull/11461). Differs from upstream in 4 files.

> Read Approval rows stay at full prominence, the one part of the fork sidebar prominence rule that upstream does not share. The fork visual-state helper and its Working and Monitoring row fade are dropped in favour of upstream shouldRecedeSidebarThread, and the fork feature ledger entry narrows to Approval prominence while tracking this change as partial overlap.
```diff
# .github/fork-features.yml
…
-
+-    title: Keep threads awaiting input visually prominent
++    title: Keep threads awaiting approval visually prominent
+-      - Inactive threads awaiting approval or user input remain at full visual prominence because they require immediate attention.
+-      - Working and Monitoring threads recede as background activity unless active or selected, without changing ready or failed presentation.
++      - Inactive threads awaiting approval stay at full visual prominence after they are read, like threads awaiting user input, because they require immediate attention.
+-      - apps/web/src/components/Sidebar.tsx
+-      - apps/web/src/components/Sidebar.tsx
++        - https://github.com/pingdotgg/t3code/pull/11461
+-      retire_when: Upstream distinguishes attention-required Approval and Input rows from dimmable Working and Monitoring background activity with equivalent precedence behavior.

Validation

  • Ran the audit on aed88d07fb..71c9fe3f94: the 25 commits of that batch were each classified. The 10 marked as differing are exactly the commits with a Fork adaptation note, apart from fix(mobile): pin expo-audio so the release smoke patch stays in use pingdotgg/t3code#11426, whose note explains why it is reported as provenance only. The commits resolved by keeping fork code beside upstream's changes, such as fix(web): tighten sidebar search and footer spacing pingdotgg/t3code#11466, match. The printed git range-diff commands run against the listed commits. The summary is about 46 KB.
  • Unit tests cover source and note parsing, matching after code moves, combining several upstream sources, the per-file difference, the rendered entry and links, and the line cap with a fence longer than any backtick run in the lines. The upstream script tests, scripts typecheck and lint of the changed files pass.
  • In GitHub Actions the comparison uses the upstream main that the Fork CI intake job and the promotion workflow already fetch for the migration check (feat(upstream): check the upstream migration history against upstream #560). An upstream source missing from that fetch, such as an early import from an unmerged PR branch, is reported as not compared.
  • Ran together with the migration check on the same range: the audit reports a database migration changed: adds 51 ProjectionThreadMessageContext without errors, and the Commits section is unchanged.

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

The intake audit listed the upstream PRs a candidate imports, but not what the fork changed in each picked commit. Reviewers had to compare each commit with its upstream source by hand.

The audit now has a Commits section with one entry per candidate commit, in order. Each entry links the upstream PR and any Upstream-Commit sources, quotes the Fork adaptation note, and says whether the commit changes exactly the lines its upstream sources changed. For a commit that differs, it shows the difference per file as a diff between the two lists of changed lines, capped at 80 lines, with a git range-diff command for the full comparison. It also names the fork features whose ledger paths the commit touches.
@incognitojam
incognitojam force-pushed the feat/intake-audit-commit-review branch from 91cf6d0 to 797e527 Compare September 30, 2026 15:41
@incognitojam
incognitojam merged commit b0b3029 into main Sep 30, 2026
24 checks passed
@incognitojam
incognitojam deleted the feat/intake-audit-commit-review branch September 30, 2026 16:16
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