Skip to content

Refactor safe-output repo target accessors - #53838

Merged
pelikhan merged 18 commits into
mainfrom
copilot/refactor-repo-target-extraction
Aug 20, 2026
Merged

Refactor safe-output repo target accessors#53838
pelikhan merged 18 commits into
mainfrom
copilot/refactor-repo-target-extraction

Conversation

CopilotAI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Safe-output schema generation repeated AllowedRepos and TargetRepoSlug extraction across a large tool-name switch, making new tool support easy to implement inconsistently.

  • Registry-based targeting

    • Replaced the switch with a tool-name-to-accessor registry.
    • Centralized repo-parameter eligibility and description generation.
    accessor:=repoTargetAccessors[toolName]
    targetConfig:=accessor(safeOutputs)
  • Coverage guard

    • Added a focused test that verifies the registry contains exactly the supported repo-target tools.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 33.2 AIC · ⌖ 9.48 AIC · ⊞ 6.9K ·
Comment /souschef to run again


Generated by PR Sous Chef run https://github.com/github/gh-aw/actions/runs/32249206937> Generated by 👨‍🍳 PR Sous Chef · gpt54 · 23.7 AIC · ⌖ 8.26 AIC · ⊞ 9.3K ·

Comment /souschef to run again


pr-sous-chef run https://github.com/github/gh-aw/actions/runs/32358285599> Generated by 👨‍🍳 PR Sous Chef · gpt54 · 5.47 AIC · ⌖ 8.32 AIC · ⊞ 9.3K ·

Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 27.5 AIC · ⌖ 8.07 AIC · ⊞ 6.9K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/32385519055> Generated by 👨‍🍳 PR Sous Chef · gpt54 · 15.1 AIC · ⌖ 8.25 AIC · ⊞ 9.3K ·

Comment /souschef to run again

CopilotAIand others added 2 commits August 18, 2026 22:11
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Refactor repeated repo-target extraction in safe output tool schema generationRefactor safe-output repo target accessorsAug 18, 2026
CopilotAI requested a review from pelikhanAugust 18, 2026 22:14
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

Registry-based refactor with a coverage guard test. Part of the safe-output parsing refactor cluster — batch review recommended.

Generated by 🔧 PR Triage Agent · auto · 58.5 AIC · ⌖ 2.15 AIC · ⊞ 8.3K ·

@github-actions

Copy link
Copy Markdown
Contributor

Triage: category=refactor · risk=medium · score=38/100 (impact 18/50, urgency 10/30, quality 10/20)
Recommended action:batch_review

