Skip to content

fix(adapters): use effective capabilities in shim identities - #1580

Merged
planetf1 merged 1 commit into
mainfrom
fix/1563-effective-capability
Aug 25, 2026
Merged

planetf1 merged 1 commit into
mainfrom
fix/1563-effective-capability

Conversation

@planetf1

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #1563

Description

Catalog entries separate their public lookup names from their stable capability
tokens. The legacy IntrinsicAdapter and EmbeddedIntrinsicAdapter shims built
their Identity from the lookup name, so hyphenated catalog aliases emitted a
spurious KNOWN_CAPABILITIES warning whenever they were resolved. This PR uses
the catalog entry's effective_capability for known adapter functions and
preserves raw-name lookup so existing callers can still resolve aliases.

This is a focused Phase 2 correction within Epic #929. It fixes the temporary
shim layer before its planned removal in #1144; it does not change the
catalogue, adapter loading, or the broader Phase 2 lifecycle work.

Design notes

  • Directly constructed embedded adapters with unknown custom names retain their
    raw capability and advisory warning behaviour.
  • _find_adapter() accepts either the catalog lookup name or the canonical
    capability token, preserving existing alias-based resolution after identity
    canonicalisation.
  • Custom-name collision policy is unchanged and intentionally outside this
    warning-only fix.

Testing

  • Targeted adapter shim tests: 68 passed.

  • Commit hooks passed: Block Secrets, SPDX headers, Ruff format/check, mypy,
    codespell, DCO sign-off, and generated-MDX validation.

  • The full non-qualitative suite is not claimed as green: local package-isolation
    tests encountered a build-environment permission error unrelated to this diff.

  • Tests added to the respective file if code was changed

  • New code has 100% coverage if code was added

  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.

@github-actions github-actions Bot added the bug Something isn't working label Aug 24, 2026
@planetf1
planetf1 marked this pull request as ready for review August 24, 2026 10:27
@planetf1
planetf1 requested a review from a team as a code owner August 24, 2026 10:27

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

LGTM

Comment thread mellea/backends/adapters/adapter.py Resolved
@planetf1
planetf1 force-pushed the fix/1563-effective-capability branch from bd01973 to 51f1d0c Compare August 25, 2026 11:21
@planetf1
planetf1 force-pushed the fix/1563-effective-capability branch from 51f1d0c to 237ba86 Compare August 25, 2026 11:45
@planetf1
planetf1 added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit c459435 Aug 25, 2026
11 checks passed
@planetf1
planetf1 deleted the fix/1563-effective-capability branch August 25, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapter shim Identity uses catalog name instead of effective_capability, causing spurious KNOWN_CAPABILITIES warnings

3 participants