Skip to content

fix: disambiguate adapter matching and populate fallback resource params#30

Merged
avrabe merged 1 commit intomainfrom
fix/resource-adapter-disambiguation
Mar 15, 2026
Merged

fix: disambiguate adapter matching and populate fallback resource params#30
avrabe merged 1 commit intomainfrom
fix/resource-adapter-disambiguation

Conversation

@avrabe
Copy link
Contributor

@avrabe avrabe commented Mar 15, 2026

Summary

  • Bug 1: AdapterSite now tracks import_module (the caller's core import module name) to disambiguate same-named functions from different interfaces. Previously .find() matched on bare function name only.
  • Bug 2: The single-export fallback resolver path now uses lift_info_by_core_func to populate resource_params, pointer pair positions, copy layouts, and all other AdapterRequirements fields.

Fixtures promoted to runtime (4)

  • resource_alias — two interfaces with function named "a"
  • with-and-resources — two interfaces with function named "bar"
  • versions — versioned interfaces @0.1.0 / @0.2.0 with same function names
  • xcrate — 3-component chain with resources resolved via fallback path

Test plan

  • 73 tests pass (4 promoted from fuse-only to runtime)
  • Full suite: 265 tests, 0 failures
  • Pre-commit hooks pass (fmt, clippy, test)

🤖 Generated with Claude Code

…llback path

Bug 1: AdapterSite now tracks the caller's core import module name
(import_module field) so the merger disambiguates same-named functions
from different interfaces. Previously .find() matched on bare function
name only, wiring both e.g. "test:e1#a" and "test:e2#a" to the same
adapter when both export a function named "a".

Bug 2: The single-export fallback resolver path now uses
lift_info_by_core_func (which provides the component type index)
instead of lift_options_by_core_func. This enables populating
resource_params, pointer pair positions, copy layouts, and all other
AdapterRequirements fields that were previously only set in the
per-function interface matching path.

Promotes 4 fixtures from fuse-only to runtime: resource_alias,
with-and-resources, versions, xcrate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit 1bcf9b0 into main Mar 15, 2026
3 checks passed
@avrabe avrabe deleted the fix/resource-adapter-disambiguation branch March 15, 2026 18:56
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