Skip to content

RFC-0005: What a pull request should look like - #6

Closed
MarekSpodBiedry wants to merge 8 commits into
storytold:mainfrom
MarekSpodBiedry:rfc-0005-pull-request-standards
Closed

MarekSpodBiedry wants to merge 8 commits into
storytold:mainfrom
MarekSpodBiedry:rfc-0005-pull-request-standards

Conversation

@MarekSpodBiedry

Copy link
Copy Markdown
Contributor

One shared checklist for PRs in every craft app: a narrow fix, a test that fails without it, a description a reviewer can check in a minute, drafts only while work is unfinished, and quick answers to review comments. Repository AGENTS.md files keep their own stricter rules on top.

See rfcs/0005-pull-request-standards.md.

Part of a set of six RFCs (0003–0008) on claiming issues, overlapping PRs, PR standards, a shared AGENTS.md section, triage, and roles. They follow the process in RFC-0000 (#1), so their comment periods can start once that one is merged.

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReviewerA — source-read COMMENT (not an approval)

RFC-0005, "What a pull request should look like" (I read the first 34 lines of 60): one checklist for all PRs: narrow scope, a test that fails without the fix, a description in a fixed order (Fixes #N only when it fixes the whole issue, the symptom, the cause, what changed, the test), titles and commits in the repository's style, drafts only for unfinished work, quick answers to review comments. Clear and usable. Add the attribution rule for AI-assisted PRs and the repository's wording on what to say when the author could not run the tests, and note who enforces the checklist.

I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.

Status: waiting_author.

@Jeremy8776

Copy link
Copy Markdown
Member

This is a really useful checklist, and most of it is already reflected in the house rules from RFC-0006.

One thing to line up before a comment period: point 8 and house rule 14 (#31) now give different times.

  • Point 8 here: reply within a day, and a maintainer may close a PR whose question has been unanswered for more than 3 days.
  • House rule 14: respond within 7 days, a reminder at 14, and eligibility for closure at 30, counted only while an actionable request waits on the author.

Agents follow both literally, so it would help if they agreed. Since rule 14 was worked through at length on #7, and it also answers this RFC's open question about weekends, would pointing point 8 at rule 14 work for you? Once that's settled I'd be glad to start the comment period.


@Jeremy8776 had the idea. Claude Code had the keyboard.

Replace the conflicting one-day response and three-day closure thresholds with accepted house rule 14: 7/14/30 days, actionable-request clock, substantive response resets, reviewer/maintainer pauses and maintainer-only closure. Remove the superseded timing question.

Addresses:
storytold#6 (comment)

The RFC remains a proposal. Documentation-only; exact patch application and normalized bytes verified.
@MarekSpodBiedry

Copy link
Copy Markdown
Contributor Author

On point 8: 7/14/30 days is slow for a project where most PRs come from agents. I'd make it 3 days to respond, a reminder at 7, and eligible for closure at 14.

The clock only runs while an actionable request waits on the author, so a large or security-sensitive PR that takes a long time to review isn't affected. House rule 14 would need the same numbers.

@Elvis33LE

Copy link
Copy Markdown
Contributor

Two things:

  1. An internal contradiction in the current text. Point 8 sets 3 days to respond, a reminder at 7, closure eligibility at 14 — but the "Relationship to the accepted house rules" section still says the proposal "uses that clock" (house rule 14's 7/14/30) "rather than introducing a separate one-day response or three-day closure threshold". One of the two paragraphs has to go. On the numbers themselves, Marek's 3/7/14 is the better fit: RFC-0008's data shows the median PR already waited ~21 hours to merge by Oct 14–15, and a 7-day response floor was written for a queue that no longer moves. Changing an accepted rule's numbers is a policy change — point 8's closing line already says house rule 14 gets updated on adoption, so the Relationship paragraph is the leftover to fix.

  2. Make house rule 7 checkable. Point 3's description order is what makes review fast. The one field I'd add, from a repo where most PRs are agent-authored: "Ran locally: X. Left to CI: Y." House rule 7 obliges contributors to say what they could not run, but nothing in a PR shows whether that obligation was met — a fixed line makes it visible in seconds, on the same evidence a reviewer checks anyway.

@vangel76

vangel76 commented Nov 13, 2026 •

Copy link
Copy Markdown

Two things from my over 1,000 PRs across the craft repos.

First, point 4 only says to follow the repository's existing style, which in practice gives titles like "Fix crash in X handler". A title that states what the user gains (for example "Opening a large file is 3x faster") and a body whose first line is that gain tell the reviewer in one line why the PR exists. The symptom, cause and test order from point 3 can follow below it.

Second, point 9 should say what to do when the conflict is in a generated file. In Wordcraft docs/parity-checklist.md and in photocraft docs/scorecard.md conflict after nearly every merge. Resolving them by hand is wrong: the file has to be regenerated after merging the new main, and again after every later merge in the queue. One sentence would save every author from working this out: "on a conflict in a generated file, merge main and regenerate it, do not resolve it by hand".

@Elvis33LE

Copy link
Copy Markdown
Contributor

Thanks—both suggestions make the checklist more useful in day-to-day work.

A title and opening sentence that state the user-visible improvement can come first, followed by the symptom, cause, change and test details in the proposed order. That gives reviewers the one-line reason for the PR without losing the information needed to review it.

The generated-file guidance is also worth making explicit: when a generated file conflicts, merge the updated main and regenerate the file rather than resolving generated output by hand. If main moves again, regenerate again.

@hectorviov

Copy link
Copy Markdown

Point 9 should say when to rebase, not only that you should. "If main moved and the PR conflicts, rebase it", read literally, means rebasing every time main moves, long before anyone reviews the PR. In PhotoCraft it also means pushing to PRs that maintainers have asked us to leave alone.

From my PhotoCraft PRs:

  • feat(io,ui): BMP Options asks for 24 or 32 bits per pixel (#8374) photocraft#9175, #9176, #9234, #9237, #9267 and #9288 were opened on 24–25 Oct. Each has been force-pushed 9 times, mostly to clear conflicts. All six conflict with main again today. #9234 and #9237 got their first maintainer review this morning, and #9267 and #9288 have none yet. The nine rebases bought nothing.
  • On 5 Nov, 21 of my 45 open PRs conflicted after main moved 59 commits in one afternoon.
  • Rebasing has a cost. Three of my rebases silently moved a PR's tests, appended at the end of a test file, inside main's last test (I caught it before pushing). CodeRabbit also paused reviews on nine of the force-pushed PRs.
  • PhotoCraft merges through integration batches whose description says the PRs show as merged "because their head commits are in the branch unchanged" (Integration batch 12: 14 Actions PRs on main photocraft#10776). On ATN export: Stroke steps write the settings they leave at default (#8303) photocraft#10424 a maintainer asked "please don't push to this branch until then", because a new push would keep it from being marked merged. 30 of my 129 merged PRs went in through a batch.

Suggested wording:

  1. Keep it current. When a reviewer or maintainer asks, bring the PR up to date with main and check that the fix is still needed. A conflict alone doesn't need a push while the PR waits for review. Don't push to a PR a maintainer has taken into an integration batch or asked you not to push to.

@Elvis33LE

Copy link
Copy Markdown
Contributor

Agreed. Point 9 read literally pushes on every move of main, and your PhotoCraft numbers show what that buys: nine rebases that bought nothing, plus pushes into branches maintainers had taken for an integration batch. The suggested wording is better — updating becomes something an author does when asked or when it actually matters, and a conflict alone is not a push trigger while a PR waits for review.

@FredApps

Copy link
Copy Markdown
Contributor

Starting the 3-day comment period under RFC-0000. The comment period ends on 18 November 2026 at 15:00 UTC.

After the period, this merges with approval from a maintainer other than the author, if no maintainer's objection is unresolved. Please raise any objections on this PR, with the reason and what would resolve them.

@FredApps

Copy link
Copy Markdown
Contributor

Closing in favour of #72 (RFC-0048, one shared AGENTS.md), which carries this RFC's points almost word for word. Thank you, @MarekSpodBiedry, and everyone who worked through the timings and the rebase wording here; that text is what #72 adopts.

Where each point went in #72:

  • 1 Scope, same bug on other paths, open an issue for a different bug: standards/pull-requests.md Shape 1; AGENTS.md rule 8.
  • 2 A test that fails without the fix: pull-requests.md Shape 2 and AGENTS.md rule 29. Real data over mocks: standards/testing.md › Fixtures (RFC-0071: Test rules #71).
  • 3 Description order, Fixes #N only for the whole issue, verification: pull-requests.md › Description.
  • 4 Title and commits in the repository's style: Shape 3.
  • 5 User-facing text: AGENTS.md rule 16. Note this changes the point: feature PRs add English only, and translations go to storytold/craft-i18n.
  • 6 Drafts: pull-requests.md › Drafts.
  • 7 Red main: After opening 3; AGENTS.md rule 36.
  • 8 Review responses: 3 days, a reminder at 7, closure eligibility at 14, with the clock rules from this thread: After opening 1; AGENTS.md rule 37. This replaces house rule 14's 7/14/30.
  • 9 Keeping current, generated-file conflicts, integration batches: After opening 2; AGENTS.md rule 37.

Two points raised in this thread aren't in #72 yet, and I'm raising them there: an attribution rule for AI-assisted PRs, and who enforces the checklist. Please take any further feedback to #72; its comment period ends on 21 November 2026 at 07:00 UTC.

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.

6 participants