demo: BEFORE — messy PR with generated-file churn across 4 commits#3011
Draft
qstearns wants to merge 3 commits into
Draft
demo: BEFORE — messy PR with generated-file churn across 4 commits#3011qstearns wants to merge 3 commits into
qstearns wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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.
Summary
The "before" half of a paired demo showing what
mise run git:squash-gendoes. Companion PR: demo/after-default → demo/base.A synthetic PR built on top of two prep commits (more on those below) plus four "feature" commits that simulate how a real branch accumulates generated-file churn when generators run multiple times during development:
chore(gen): mark .speakeasy/out.openapi.yaml as linguist-generatedchore(gen): take ownership of client/sdk/.gitattributes via .genignorechore(dashboard): clarify OAuth mode docstringfeat(usersessions): add roastUserSession endpointfeat(usersessions): count active sessions per issuerfix(elements): clarify defaultGetSession relay pathThe
a2commit is whatsquash-genis for: a tiny silly Goa design change (aroastUserSessionendpoint) drags 31 files and 2,800 lines of regenerated SDK/server/openapi output along with it, completely burying the ~60 lines of hand-written code that's actually under review.a3shows the same pattern at smaller scale: a new SQL query (+11lines) pulls along the*.sql.goregen (+24lines).a4is hand-only — included to show that not every commit has generated content;squash-genshould leave it untouched.About the prep commits
squash-genusesgit check-attr linguist-generatedto decide what to scrub. Two preexisting issues onmainwould break that logic and were fixed in prep commits so the demo runs cleanly:.speakeasy/out.openapi.yamlwasn't in.gitattributes— the speakeasy-bundled OpenAPI spec is a generator output and should be linguist-generated.client/sdk/.gitattributescontained*.ts linguist-generated=false— incorrectly overrode the root rule. Replaced with aclient/sdk/.genignoreso speakeasy stops regenerating it.Both prep commits use the
chore(gen):prefix so they act as scope fences forsquash-gen(mode 2 in the tool's docs: prior labeled commit shifts scope-start).What to look at
Compare commit-by-commit against the after-default PR. Specifically
a2(this PR) vs the rewrittena2(after-default PR): same hand-written changes, but the after-default version has the 28 generated files surgically moved to a singlechore(gen): regenerate artifactstip.🤖 Generated with Claude Code