Repository navigation
Upstream PR process: review panel for PRs and replies - #148
Merged
Merged
Conversation
Rewrite docs/UPSTREAM_PRS.md around the idna#286 and email-validator#182 rejections: why first, smallest diff with per-hunk numbers, import time and documented settings measured, short text, three fresh review agents (maintainer, AI tells, facts) on a packet with only diff, evidence and draft, and human sign-off. Replies go through the same panel. Add reviewer/writer prompts and PR/reply templates under prompts/upstream_pr/, plus scripts/upstream_pr_check.sh (model-free checks) and scripts/upstream_pr_packet.sh (review packet builder).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites
docs/UPSTREAM_PRS.mdaround the two recent rejections: kjd/idna#286 ("highly complicated for what is a trivial small optimization ... looks like it was AI generated") and JoshData/python-email-validator#182 ("But why?").The process is now: write the why first (who calls this, how often), keep only hunks that carry measured gain, measure import time and every documented setting along with the hot path, keep the body short, then run three fresh review agents on a packet that holds only the diff, the evidence, and the draft. A person signs off before anything is posted. Replies and comments on upstream threads go through the same panel.
New files:
prompts/upstream_pr/review_maintainer.md,review_ai_tells.md,review_facts.md: the three reviewer prompts, each with a fixed PASS/FAIL (plus SHRINK/HOLD for the maintainer) output block.prompts/upstream_pr/writer.md,pr_body_template.md,reply_template.md.scripts/upstream_pr_check.sh: model-free check (visible word count, internal terms, dashes, title taglines, new module-level imports/regexes/globals in the diff).scripts/upstream_pr_packet.sh: builds the review packet, hashes it into a packet id, runs the check.First real use
Both pending replies went through the pipeline (not posted):
Found while doing this
email-validator#182 (still open) has a real behavior regression. The
_DEFAULTScache freezes module defaults on the first call, soemail_validator.CHECK_DELIVERABILITY = False(documented in the README) and the other settings are ignored after the first validation; a reassignedSPECIAL_USE_DOMAIN_NAMESis ignored too. The new regexes also add about 11 ms toimport email_validator(23.1 to 33.9 ms median). Change 1 alone (+9 lines) gives 1.63x on the mixed workload with no import cost; changes 2 to 4 give 1.47x. The PR was not touched (out of scope).Checks
shellcheckclean on both scripts; usage and error paths exercised (exit 2).upstream_pr_check.shon our past PRs: idna#286 FAIL (4), email-validator#182 FAIL (12), arrow#1398 FAIL, fastjsonschema#233 FAIL; kjd's idna#287 PASS.cargo build/test/clippyand the acceptance scripts are unaffected and were not rerun.