fix(m9/T32b): resolve $ref in InboundAPI runtime validators (no deploy-passes/runtime-400); diamond test; ref-annotation message

This commit is contained in:
Joseph Doherty
2026-06-18 12:16:39 -04:00
parent 26e2cdef23
commit 71d5722692
9 changed files with 424 additions and 25 deletions
@@ -186,10 +186,15 @@ public class ValidationService
return;
}
foreach (var missing in parsed.UnresolvedRefs)
foreach (var missing in parsed.UnresolvedReferences)
{
// Keep the lib:-qualified pointer name SEPARATE from the diagnostic
// reason so the message reads "schema 'lib:Foo' could not be resolved
// (cyclic reference)" rather than embedding the annotation inside the
// lib:-looking string (M9-T32b code-review MINOR).
var reasonSuffix = missing.Reason is null ? string.Empty : $" ({missing.Reason})";
errors.Add(ValidationEntry.Error(ValidationCategory.SchemaReference,
$"Script '{scriptName}' {schemaLabel} references schema 'lib:{missing}' which could not be resolved.",
$"Script '{scriptName}' {schemaLabel} references schema 'lib:{missing.Name}' which could not be resolved{reasonSuffix}.",
scriptName));
}
}