Fix repository reconciliation scope failures and retire legacy verification gates - #2185
groupthinking with Copilot wants to merge 3 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: groupthinking/EventRelay/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔍 PR Validation |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The intended deferral still misses real GraphQL error shapes and failures from the new REST inventory request.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Hardens repository reconciliation against limited GitHub token scopes and retires an obsolete verification workflow.
Changes:
- Replaces privileged GraphQL branch-protection reads with REST lookup.
- Adds reconciliation regression tests and default-branch handling.
- Removes and documents the legacy verification workflow.
| File | Description |
|---|---|
.github/workflows/repository-reconciliation.yml |
Revises branch inventory and error handling. |
.github/workflows/verification.yml |
Removes legacy verification gates. |
.github/workflows/README.md |
Records workflow retirement. |
.github/AUDIT_FINDINGS_SESSION.md |
Adds remediation status notes. |
tests/unit/test_repository_reconciliation_workflow.py |
Adds focused regression coverage. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const protectedBranches = await github.paginate(github.rest.repos.listBranches, { | ||
| owner, repo, protected: true, per_page: 100 | ||
| }); |

Canonical issue
System-managed issue linking.
Outcome
This PR addresses the audit tracker’s CI/workflow finding by making
repository-reconciliation.ymlstop failing on GitHub App token scope limits and by formally retiring the staleverification.ymlworkflow. It also updates the audit record to reflect that the deep-audit report was re-read and the remediation path was confirmed.Scope
branchProtectionRulefield from the reconciliation GraphQL query.contents: read.403 Resource not accessible by integrationinstead of failing the job.context.payload.repository.default_branchinstead of assumingmain.verification.ymlworkflow..github/workflows/README.md..github/AUDIT_FINDINGS_SESSION.md, including confirmation that the source audit log was re-read.branchProtectionRulecontents: read,issues: write, andpull-requests: readRisk
verification.ymlremoves a non-owning legacy workflow; any missing historical coverage now depends on the existing primary CI/security workflows..github/workflows/verification.yml.Verification
Current head checks focused on the changed workflow/test surface.
python3 -m pytest tests/unit/test_repository_reconciliation_workflow.py -q --no-cov52 passedrepository-reconciliation.yml; confirmed the failing signature wasGraphqlResponseError: Resource not accessible by integration.verification.yml; confirmed repeated failures and no current delivery ownership.Production evidence
Not applicable. This change is limited to repository automation and audit metadata; there is no Vercel/runtime deployment surface.
Agent handoff