Share typed extraction control evidence
This commit is contained in:
@@ -63,14 +63,10 @@ func (identity ExtractionInputIdentity) Metadata() map[string]any {
|
||||
}
|
||||
|
||||
func extractionInputMatchesMetadata(metadata map[string]any, current ExtractionInputIdentity) bool {
|
||||
stored, ok := metadata[extractionMetadataInput].(map[string]any)
|
||||
if !ok || strings.TrimSpace(current.Checksum) == "" || strings.TrimSpace(current.SourceID) == "" {
|
||||
decoded := DecodeExtractionMetadata(metadata)
|
||||
if !decoded.InputPresent || strings.TrimSpace(current.Checksum) == "" || strings.TrimSpace(current.SourceID) == "" {
|
||||
return false
|
||||
}
|
||||
for key, want := range current.Metadata() {
|
||||
if extractionMetadataString(stored, key) != want {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
stored := decoded.Input
|
||||
return stored.Checksum == current.Checksum && stored.SourceID == current.SourceID && stored.ProducerStage == current.ProducerStage && stored.OutputKind == current.OutputKind && stored.ProducerRunID == current.ProducerRunID && stored.Provenance == current.Provenance
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user