Conversation
🧠 Arbor Graph Impact ReportBlast Radius: High-centrality nodes affected? 🧠 Arbor Graph Impact ReportCommand: ```json Powered by Arbor graph governance for code. See https://github.com/Anandb71/arbor for details. |
There was a problem hiding this comment.
Pull request overview
Updates the Arbor PR bot workflow to generate PR impact reports using the CLI’s diff command, and adds base/head SHA range support so the CLI can compute changed files for a PR commit range (not just local working tree changes).
Changes:
- Add
ARBOR_DIFF_BASE/ARBOR_DIFF_HEADsupport inarbor-clito compute changed files from a commit-to-commit diff. - Update the composite GitHub Action to capture CLI output into
arbor-impact.mdfor PR bot reporting. - Update the PR bot workflow to set base/head SHAs and run
diff . --json.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| crates/arbor-cli/src/commands.rs | Adds env-driven base/head ranged diff support for changed-file detection. |
| action.yml | Adjusts PR-bot reporting behavior to wrap CLI output into a markdown report file. |
| .github/workflows/arbor-pr-bot.yml | Switches PR bot to run diff . --json and passes PR base/head SHAs via env. |
| echo '```' | ||
| } > arbor-impact.md | ||
| echo "Generated impact report from CLI output." |
There was a problem hiding this comment.
The code-fence lines are being echoed with backslash-escaped backticks (e.g. \```json). In bash single quotes, backslashes are literal, so the generated markdown will contain ````and won’t render as a fenced code block. Emit plain triple-backticks (andjson` if appropriate) so the report renders correctly.
| if [[ "${{ inputs.command }}" == *"diff"* || "${{ inputs.command }}" == *"check"* || "${{ inputs.command }}" == *"pr-summary"* || "${{ inputs.command }}" == *"analyze-impact"* ]]; then | ||
| if arbor ${{ inputs.command }} > /tmp/arbor-impact.out 2>/tmp/arbor-impact.err; then | ||
| { | ||
| echo "## 🧠 Arbor Graph Impact Report" | ||
| echo "Command: \`${{ inputs.command }}\`" | ||
| echo | ||
| echo '```json' | ||
| cat /tmp/arbor-impact.out || true | ||
| echo '```' | ||
| } > arbor-impact.md |
There was a problem hiding this comment.
The report always labels the output block as json, but this step also wraps check, pr-summary, and analyze-impact outputs which may not be JSON. Consider using an unlabeled code fence by default, or choose the fence language based on whether inputs.command includes --json to avoid misleading/incorrect rendering.
| echo "Command: \`${{ inputs.command }}\`" | ||
| echo | ||
| echo '```json' | ||
| cat /tmp/arbor-impact.out || true |
There was a problem hiding this comment.
arbor-impact.md now includes its own top-level "## 🧠 Arbor Graph Impact Report" heading, but the workflow that posts the comment also prepends the same heading. This will result in duplicated headers in the PR comment; consider removing the heading from the action output file (or updating the workflow template) so the posted comment has a single consistent title.
| let range_base = std::env::var("ARBOR_DIFF_BASE").ok(); | ||
| let range_head = std::env::var("ARBOR_DIFF_HEAD").ok(); | ||
|
|
||
| if let (Some(base), Some(head)) = (range_base, range_head) { | ||
| let base = base.trim(); | ||
| let head = head.trim(); | ||
|
|
||
| if !base.is_empty() && !head.is_empty() { | ||
| let ranged = run_git( | ||
| path, | ||
| &["diff", "-w", "--name-status", "--find-renames", base, head], | ||
| )?; | ||
|
|
||
| let mut files = parse_git_name_status_output(&ranged); | ||
| files.retain(|path| !is_generated_or_internal_path(path)); | ||
| files.sort(); | ||
| files.dedup(); | ||
|
|
||
| return Ok(files); |
There was a problem hiding this comment.
New behavior for ARBOR_DIFF_BASE/ARBOR_DIFF_HEAD changes how git_changed_files computes the change set (commit-to-commit diff vs working tree). There are tests for parsing/filtering, but nothing exercising this ranged-diff path; adding a test (e.g., create a temp git repo with two commits and assert the returned file list) would help prevent regressions in the PR-bot flow.
🧠 Arbor Graph Impact ReportBlast Radius: High-centrality nodes affected? Command: {
"changed_files": [
".github/workflows/arbor-pr-bot.yml",
"action.yml",
"crates/arbor-cli/src/commands.rs"
],
"changed_symbols": 72,
"impact": {
"api_entrypoints_affected": 22,
"blast_radius_nodes": 59,
"direct_callers": 37,
"files_likely_require_updates": 5,
"indirect_callers": 23
}
}Powered by Arbor graph governance for code. See https://github.com/Anandb71/arbor for details. |
…ge support
Description
Brief description of what this PR does. Link any related issues.
Fixes #(issue number)
Type of Change
Changes Made
Testing
Describe how you tested your changes:
cargo test --allcargo clippy --allflutter test(if applicable)Screenshots (if applicable)
For visualizer changes, include before/after screenshots.
Checklist