Skip to content

fix(tests): skip .worktrees in testconventions scan - #1087

Merged
weselben merged 1 commit into
ENTERPILOT:mainfrom
weselben:fix/testconventions-skip-worktrees
Sep 24, 2026
Merged

weselben merged 1 commit into
ENTERPILOT:mainfrom
weselben:fix/testconventions-skip-worktrees

Conversation

@weselben

@weselben weselben commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

What

Adds .worktrees to the skippedDirs map in internal/testconventions/assertions_test.go.

Why

TestNoHandRolledAssertions walks the repository tree and lints test style. It descends into .worktrees/, which the project gitignores (/.worktrees/ in .gitignore) for local git worktrees. Any active worktree whose branch violates the convention fails the test — even on a clean checkout of main.

.claude is already skipped for the same reason ("local agent worktrees, gitignored"). .worktrees was missing from the list.

Verification

go test ./internal/testconventions/ fails before this change when a non-conformant worktree exists locally and passes after. No production code touched.

Summary by CodeRabbit

  • Tests
    • Repository-wide assertion checks now skip local Git worktree directories.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: be80684d-8647-426a-9dc8-0cbeb9d828ff

📥 Commits

Reviewing files that changed from the base of the PR and between a82e2bb and f116bec.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The test-convention scan now skips .worktrees. The unit and integration test jobs use PostgreSQL images from mirror.gcr.io/library. A CI script comment no longer attributes rate-limit failures to an earlier PostgreSQL image pull.

Changes

Test-convention scan

Layer / File(s) Summary
Skipped directory list
internal/testconventions/assertions_test.go
The skippedDirs map includes .worktrees, so the scan skips local worktree trees.

CI registry updates

Layer / File(s) Summary
PostgreSQL images and pull comment
.github/workflows/test.yml, tools/ci/mongo-replset.sh
The unit and integration test jobs use PostgreSQL images from mirror.gcr.io/library. A script comment no longer attributes rate-limit failures to an earlier PostgreSQL image pull.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: santiagodepolonia

Merge Risk: 🔵 Low · up to a82e2

This change only affects CI and a test helper. The PostgreSQL service images in CI now come from a cache that does not guarantee images stay available, so test jobs could fail to start if a tag is evicted. Production behavior is unaffected, and the risk is small and easy to revert, but adding an upstream fallback would make CI more reliable.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: skipping .worktrees during the test conventions scan.
Description check ✅ Passed The description clearly explains what changed, why the change is needed, and how it was verified. It uses ## What, ## Why, and ## Verification instead of the template's ## Description heading,…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)

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

A rabbit checks the worktree trail,
.worktrees now leaves the scan no veil.
PostgreSQL pulls take a mirrored route,
The CI comments set the record straight throughout.
Ears twitch; the checks proceed with care,
A carrot waits beside the lair.

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

Safe to merge; the changed exclusion correctly prevents ignored local worktrees from affecting repository test-convention checks.

What we checked:

  • The baseline Go test for TestNoHandRolledAssertions in internal/testconventions completed successfully. T-Rex
  • A disposable nonconformant-test fixture was created and the scanner test was re-run, both completing successfully. T-Rex
  • The disposable fixture was removed after the test completed. T-Rex
  • T-Rex completed the requested verification, but its local artifact references were not uploaded. T-Rex

Reviews (1) · Last reviewed commit: "fix(tests): skip .worktrees in testconve..."

@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

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

coderabbitai[bot]

This comment was marked as outdated.

@weselben
weselben force-pushed the fix/testconventions-skip-worktrees branch from a82e2bb to f116bec Compare September 24, 2026 00:03
@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Note

Unit test generation is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

🤖 Coding Agent task started for unit test generation.

@weselben

Copy link
Copy Markdown
Collaborator Author

[!NOTE]
Unit test generation is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

I actually did not trigger this; I clicked the "Trigger Review" button. Interesting.

@SantiagoDePolonia SantiagoDePolonia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@weselben
weselben merged commit 6140859 into ENTERPILOT:main Sep 24, 2026
29 of 30 checks passed
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.

3 participants