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

CopilotAI 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)
iferr:=c.appendHandlerManagerStep(data, &state); err!=nil {
returnnil, 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>
CopilotAI changed the title [WIP] Track function-length refactoring findings from golintRefactor safe-outputs handler assemblyAug 7, 2026
CopilotAI requested a review from pelikhanAugust 7, 2026 22:37
@pelikhan
pelikhan marked this pull request as ready for review August 7, 2026 22:39
CopilotAI balanced review requested due to automatic review settings August 7, 2026 22:39

CopilotAI 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
FileDescription
pkg/workflow/compiler_safe_outputs_job.goDecomposes safe-output handler assembly and output mapping.
pkg/workflow/compiler_safe_outputs_job_test.goTests 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>

CopilotAI commented Aug 7, 2026

Copy link
Copy Markdown
ContributorAuthor

@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.

@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

CopilotAI commented Aug 7, 2026

Copy link
Copy Markdown
ContributorAuthor

@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

Copy link
Copy Markdown
Contributor

Triage

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

ComponentScore
Impact25/50
Urgency15/30
Quality15/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 mainAug 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
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.86.2

Sign up for freeto 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

@gh-aw-bot@pelikhan