Skip to content

fix(tools): normalize credential selectors before validation - #7625

Open
BillLeoutsakosvl346 wants to merge 3 commits into
stagingfrom
fix/platform-credential-aliases
Open

BillLeoutsakosvl346 wants to merge 3 commits into
stagingfrom
fix/platform-credential-aliases

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • Normalize credential aliases into the selector declared by the tool before required-input validation, for raw and Copilot execution.
  • Keep an explicitly supplied declared selector authoritative; reject blank/non-string selections instead of silently choosing another credential.
  • Use the canonical selector after environment-reference resolution so stale compatibility aliases cannot replace the resolved value.
  • Publish one credentialId field in Copilot schemas, including selector-only stored-credential tools. Remove redundant normalization from the Copilot wrapper.
  • Keep existing credential authorization, hidden token injection, default schemas, and public direct-execution nested-alias rejection unchanged.

Validation

  • 358 tests pass across seven affected suites, including raw/Copilot alias execution, explicit precedence, malformed values, authorization rejection, environment references, schema consumers, and public direct-execution contracts (maxWorkers=2).
  • App type-check, changed-file Biome, API validation, and git diff --check pass.
  • Six existing files changed; no generators, service registrations, or auth-enum changes.

@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 3, 2026 4:13am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; credential aliases converge on the declared selector before validation and continue through existing authorization controls.

Summary

  • Maps supported aliases to each tool’s declared selector before required-input validation.
  • Preserves explicit-selector precedence and rejects blank or non-string selections.
  • Keeps environment-reference resolution and credential authorization in the established execution path.
  • Removes redundant alias injection from the Copilot fallback wrapper.
  • Adds focused coverage for raw and Copilot execution, precedence, malformed values, authorization, environment references, and schema projection.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Raw or Copilot tool arguments] --> B[Select explicit declared selector or compatibility alias]
    B --> C[Validate nonempty string]
    C --> D[Write canonical declared selector]
    D --> E[Validate required parameters]
    E --> F[Resolve permitted environment references]
    F --> G[Copy canonical selector to credential lookup input]
    G --> H[Authorize and resolve credential token]
    H --> I[Inject protected token fields]
    I --> J[Execute tool operation]
Loading

Preserve declared credential selector normalization before validation and after environment resolution. Apply the wrapper simplification to the renamed Mothership executor and adapt the credential reference regression to staging's environment snapshot interface.

This branch was previously deployed

1 inactive deployment
Preview — 5f072d51 Deployed Oct 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant