feat(ci): add PR architectural impact analysis (#733)#786
Conversation
🛫 PR Readiness Check
|
| 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 | 2 active Copilot thread(s) resolved (4 outdated skipped) |
| ❌ | CI passing | 10 check(s) still running |
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
Pull request overview
Adds a new CI workflow and Node-based scripts to generate an automated “architectural impact” report for PRs into dev, including module grouping and a computed risk tier, and posts/updates the report as a PR comment.
Changes:
- Introduces
scripts/analyze-impact.mjsplus small utilities to parse changed files, score risk, and generate a markdown report. - Adds
.github/workflows/squad-impact.ymlto run the analysis onpull_request_targetand upsert a PR comment containing the report.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/analyze-impact.mjs |
Main entrypoint: fetches PR file list via gh, maps files to modules, computes tier, writes impact-report.md, emits JSON summary. |
scripts/impact-utils/parse-diff.mjs |
Helpers to parse gh pr diff --name-only output and classify files from the PR files API response. |
scripts/impact-utils/risk-scorer.mjs |
Computes risk tier and explanatory factor strings based on thresholds. |
scripts/impact-utils/report-generator.mjs |
Builds the markdown report (summary table, factors, per-module breakdown, critical files). |
.github/workflows/squad-impact.yml |
Runs the analysis on PRs targeting dev (via pull_request_target) and upserts a marker-based PR comment. |
ccb0dae to
2a58561
Compare
tamirdresher
left a comment
There was a problem hiding this comment.
LGTM. Clean Phase 1 MVP — module mapping, risk scoring, markdown report. Good foundation for Phase 2 reviewer auto-assignment.
2a58561 to
4bacbc1
Compare
|
Files in this PR:
|
- scripts/analyze-impact.mjs — main analysis engine - scripts/impact-utils/ — diff parser, risk scorer, report generator - .github/workflows/squad-impact.yml — triggers on PRs to dev Phase 1 MVP: file-count risk tiers + module mapping. Phase 2 (future): routing.md ownership + reviewer auto-assignment. Closes #733 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4bacbc1 to
7db04b2
Compare
🔒 Security Review🔒 Security review: 1 info.
Automated security review — informational only. |
🏗️ Architectural Review
Automated architectural review — informational only. |
Summary
Phase 1 MVP of automated PR architectural impact analysis (issue #733).
What's included
isk-scorer.mjs\ — calculates risk tier (LOW/MEDIUM/HIGH/CRITICAL) from change metrics
eport-generator.mjs\ — generates the markdown impact report
Security model
Risk tiers
Future (Phase 2)
outing.md\ ownership mapping
Closes #733