Skip to content

Refactor safe-outputs handler assembly - #51229

Merged
pelikhan merged 4 commits into
mainfrom
copilot/lint-monster-function-length-refactoring-another-one
Aug 8, 2026
Merged

Refactor safe-outputs handler assembly#51229
pelikhan merged 4 commits into
mainfrom
copilot/lint-monster-function-length-refactoring-another-one

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The function-length backlog includes the safe-outputs compiler, where handler setup, output mapping, SARIF handling, and custom actions were combined in a 223-line function.

  • Handler assembly

    • Split setup, staging download, handler-manager, SARIF, and custom-action concerns into focused helpers.
    • Preserved safe-output step ordering and existing error propagation.
  • Output mappings

    • Isolated shared, conditional, and named handler output registration.
    • Kept output names and GitHub Actions expressions unchanged.
  • Coverage

    • Added focused assertions for shared outputs, agent assignment/session outputs, artifact slots, and named issue/PR/comment outputs.
state := safeOutputsHandlerOutputsAndActionState{outputs: make(map[string]string)}
c.appendUploadArtifactStagingDownloadStep(data, prefix, &state)
if err := c.appendHandlerManagerStep(data, &state); err != nil {
    return nil, nil, nil, err
}

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 39.7 AIC · ⊞ 8.5K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12.1 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Track function-length refactoring findings from golint Refactor safe-outputs handler assembly Aug 7, 2026
Copilot AI requested a review from pelikhan August 7, 2026 22:37
@pelikhan
pelikhan marked this pull request as ready for review August 7, 2026 22:39
Copilot AI balanced review requested due to automatic review settings August 7, 2026 22:39

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

Refactors safe-output handler assembly into focused helpers while preserving behavior and output mappings.

Changes:

  • Extracts handler setup, SARIF, artifact, and custom-action assembly helpers.
  • Separates shared, conditional, and named output registration.
  • Adds focused output-mapping tests.
Show a summary per file
File Description
pkg/workflow/compiler_safe_outputs_job.go Decomposes safe-output handler assembly and output mapping.
pkg/workflow/compiler_safe_outputs_job_test.go Tests handler-manager and named output mappings.

Review details

Tip

Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Quick triage nudge for this PR.

Please refresh the branch if needed, check for any unresolved reviewer feedback, run the pr-finisher skill, and hand back to maintainers once the PR is ready.

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

Generated by 👨🍳 PR Sous Chef
Comment /souschef to run again

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 39.7 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Quick triage nudge for this PR.

Please refresh the branch if needed, check for any unresolved reviewer feedback, run the pr-finisher skill, and hand back to maintainers once the PR is read...

Branch is current with main and there are no unresolved review threads. Local make test-unit and make test pass on the current HEAD after fetching origin/main; make lint is still blocked by unrelated pre-existing issues in unchanged files (pkg/workflow/awf_feature_flags_test.go and pkg/cli/codemod_bash_allowlist_unsupported_engine.go). The last-known PR workflow runs on this HEAD are stale/action_required, so a maintainer will need to re-trigger CI before merge.

Copilot AI requested a review from gh-aw-bot August 7, 2026 23:20
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Quick triage nudge for this PR.

Please refresh the branch if needed, check for any unresolved reviewer feedback, run the pr-finisher skill, and hand back to maintainers once the PR is ready.

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

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12.1 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Quick triage nudge for this PR.

Please refresh the branch if needed, check for any unresolved reviewer feedback, run the pr-finisher skill, and hand back to maintainers once the PR is read...

Branch is still current with main and there are no unresolved review threads. I re-ran local validation on /home/runner/work/gh-aw/gh-aw: make fmt, make test-unit, and make test pass; make lint is still blocked by unrelated pre-existing issues in unchanged files (/home/runner/work/gh-aw/gh-aw/pkg/workflow/awf_feature_flags_test.go and /home/runner/work/gh-aw/gh-aw/pkg/cli/codemod_bash_allowlist_unsupported_engine.go). Run 31227649983 had no failed jobs, and the PR workflows on HEAD 640bbac are still stale action_required, so a maintainer needs to re-trigger CI before merge.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Triage

Category: refactor | Risk: low | Score: 55/100

Component Score
Impact 25/50
Urgency 15/30
Quality 15/20

Recommended action: batch_review (batch: refactor-eng, with #51216)

CI passing, focused change (3 files, +117/-119) refactoring safe-outputs handler assembly. Group with #51216 for a combined engine/compiler refactor review pass.

Generated by 🔧 PR Triage Agent · auto · 39.7 AIC · ⌖ 2.79 AIC · ⊞ 8K ·

@pelikhan
pelikhan merged commit b856d0f into main Aug 8, 2026
27 of 28 checks passed
@pelikhan
pelikhan deleted the copilot/lint-monster-function-length-refactoring-another-one branch August 8, 2026 01:26
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.

[lint-monster] lint-monster: function-length refactoring tracker

4 participants