fix: narrow binding validation to not change diagnostic contract for non-platform sources

This commit is contained in:
lda
2026-06-13 18:33:04 +07:00 Verified
parent a24f36a80e
commit b6e90c2738
2 changed files with 16 additions and 20 deletions
+14 -17
View File
@@ -29,24 +29,21 @@ def validate_deployment_dependencies(
else:
bound_source_id = bindings.get(required.logical_source)
if bound_source_id is None:
if not sources_by_id:
bound_source_id = required.logical_source
else:
diagnostics.append(
_diagnostic(
code="binding_missing",
logical_ref=logical_ref,
required=required,
message=(
f"No binding exists for logical source "
f"{required.logical_source!r}."
),
repair_hint=(
"Bind the logical source to a compatible concrete source."
),
)
diagnostics.append(
_diagnostic(
code="binding_missing",
logical_ref=logical_ref,
required=required,
message=(
f"No binding exists for logical source "
f"{required.logical_source!r}."
),
repair_hint=(
"Bind the logical source to a compatible concrete source."
),
)
continue
)
continue
source = sources_by_id.get(bound_source_id)
if source is None: