Conversation
chore: sync released main state back to develop
fix: harden promotion gates and embedded repository validation
chore: promote release hardening from develop to Q.A
📝 WalkthroughWalkthroughThe pull request changes source-branch workflows to use ChangesTrusted source workflows
Repository mode validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Installer
participant TargetRepository
participant Makefile
participant RepoQuality
Installer->>TargetRepository: install target files
Makefile->>TargetRepository: check .project-setup-source
TargetRepository-->>Makefile: marker absent or mismatched
Makefile->>RepoQuality: run repository validation
RepoQuality->>TargetRepository: validate required scripts
RepoQuality-->>Installer: skip caller contracts for embedded target
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/test_qa_workflows.py (1)
16-20: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winComplete the trusted-source contract assertions.
The QA test checks
branches: ["Q.A"]andHEAD_REF, but neither test checks the same-repository guard enforced at.github/workflows/qa-source-branch.ymlLines 35-38 and.github/workflows/main-source-branch.ymlLines 35-38. The main test also does not assertbranches: ["main"]. Add these assertions. Otherwise, a fork pull request or a widened target filter can pass the tests while changing the source-gate contract. GitHub appliesbranchesfilters to the pull request target branch. (docs.github.com)This follows the PR objective to validate trusted source workflows.
Suggested assertions
def test_qa_source_requires_develop(self): ... + self.assertIn('HEAD_REPO" != "$EXPECTED_REPO', text) def test_main_source_requires_qa(self): ... + self.assertIn('branches: ["main"]', text) + self.assertIn('HEAD_REPO" != "$EXPECTED_REPO', text)Also applies to: 22-25
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/test_qa_workflows.py` around lines 16 - 20, Add assertions in the QA workflow test for the same-repository guard used by qa-source-branch.yml and assert the corresponding target branch filter. Update the main workflow test similarly, including the same-repository guard and branches: ["main"], while preserving the existing Q.A and HEAD_REF assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/test_qa_workflows.py`:
- Around line 16-20: Add assertions in the QA workflow test for the
same-repository guard used by qa-source-branch.yml and assert the corresponding
target branch filter. Update the main workflow test similarly, including the
same-repository guard and branches: ["main"], while preserving the existing Q.A
and HEAD_REF assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2e0ca10c-88c2-4d17-8d93-fd00428b0b48
📒 Files selected for processing (7)
.github/workflows/main-source-branch.yml.github/workflows/qa-source-branch.yml.project-setup-sourceMakefilescripts/validation/repo_quality.pytests/qa/test_repository_mode_e2e.pytests/test_qa_workflows.py
Linked Issue
Milestone
Summary
How to test
Evidence
Known risks
DoD checklist
Summary by CodeRabbit
Workflow Improvements
Bug Fixes
Tests