Part of the B1-safeoutput-refactor batch (with #53841, #53840). Draft, no CI yet, no reviews. Undraft once ready and review together with the batch.

Generated by 🔧 PR Triage Agent · auto · 58.8 AIC · ⌖ 2.56 AIC · ⊞ 8.3K ·

@pelikhan
pelikhan marked this pull request as ready for review August 19, 2026 09:48
CopilotAI balanced review requested due to automatic review settings August 19, 2026 09:48

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 repository targeting into a registry, reducing duplicated tool dispatch logic.

Changes:

  • Adds tool-specific repository-target accessors.
  • Preserves centralized repo parameter generation.
  • Adds registry coverage validation.
Show a summary per file
FileDescription
pkg/workflow/safe_outputs_tools_repo_params.goReplaces the switch with an accessor registry.
pkg/workflow/safe_outputs_tools_generation_test.goVerifies the registry’s supported tool set.

Review details

💡 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

@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please take another maintainer-facing pass on this PR.

  • Refresh the branch if GitHub offers it.
  • Re-check current required checks and merge readiness on the latest head.
  • If anything is still blocking merge, address the remaining blocker directly.
  • Run the pr-finisher skill before handing back.

Generated by PR Sous Chef: https://github.com/github/gh-aw/actions/runs/32362964689

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 13.8 AIC · ⌖ 8.15 AIC · ⊞ 6.9K ·
Comment /souschef to run again

CopilotAI commented Aug 20, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot Please take another maintainer-facing pass on this PR.

  • Refresh the branch if GitHub offers it....

Finish pass complete at 2502e9e; it already contains current main, and all review threads are resolved. Local validation passes: make fmt, make lint, make test-unit, make test, and make recompile. The prior PR run 32358854299 succeeded; the current required Copilot check (32363492358) is still in progress, so GitHub reports the PR blocked pending that check and maintainer review. No code or refresh is actionable from this pass.

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

Category:refactor · Risk:medium · Score: 40/100 · Action:batch_review
Batch:B1-safeoutput-refactor

CI passing, but prior approvals were dismissed after new commits — needs re-review.

Automated triage — see the triage report issue for full context.

Generated by 🔧 PR Triage Agent · auto · 67 AIC · ⌖ 10.2 AIC · ⊞ 8.3K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please take a fresh maintainer-facing pass on this PR.

  • Refresh the branch if GitHub offers it.
  • Re-check current merge readiness and any CI or review blockers on the latest head.
  • Run the pr-finisher skill before handing back for maintainer review.

Generated by PR Sous Chef: https://github.com/github/gh-aw/actions/runs/32376962566

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 19.2 AIC · ⌖ 8.16 AIC · ⊞ 9.3K ·
Comment /souschef to run again

CopilotAI commented Aug 20, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot Please take a fresh maintainer-facing pass on this PR.

  • Refresh the branch if GitHub offers it....

Fresh finish pass complete at 2502e9e. The branch remains current with main; review threads are resolved; and make fmt, make lint, make test-unit, make test, and make recompile pass. Prior Copilot runs succeeded. The current Copilot check (32377843594) has passed setup, build, and workflow recompilation and is still processing, so merge remains blocked only pending that check and maintainer review; no refresh or code change is actionable.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please take another maintainer-facing pass on this PR.

  • Refresh the branch if GitHub offers it.
  • Confirm the resolved review feedback remains satisfied on the latest head.
  • Run the pr-finisher skill before handing back for maintainer review.

Generated by PR Sous Chef: https://github.com/github/gh-aw/actions/runs/32385519055

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 15.1 AIC · ⌖ 8.25 AIC · ⊞ 9.3K ·
Comment /souschef to run again

CopilotAIand others added 2 commits August 20, 2026 15:40
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>

CopilotAI commented Aug 20, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot Please take another maintainer-facing pass on this PR.

  • Refresh the branch if GitHub offers it....

Finish pass complete. aace5b5 refreshed the branch with current main; the resolved metadata-driven accessor feedback remains satisfied and all review threads stay resolved. I also removed an accidental unrelated skill-list addition, leaving no net change from that refresh. Local final validation completed (BASE_REF=HEAD~1 make agent-report-progress); prior Copilot run logs show successful completion, while the latest run on the refreshed head is still processing. Current head CI must be re-triggered or completed by a maintainer before merge.

@pelikhan

Copy link
Copy Markdown
Collaborator

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please take a maintainer-facing finish pass on this PR.

Please address these failing checks on the current head:

Please refresh the branch if GitHub offers it, verify merge readiness on the latest head, and use the pr-finisher skill before handing back.

Generated by PR Sous Chef: https://github.com/github/gh-aw/actions/runs/32392865801

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 8.42 AIC · ⌖ 10.5 AIC · ⊞ 9.3K ·
Comment /souschef to run again

pelikhanand others added 2 commits August 20, 2026 09:46

CopilotAI commented Aug 20, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot fix https://github.com/github/gh-aw/actions/runs/32387662241/job/96488211106

Fixed in 699abbc. The reflected AllowedRepos value now uses a checked []string assertion, satisfying the custom linter and returning the existing no-target fallback instead of panicking. BASE_REF=HEAD~1 make agent-report-progress passes.

CopilotAI commented Aug 20, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot Please take a maintainer-facing finish pass on this PR.

Please address these failing checks on the current head:...

699abbc already fixes the reported pre-fix lint-go failure; targeted custom-linter and workflow tests pass. The current head contains the latest base and all review threads are resolved. Finish-pass local validation passed through make lint and make test-unit; make test only reproduces the pre-existing CLI completion failures (write |1: file already closed). The current Windows CI failure is an unrelated required-cache miss. Current-head CI must be rerun by a maintainer.

@pelikhan
pelikhan merged commit 128c84e into mainAug 20, 2026
26 of 28 checks passed
@pelikhan
pelikhan deleted the copilot/refactor-repo-target-extraction branch August 20, 2026 17:33
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.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.

[duplicate-code] Refactor repeated repo-target extraction in safe output tool schema generation

4 participants

@gh-aw-bot@pelikhan