Skip to content

Refactor safe-output repo target accessors - #53838

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

Refactor safe-output repo target accessors#53838
pelikhan with Copilot wants to merge 3 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.

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 ·

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

2 participants