Skip to content

Teach DeepReport to publish a ranked function-complexity hotlist#44667

Closed
pelikhan with Copilot wants to merge 6 commits into
mainfrom
copilot/deep-report-publish-hotlist
Closed

Teach DeepReport to publish a ranked function-complexity hotlist#44667
pelikhan with Copilot wants to merge 6 commits into
mainfrom
copilot/deep-report-publish-hotlist

Conversation

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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/workflow and pkg/cli.

  • Structural-debt hotlist generation

    • Adds an explicit DeepReport step for overlapping lint-monster + daily-sentrux findings.
    • Refreshes the current largefunc / function-length backlog from make golint-custom.
    • Pulls current Sentrux complexity data from sentrux check . --json.
    • Ranks candidates by:
      1. Sentrux complexity
      2. recent churn
      3. execution-path centrality in workflow/CLI code
  • Issue shape for the consolidated backlog

    • Requires one of the 7 DeepReport issues to become a single consolidated hotlist when the overlap is meaningful.
    • Defines a ### Prioritized Hotlist (Top 10) table with:
      • rank
      • function
      • file
      • complexity evidence
      • churn evidence
      • suggested refactor seam
    • Requires an explicit note when churn is only available at file granularity.
  • Workflow capability updates

    • Imports shared Sentrux setup into DeepReport so the workflow can gather current structural metrics directly.
    • Expands allowed network access to include GitHub for Sentrux installation.
    • Makes the shallow-clone guidance concrete by specifying git fetch --unshallow origin before churn analysis.
### Prioritized Hotlist (Top 10)

| Rank | Function | File | Complexity evidence | Churn evidence | Refactor seam |
|------|----------|------|---------------------|----------------|---------------|
| 1 | compileWorkflow | pkg/workflow/... | sentrux hotspot + largefunc | 90d file churn | split parse / validate / emit |

Generated by 👨‍🍳 PR Sous Chef · 4.34 AIC · ⌖ 5.93 AIC · ⊞ 7.1K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · 11.3 AIC · ⌖ 6.23 AIC · ⊞ 7.1K ·
Comment /souschef to run again

Copilot AI and others added 2 commits July 10, 2026 06:48
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Publish prioritized top-10 complexity hotlist from audits Teach DeepReport to publish a ranked function-complexity hotlist Jul 10, 2026
Copilot AI requested a review from pelikhan July 10, 2026 06:55
@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

Field Value
Category feature
Risk 🟡 Medium
Score 48 / 100
Action 🔄 batch_review
Batch pr-batch:workflow-chore

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.

Generated by 🔧 PR Triage Agent · 44.7 AIC · ⌖ 5.13 AIC · ⊞ 5.4K ·

@pelikhan pelikhan marked this pull request as ready for review July 10, 2026 07:35
Copilot AI review requested due to automatic review settings July 10, 2026 07:35

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.

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

Comment thread .github/workflows/deep-report.md Outdated

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`.
Comment thread .github/workflows/deep-report.md Outdated
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.
Comment on lines +777 to +781
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
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

pr-sous-chef
@copilot please run the pr-finisher skill, ensure the branch is up to date, address any remaining review feedback, and rerun checks.

Run: https://github.com/github/gh-aw/actions/runs/29079112957

Generated by 👨‍🍳 PR Sous Chef · 8.44 AIC · ⌖ 5.58 AIC · ⊞ 7.1K ·
Comment /souschef to run again

Copilot AI and others added 2 commits July 10, 2026 08:27
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>

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

pr-sous-chef
@copilot please run the pr-finisher skill, ensure the branch is up to date, address any remaining review feedback, and rerun checks.
...

Addressed the remaining review feedback and merged main into the branch in a5a130b. Local make fmt, make lint, make test-unit, make test, make recompile, and make agent-report-progress all passed. CI on this head is still stale after the agent push, so a maintainer needs to re-trigger checks before merge.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @app/copilot-swe-agent 👋 — great work synthesizing the lint-monster + daily-sentrux overlap into a single prioritized refactor hotlist for pkg/workflow and pkg/cli! The structured hotlist table shape and concrete ranking criteria (complexity → churn → centrality) make this immediately actionable.

This PR looks well-scoped and ready for review:

  • ✅ Clear description explaining the problem and the solution
  • ✅ Focused on a single concern (DeepReport hotlist generation)
  • ✅ Tests updated — golden files and docker_firewall_pin_compile_test.go reflect the changes
  • ✅ No new external dependencies introduced

Looks good to go! 🚀

Generated by ✅ Contribution Check · 115.9 AIC · ⌖ 13.8 AIC · ⊞ 6.2K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address any remaining review feedback, refresh the branch if needed, and rerun checks.

Generated by 👨‍🍳 PR Sous Chef · 4.34 AIC · ⌖ 5.93 AIC · ⊞ 7.1K ·
Comment /souschef to run again

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address any remaining review feedback, refresh the branch if needed, and rerun checks.

...

No additional code changes were needed. The branch is already up to date with main at fc37683, the earlier review feedback is already present in the current workflow sources/lockfile, and I re-ran local make fmt, make lint, make test-unit, make test, make recompile, and make agent-report-progress successfully on this head. The PR checks on the agent-pushed head are still stale / action-required from the cloud-agent workflow model, so a maintainer needs to re-trigger CI before merge.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review comments, refresh the branch if needed, and rerun checks once ready.
Unresolved review threads:

Generated by 👨‍🍳 PR Sous Chef · 11.3 AIC · ⌖ 6.23 AIC · ⊞ 7.1K ·
Comment /souschef to run again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-report] Publish a prioritized top-10 complexity hotlist from function-length + sentrux data

4 participants