Skip to content

docs(github): add rules for bounding git diff and log outputs#131

Merged
dembrane-sam-bot merged 3 commits into
mainfrom
sam/bound-git-diff
Jul 1, 2026
Merged

docs(github): add rules for bounding git diff and log outputs#131
dembrane-sam-bot merged 3 commits into
mainfrom
sam/bound-git-diff

Conversation

@dembrane-sam-bot

@dembrane-sam-bot dembrane-sam-bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What is this change?

This change adds a new section 'Bounding Git Diff and Log Outputs' to src/capabilities/github.md directing Sam to avoid running unconstrained raw git diff or log commands on large branches. It instructs Sam to check file sizes with --stat first, restrict paths, and exclude massive generated files or schema JSON snapshots.

What did Sam notice that led to this?

During today's early runs, session 9d21933a8efa crashed with a Vertex 400 INVALID_ARGUMENT exception because it ran an unconstrained git diff on the sam/portal-prefilling branch (which contains massive schema snapshots/sync JSONs). The 4.2MB diff output translated to ~1.2M tokens and overloaded the context window on the next turn. This PR prevents future session context overflows.

Tier?

Tier 1 (capability prose).

Confidence?

High. This is a robust prose fix addressing a severe context window crash pattern.

@dembrane-sam-bot dembrane-sam-bot added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit cad29d0 Jul 1, 2026
2 checks passed
@dembrane-sam-bot dembrane-sam-bot deleted the sam/bound-git-diff branch July 1, 2026 08:10
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.

2 participants