Skip to content

fix(runtime): resolve provider preflight from the configured source - #358

Merged
Brian Krabach (bkrabach) merged 4 commits into
mainfrom
fix/canonical-provider-preflight
Sep 21, 2026
Merged

Brian Krabach (bkrabach) merged 4 commits into
mainfrom
fix/canonical-provider-preflight

Conversation

@bkrabach

@bkrabach Brian Krabach (bkrabach) commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Credential preflight and the provider banner can import an ambient provider before the session resolves its configured source. That conflicts with Core's canonical source-module identity checks and can validate credentials against the wrong provider metadata.

Resolve metadata through the prepared bundle resolver only when an unset credential placeholder requires it. Honor entry, module, and override sources; reject metadata from another root; and render the banner without importing provider implementations. The four original PR110 companion commits are preserved as cherry-picks onto current main dbf633f.

Validation on Python 3.13, in separate virtual environments:

  • Published Core 1.6.1: full suite 2,412 passed, 45 skipped, 13 deselected, 1 expected failure.
  • Combined native Core 2.0.0 candidate 35f7aae (dev wheel): the same full-suite result; 34 focused credential/source and provider-cleanup tests also passed separately.
  • Fresh-process coverage checks configured entry/module/override sources against a conflicting ambient entry point, unset required/optional credentials, cached wrong roots, and import-free banners.
  • All nine GitHub checks passed across Linux, macOS, and Windows, including both integration jobs and CLA.

The initial local run had three ANSI-color assertions fail under inherited NO_COLOR=1 and TERM=dumb; the scope tests and both full suites passed with NO_COLOR unset and TERM=xterm-256color. No test was modified or newly excluded.

Land this backwards-compatible prerequisite before microsoft/amplifier-core#109/#110. This source change does not publish packages or modify installed environments.

Add lazy credential preflight and configured-source metadata validation without installed entry-point fallback.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Resolve credential preflight against combined effective source overrides while preserving legacy no-source behavior and fail-closed origins.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Match the actual ContextValidator asynchronous context API in generated test fixtures.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Resolve provider banner metadata from static maps and humanized identifiers without importing configured provider modules.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
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.

2 participants