Skip to content

chore: GitHub collapses generated files in diffs, with the recipe that writes each one - #329

Merged
PiquelChips merged 2 commits into
mainfrom
chore/gitattributes-generated
Nov 4, 2026
Merged

PiquelChips merged 2 commits into
mainfrom
chore/gitattributes-generated

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

GitHub showed generated files in PR diffs as if someone had written them by hand: the SQLx query cache (246 JSON files), the SDK test vectors and the TypeScript SDK's wire types. A small query change could bury the real diff under cache churn.

A new .gitattributes marks them linguist-generated, so GitHub collapses them in diffs and leaves them out of language stats. Each line names the recipe that writes it:

  • crates/database/.sqlx/**: just db prepare
  • tests/sdk-vectors/**/*.json: just sdk-vectors (the keys/*.pem and README are hand-written, so they stay visible)
  • packages/auth/src/protocol.ts: just sdk-types

git check-attr marks 321 tracked files as generated and leaves 4 hand-written ones unmarked. Linguist already treats Cargo.lock and pnpm-lock.yaml as generated, so they get no lines here.

No CI change is needed, because CI already catches drift in all three:

  • The rust job runs just test --workspace --run-ignored all. That runs crates/common/tests/sdk_vectors.rs and protocol::typescript, which compare the committed files byte for byte unless UPDATE_SDK_* is set.
  • The same job runs just db prepare-check against the migrated schema. It fails on a missing or changed query; a cache file left over from a deleted query only warns, as before.
  • The changes filter already sends tests/sdk-vectors/** and packages/auth/src/protocol.ts to rust, and crates/** covers the cache.

Reviewed with review-loop: 1 round with 2× GPT 6.1 Sol and Claude Opus 5.5. Verdict: approved

Note

Written by Claude Opus 5.5 in Claude Code and reviewed by GPT 6.1 Sol and Claude Opus 5.5 (via T3 Code)

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8b6bbe9-0c4b-4c8f-8fbc-57f5ac326363
Commits

Reviewing files that changed from the base of the PR and between 4c515a0 and b4e9e71.

Files selected for processing: 1
  • .gitattributes
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips PiquelChips self-assigned this Nov 4, 2026
@PiquelChips PiquelChips added the documentation Improvements or additions to documentation label Nov 4, 2026
@PiquelChips PiquelChips added this to the 0.1 milestone Nov 4, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in sourceorigin.dev Nov 4, 2026
@PiquelChips PiquelChips moved this from Needs Triage to In Progress in sourceorigin.dev Nov 4, 2026
@PiquelChips PiquelChips moved this from In Progress to Ready in sourceorigin.dev Nov 4, 2026
PiquelChips and others added 2 commits November 4, 2026 11:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ftovers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PiquelChips
PiquelChips force-pushed the chore/gitattributes-generated branch from ed48ae7 to b4e9e71 Compare November 4, 2026 10:38
@PiquelChips
PiquelChips merged commit 4793153 into main Nov 4, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Done in sourceorigin.dev Nov 4, 2026
@PiquelChips
PiquelChips deleted the chore/gitattributes-generated branch November 4, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant