Skip to content

Refactor safe-output repo target accessors - #53838

Open
pelikhan with Copilot wants to merge 18 commits into
mainfrom
copilot/refactor-repo-target-extraction
Open

Refactor safe-output repo target accessors#53838
pelikhan with Copilot wants to merge 18 commits into
mainfrom
copilot/refactor-repo-target-extraction

Conversation

Copilot AI 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

Copilot AI and 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>
Copilot AI changed the title [WIP] Refactor repeated repo-target extraction in safe output tool schema generation Refactor safe-output repo target accessors Aug 18, 2026
Copilot AI requested a review from pelikhan August 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
Copilot AI balanced review requested due to automatic review settings August 19, 2026 09:48

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 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
File Description
pkg/workflow/safe_outputs_tools_repo_params.go Replaces the switch with an accessor registry.
pkg/workflow/safe_outputs_tools_generation_test.go Verifies 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-actions Bot 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-actions Bot 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-actions Bot 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-actions Bot 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 🏗️

Copilot AI and others added 2 commits August 20, 2026 09:30
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…-target-extraction

# Conflicts:
#	pkg/intent/governance_formal_test.go

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

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please take another maintainer-facing pass on this PR. Confirm the latest head is still merge-ready, refresh the branch if helpful, clear any remaining blockers, and run the pr-finisher ski...

Refreshed the branch with current main in 2502e9e; it is clean and has no unresolved review threads. make fmt, make lint, make test-unit, make recompile, and make agent-report-progress pass; secret scan and automated code review are clean. make test is blocked by pre-existing pkg/cli completion tests (write |1: file already closed) from the refreshed base. CI on this agent head is unverified and needs a maintainer-triggered run before merge.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please take another pass on this PR: refresh the branch if GitHub offers it, review any current CI status, and use the pr-finisher skill to move this toward merge readiness.

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

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please take another pass on this PR: refresh the branch if GitHub offers it, review any current CI status, and use the pr-finisher skill to move this toward merge readiness.

Generated by [...

2502e9e is current with main, so no refresh was needed. All review threads remain resolved, and make agent-report-progress passes. Current CI includes an in-progress Copilot run (setup, build, and workflow recompilation have passed so far); prior action-required runs contain no failed jobs or logs. GitHub still reports the PR as blocked pending required checks/review.

@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

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@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

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@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

Copilot AI and 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>

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@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

pelikhan and others added 2 commits August 20, 2026 09:46

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

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

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

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

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.

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

4 participants