Teach DeepReport to publish a ranked function-complexity hotlist#44667
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🤖 PR Triage
Score breakdown: impact 22 + urgency 12 + quality 14 Rationale: Workflow-only change (deep-report.md/.lock.yml) adding function-complexity hotlist synthesis. Medium risk due to workflow behavior change. Grouped with similar workflow-chore PRs for batch review.
|
There was a problem hiding this comment.
Pull request overview
This PR enhances the DeepReport workflow so it can synthesize long-function (largefunc / function-length) and Sentrux complexity signals into a single, ranked “Top 10” structural-debt hotlist for pkg/workflow and pkg/cli, and adjusts workflow wiring to support collecting that data during runs.
Changes:
- Adds a DeepReport instruction step to refresh lint + Sentrux evidence, compute churn, and rank an intersection set into a top-10 refactor queue.
- Updates DeepReport’s issue-shaping guidance to require a consolidated “### Prioritized Hotlist (Top 10)” issue when overlap is meaningful.
- Imports shared Sentrux setup and expands workflow network allowlisting to permit GitHub access for tool installation.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/deep-report.md | Adds structural-debt hotspot synthesis instructions, imports Sentrux shared setup, and extends network allowlist to enable GitHub access. |
| .github/workflows/deep-report.lock.yml | Regenerates the compiled workflow to include the Sentrux import, network allowlist expansion, and Sentrux installation step. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Low
|
|
||
| 1. Refresh the authoritative long-function backlog from the current tree with `make golint-custom`, then extract only `largefunc` / `function-length` findings in `pkg/workflow` and `pkg/cli`. | ||
| 2. Run `sentrux check . --json` and capture the highest-complexity functions in `pkg/workflow` and `pkg/cli`. | ||
| 3. Compute recent churn for the candidate files with `git log --since="90 days ago" --numstat -- pkg/workflow pkg/cli`, excluding generated files such as `*.lock.yml` and `actions-lock.json`. |
| 1. Refresh the authoritative long-function backlog from the current tree with `make golint-custom`, then extract only `largefunc` / `function-length` findings in `pkg/workflow` and `pkg/cli`. | ||
| 2. Run `sentrux check . --json` and capture the highest-complexity functions in `pkg/workflow` and `pkg/cli`. | ||
| 3. Compute recent churn for the candidate files with `git log --since="90 days ago" --numstat -- pkg/workflow pkg/cli`, excluding generated files such as `*.lock.yml` and `actions-lock.json`. | ||
| 4. If the checkout is shallow, run `git fetch --unshallow origin` and then fetch the default branch history you need before churn analysis so the ranking uses real history instead of a shallow sample. |
| SENTRUX_VERSION="0.5.7" | ||
| curl -fsSL -o /tmp/gh-aw/agent/sentrux "https://github.com/sentrux/sentrux/releases/download/v${SENTRUX_VERSION}/sentrux-linux-x86_64" | ||
| chmod +x /tmp/gh-aw/agent/sentrux | ||
| sudo mv /tmp/gh-aw/agent/sentrux /usr/local/bin/sentrux | ||
| sentrux --version |
|
Run: https://github.com/github/gh-aw/actions/runs/29079112957
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed the remaining review feedback and merged |
|
Hey This PR looks well-scoped and ready for review:
Looks good to go! 🚀
|
|
@copilot please run the
|
No additional code changes were needed. The branch is already up to date with |
|
@copilot please run the
|
DeepReport was surfacing the function-length backlog and Sentrux complexity signal as separate debt indicators, but not converting them into one actionable refactor queue. This change teaches the workflow to synthesize those inputs into a single prioritized top-10 hotlist for
pkg/workflowandpkg/cli.Structural-debt hotlist generation
lint-monster+daily-sentruxfindings.largefunc/function-lengthbacklog frommake golint-custom.sentrux check . --json.Issue shape for the consolidated backlog
### Prioritized Hotlist (Top 10)table with:Workflow capability updates
git fetch --unshallow originbefore churn analysis.