Skip to content

ci: add safe repo-health shadow verification - #2094

Merged
bradygaster merged 2 commits into
devfrom
bradygaster-issue-1800-repo-health-shadow-harness
Sep 28, 2026
Merged

bradygaster merged 2 commits into
devfrom
bradygaster-issue-1800-repo-health-shadow-harness

Conversation

@bradygaster

Copy link
Copy Markdown
Collaborator

Summary

  • add a read-only pull_request shadow workflow that exercises proposed repo-health scanners and the real reporter contract from PR head without GitHub write permissions
  • preserve the authoritative pull_request_target workflow as base-controlled and label its reporter comments as authoritative evidence
  • expand hostile transport coverage for backticks, bare ${, quotes, and multiline diagnostics, including comment lifecycle and API failure propagation
  • document a disposable post-merge canary that proves the merged authoritative writer creates and cleans up its marker comment

Trust 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 passed
  • npx --no-install eslint scripts/repo-health-comment.mjs test/scripts/repo-health-comment-transport.test.ts — passed
  • actionlint .github/workflows/squad-repo-health-shadow.yml .github/workflows/squad-repo-health.yml — passed
  • node scripts/check-squad-leakage.mjs origin/dev HEAD — clean
  • node scripts/architectural-review.mjs origin/dev HEAD — informational template-sync finding only
  • node scripts/security-review.mjs origin/dev HEAD — existing false-positive warning for the literal persist-credentials safety key
  • CI=true npm run build — passed
  • security review and focused rereview — approved

Post-merge evidence

After merge, follow .github/REPO_HEALTH_RUNBOOK.md to open the disposable canary PR, record the canary PR URL and both successful authoritative Repo Health run URLs, verify exact hostile filename transport, verify stale marker cleanup, then close the canary without merging.

Closes #1800

bradygaster and others added 2 commits September 28, 2026 12:33
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>
Copilot AI lite review requested due to automatic review settings September 28, 2026 19:38
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 25c5d7f

PR Scope: 🔧 Infrastructure

⚠️ 2 item(s) to address before review

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.

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

⚠️ Architectural review: 1 info.

Severity Category Finding Files
ℹ️ info template-sync Template files changed in .github/workflows/ but not in other template locations. If these templates should stay in sync, consider updating the others too. Changed: .github/workflows/, Unchanged: templates/, .squad-templates/, packages/squad-cli/templates/

Automated architectural review — informational only.

@github-actions

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #2094

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 4
Files added 2
Files modified 2
Files deleted 0
Modules touched 3

🎯 Risk Factors

  • 4 files changed (≤5 → LOW)
  • 3 modules touched (2-4 → MEDIUM)

📦 Modules Affected

ci-workflows (2 files)
  • .github/REPO_HEALTH_RUNBOOK.md
  • .github/workflows/squad-repo-health-shadow.yml
scripts (1 file)
  • scripts/repo-health-comment.mjs
tests (1 file)
  • test/scripts/repo-health-comment-transport.test.ts

This report is generated automatically for every PR. See #733 for details.

@github-actions

Copy link
Copy Markdown
Contributor

🔒 Security Review

🔒 Security review: 1 warning(s).

Severity Category Finding Location
🟡 warning pii-env-var Environment variable with sensitive name pattern (CREDENTIALS) — ensure this isn't hardcoded. .github/workflows/squad-repo-health-shadow.yml:35

Automated security review — informational only.

Copilot AI 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.

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.

@bradygaster
bradygaster merged commit 43d0adc into dev Sep 28, 2026
20 checks passed
@bradygaster
bradygaster deleted the bradygaster-issue-1800-repo-health-shadow-harness branch October 3, 2026 00:11
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.

Runbook gotcha: any fix to squad-repo-health.yml is unverifiable in CI until it merges

2 participants