Repository navigation
ci: add safe repo-health shadow verification - #2094
Conversation
Add a read-only pull_request shadow that exercises proposed scanners and the real reporter contract without mutating GitHub. Document the authoritative post-merge hostile-filename canary and label production comments by evidence level. Closes #1800 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Closes #1800 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ✅ | CI passing | All checks passing |
Files Changed (4 files, +303 −7)
| File | +/− |
|---|---|
.github/REPO_HEALTH_RUNBOOK.md |
+97 −0 |
.github/workflows/squad-repo-health-shadow.yml |
+73 −0 |
scripts/repo-health-comment.mjs |
+6 −0 |
test/scripts/repo-health-comment-transport.test.ts |
+127 −7 |
Total: +303 −7
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🏗️ Architectural Review
Automated architectural review — informational only. |
🟡 Impact Analysis — PR #2094Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (2 files)
scripts (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
🔒 Security Review🔒 Security review: 1 warning(s).
Automated security review — informational only. |
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Summary
pull_requestshadow workflow that exercises proposed repo-health scanners and the real reporter contract from PR head without GitHub write permissionspull_request_targetworkflow as base-controlled and label its reporter comments as authoritative evidence${, quotes, and multiline diagnostics, including comment lifecycle and API failure propagationTrust boundary
The shadow workflow is intentionally non-authoritative: it runs PR-head code with
contents: read,persist-credentials: false, fake Octokit, and no mutation path. The existing elevated production workflow remains base-controlled and never checks out or executes PR-head code.Only the documented post-merge canary is authoritative evidence that the merged production workflow/helper revision is live.
Validation
npx --no-install vitest run test/scripts/repo-health-comment-transport.test.ts— 13 passednpx --no-install eslint scripts/repo-health-comment.mjs test/scripts/repo-health-comment-transport.test.ts— passedactionlint .github/workflows/squad-repo-health-shadow.yml .github/workflows/squad-repo-health.yml— passednode scripts/check-squad-leakage.mjs origin/dev HEAD— cleannode scripts/architectural-review.mjs origin/dev HEAD— informational template-sync finding onlynode scripts/security-review.mjs origin/dev HEAD— existing false-positive warning for the literalpersist-credentialssafety keyCI=true npm run build— passedPost-merge evidence
After merge, follow
.github/REPO_HEALTH_RUNBOOK.mdto open the disposable canary PR, record the canary PR URL and both successful authoritativeRepo Healthrun URLs, verify exact hostile filename transport, verify stale marker cleanup, then close the canary without merging.Closes #1800