Separate projection cloning and value comparison

This commit is contained in:
2026-09-07 01:08:43 +00:00
parent 633c5cd519
commit 1cc645f30f
15 changed files with 447 additions and 406 deletions

View File

@@ -275,7 +275,7 @@ func loadWithSecretLookup[T any](source Source, lookup secretLookup, supplied ..
}
// A read-only validator can replace a value with an equal borrowed object.
// Projected mutation checks cannot detect that alias, so detach at publication.
published, ownershipIssue := cloneConfigurationState(schema, reflect.ValueOf(configuration), defaultProjectionLimits(), true)
published, ownershipIssue := cloneConfigurationWithMode(schema, reflect.ValueOf(configuration), defaultProjectionLimits(), cloneValidatedSecrets)
if ownershipIssue != nil {
accumulator.add(diagnosticFromDecodeIssue(decodeIssueFromProjection(ownershipIssue)))
return nil, accumulator.loadError()