Skip to content

Exclude lock files - #4

Merged
jamie-sgro merged 9 commits into
mainfrom
exclude-lock-files
Nov 25, 2026
Merged

jamie-sgro merged 9 commits into
mainfrom
exclude-lock-files

Conversation

@EChebelyon

Copy link
Copy Markdown
Contributor

Why & What

  • Lock files expand the diff without adding any meaningful review value, we exclude them from automated review

Review instructions

  • Review code changes
  • We'll test it out downstream

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review (gpt-6-astra)

This PR filters lock files and generated output out of automated review diffs and adds configurable exclusion patterns to the reusable workflow.

Findings

  • pr_review/review.py:102 — Git-quoted paths bypass exclusions. Git can quote and escape paths containing non-ASCII characters, tabs, or quotes, producing headers such as diff --git "a/…" "b/…". The regex only accepts unquoted paths, so lock files and explicitly excluded files under those paths remain in the review and can consume the diff budget. Parse and decode Git’s quoted header paths before matching exclusions, and add tests covering quoted paths alongside ordinary paths.

Reviewed at b137248. Automated review; use your judgment.

@EChebelyon EChebelyon closed this Nov 23, 2026
@EChebelyon EChebelyon reopened this Nov 23, 2026

@jamie-sgro jamie-sgro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good direction, some suggestions mainly to trim down the longer bits

Comment thread pr_review/test_review.py Outdated

class SectionPathTest(unittest.TestCase):
def test_cases(self):
for desc, text, expected in CASES:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swap all tests to pytest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually easiest is to just point your LLLM to this keyfraym PR where I recently added the minimum for our pytest suite. It can copy that pretty closely.

In your prompts include notes about moving pr_review/test_review.py into a /tests folder that mirrors the folder structure of our prod files. Copy the configurations and pytest.ini stuff, mirroring the conventions from there.

Comment thread pr_review/review.py Resolved
Comment thread pr_review/test_review.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[optional, out of scope] Love we're writing tests, bonus points if we get a PR later that adds them to our cicd PR process

Comment thread pr_review/review.py Resolved
Comment thread pr_review/review.py Resolved
@EChebelyon

Copy link
Copy Markdown
Contributor Author

@jamie-sgro the scope of this PR increase a little bit, i did not want to merge until you got a chance to give it one more look, feel free to merge as well

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, remember when our work was done through notebooks? RIP

@jamie-sgro jamie-sgro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hell yeah brother

@jamie-sgro
jamie-sgro merged commit be80408 into main Nov 25, 2026
@jamie-sgro
jamie-sgro deleted the exclude-lock-files branch November 25, 2026 09:14
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