Skip to content

Add generated diff categorization for Linguist and lockfiles#705

Closed
mariusvniekerk wants to merge 1 commit intomainfrom
add-generated-diff-category
Closed

Add generated diff categorization for Linguist and lockfiles#705
mariusvniekerk wants to merge 1 commit intomainfrom
add-generated-diff-category

Conversation

@mariusvniekerk
Copy link
Copy Markdown
Collaborator

Summary

  • Add a generated auto-design category for diffs that are entirely generated, using linguist-generated Git attributes plus built-in generated artifacts like lockfiles.
  • Thread generated-file detection through daemon auto-design dispatch so generated-only changes skip with an explicit generated reason instead of being treated as trivial or large diffs.
  • Add unit and end-to-end coverage for Git attribute detection, generated-only classification, and auto-design behavior.

Testing

  • go fmt ./...
  • go vet ./...
  • go test ./...
  • git diff --check

Generated diffs can be large enough to trip design-review heuristics even when they are only refreshed artifacts. Treat repo-authored Linguist generated attributes and roborev's built-in lockfile patterns as generated inputs so all-generated changes skip with an explicit generated reason instead of masquerading as trivial or wide-reaching changes.

Validation:
- go fmt ./...
- go vet ./...
- go test ./...
- git diff --check

Generated with OpenAI Codex
Co-authored-by: OpenAI Codex <noreply@openai.com>
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 8, 2026

roborev: Combined Review (6bf78e0)

Summary verdict: Two medium-risk issues need attention; no critical or high findings were reported.

Medium

  • internal/review/autotype/autotype.go:129
    The generated-only skip runs before trigger heuristics, so a commit where all files match GeneratedFiles can be skipped even when it also matches configured trigger_paths or trigger_message_patterns. That appears to contradict the existing precedence contract that explicit triggers force a design review.
    Fix: Move the generated-only skip after explicit trigger checks, or document the new precedence and add tests for generated files that also match trigger paths/messages.

  • internal/git/git.go:279
    git check-attr --source requires Git 2.43.0, but older common versions such as Git 2.34 on Ubuntu 22.04 do not support it. If linguistGeneratedFiles fails, GetGeneratedFiles returns nil, err, discarding any files already matched by built-in generated-file globs.
    Fix: Preserve and return partial built-in matches with the error, or gracefully ignore/fallback on the linguistGeneratedFiles failure so built-in detection still works on older Git versions.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 83.33333% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/git/git.go 83.67% 4 Missing and 4 partials ⚠️
internal/daemon/ci_poller.go 83.33% 1 Missing and 1 partial ⚠️
internal/daemon/server_auto_design.go 81.81% 1 Missing and 1 partial ⚠️
internal/review/autotype/autotype.go 83.33% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@mariusvniekerk
Copy link
Copy Markdown
Collaborator Author

wrong repo.

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