NO-ISSUE: Add assisted-service-writing-unit-tests agent skill#10123
Conversation
|
@bluesort: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
WalkthroughAdded two documentation files introducing standardized unit-test patterns for assisted-service (Ginkgo/Gomega, gomock, PostgreSQL lifecycle, event matchers) and updated Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/lgtm nice ❤️ |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bluesort, rccrdpccl The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.cursor/skills/assisted-service-writing-unit-tests/SKILL.md:
- Around line 94-98: The per-test teardown currently couples DB cleanup with
gomock cleanup; split them by making the AfterEach that calls
common.DeleteTestDB(db, dbName) only handle DB teardown and remove the inline
ctrl.Finish() from that block, and if gomock is used in the same scope add a
separate AfterEach that calls ctrl.Finish() (referencing BeforeEach/AfterEach,
common.PrepareTestDB, common.DeleteTestDB, and ctrl.Finish) so tests without
mocks don’t reference an undefined ctrl.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0a58e698-d90f-4ddc-a316-80afa94ad42c
📒 Files selected for processing (3)
.claude/skills/assisted-service-writing-unit-tests.md.cursor/skills/assisted-service-writing-unit-tests/SKILL.mdCLAUDE.md
873cefa to
2fa2c7d
Compare
|
/lgtm |
|
/test ? |
|
/test edge-images |
|
@bluesort: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Add an
assisted-service-writing-unit-testsskill to.cursor/skillsand.claude/skillsto enforce unit test patterns.The skill was developed using the TDD methodology from superpowers:writing-skills, including RED phase baseline testing with pressure scenarios (time pressure, authority pressure, exhaustion), GREEN phase skill development with decision flowcharts and rationalization defenses, and REFACTOR phase loophole identification and hardening.
The same
writing-skillsskill was used to run agents with a variety of generic test creation prompts to confirm that the skill is loaded into context when needed.As a final test, several established test files not adhering to unit test patterns (such as missing gomock
Finish()calls as covered in #10024) were deleted and re-created with the help of this skill. Resulting test files adhered to unit testing patterns more closely than the previous versions.List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs, README, etc)Reviewers Checklist