Commit Graph

3 Commits

Author SHA1 Message Date
freemo 3224f2136e fix(resource-registry): use full inheritance chain in contextual binding type compatibility
CI / lint (pull_request) Successful in 27s
CI / typecheck (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 32s
CI / security (pull_request) Successful in 59s
CI / build (pull_request) Successful in 29s
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 6m58s
CI / e2e_tests (pull_request) Successful in 19m39s
CI / integration_tests (pull_request) Successful in 22m49s
CI / coverage (pull_request) Successful in 10m43s
CI / docker (pull_request) Successful in 1m23s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m57s
Replace the flat `parent_types` membership check in
`BindingResolutionService._is_type_compatible` with a call to
`self._registry.is_subtype_of()`, which uses
`resolve_inheritance_chain()` from `cleveragents.resource.inheritance`
to walk the full ADR-042 inheritance chain.

Previously, a tool requiring type `container-instance` would fail to
bind a `devcontainer-instance` resource because the check only looked
at the immediate `parent_types` list rather than traversing the full
chain.  The fix ensures multi-level inheritance (e.g.
`local/special-dev-container` → `devcontainer-instance` →
`container-instance`) is correctly resolved for contextual, static,
and parameter bindings.

Changes:
- `binding_resolution_service.py`: `_is_type_compatible` now delegates
  to `registry.is_subtype_of()`; removed unused `ResourceTypeSpec`
  import.
- `consolidated_binding_resolution.feature`: 4 new scenarios covering
  2-level chain, 3-level chain, unrelated-type rejection, and static
  binding via inheritance chain.
- `binding_resolution_steps.py`: mock registry exposes
  `is_subtype_of()` backed by the real inheritance engine; new step
  definitions for inheritance chain setup.

ISSUES CLOSED: #2929
2026-04-05 17:55:54 +00:00
freemo 79f91c51b1 Tests: ensuring tests have coverage and work. 2026-02-17 20:55:49 -05:00
freemo a4db605e1c feat(tool): add resource binding resolution 2026-02-17 20:55:46 -05:00