Preserve explicitness across resolution shape changes

This commit is contained in:
2026-10-26 14:36:15 +00:00
parent 28ef9b6200
commit a893c7716c
7 changed files with 125 additions and 13 deletions

View File

@@ -120,7 +120,7 @@ func TestPostDecodeOverrideContextOrdersDecodeCLIAndResolutionEvidence(t *testin
if len(resolved.diagnostics) != 0 || configuration.Count != 5 || configuration.Derived != 42 {
t.Fatalf("resolution = %#v, configuration = %#v", resolved, configuration)
}
applyResolutionMetadata(&prepared.metadata, resolved)
applyResolutionMetadata(&prepared.metadata, resolved, prepared.resolution)
effectiveReferenceInput := documentWithMetadataLocations(resolved.final, prepared.metadata)
if node, ok := documentAtPath(effectiveReferenceInput, Keys("api_key")); !ok || node.Text != "RESOLVED_SECRET" || node.Location.SourceID != cliSource {
t.Fatalf("effective reference/location = %#v", node)