Skip to content

fix: summarize oversized git diffs - #785

Open
RealBhupesh wants to merge 1 commit into
Nano-Collective:mainfrom
RealBhupesh:codex/issue-770-git-diff-tail
Open

fix: summarize oversized git diffs#785
RealBhupesh wants to merge 1 commit into
Nano-Collective:mainfrom
RealBhupesh:codex/issue-770-git-diff-tail

Conversation

@RealBhupesh

Copy link
Copy Markdown
Contributor

Closes #770
Part of #772

Summary

  • Route oversized non-stat git_diff results through git diff --stat instead of returning the full patch.
  • Keep the existing 500-line safety threshold and provide guidance to request a specific file for detail.
  • Preserve both ends of the diff in the bounded fallback path if the summary command fails.
  • Add utility and integration regression tests plus a patch changeset.

Validation

  • pnpm run test:types
  • pnpm run test:format
  • pnpm run test:lint
  • pnpm run test:ava source/tools/git/utils.spec.ts source/tools/git/git-diff.spec.tsx (36 passed)
  • pnpm run test:all (all changed-area tests pass; one unrelated existing failure remains in source/app/components/settings-tabs.spec.tsx:109, where the test does not find the Display tab)

The full-suite failure is outside the files changed here and reproduces independently of this PR.

@RealBhupesh

Copy link
Copy Markdown
Contributor Author

CI update: all required checks pass except Unit Tests & Coverage Analysis. The full npx c8 ava job reproduces the existing failure at source/app/components/settings-tabs.spec.tsx:109 (Display is not found in the rendered category tabs). This is outside the five files changed by the PR and matches the local pnpm run test:all result recorded in the PR description. CodeQL, build, type, format, lint, audit, Semgrep, unused-dependency, and changeset checks are green.

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.

git_diff returns the full diff with no ceiling

1 participant