Cache final typed producer artifacts under the initial native request hash

This commit is contained in:
2026-11-22 02:10:05 +00:00
parent 3ef55b1cf0
commit 36906cb3d1
15 changed files with 878 additions and 15 deletions

View File

@@ -52,13 +52,14 @@ type preparedLaneExecutor struct {
}
type preparedTypedLane struct {
extractor any
merger any
normalizer any
extract typedExtractOperation
merge typedMergeOperation
normalize typedNormalizeOperation
codec artifactCodecEntry
extractor any
merger any
normalizer any
extract typedExtractOperation
merge typedMergeOperation
normalize typedNormalizeOperation
codec artifactCodecEntry
cacheEvidence func(any) ([]source.SourceRef, error)
}
type preparedEvidencePlan struct {
@@ -228,6 +229,13 @@ func prepareLane(pipeline ResolvedPipeline, lane ResolvedArtifactLane, registrie
return preparedLaneExecutor{}, constructionError(pipeline.ID, lane.ID, StageExtract, lane.Extract.Module, "", codecErr)
}
executor.typed = &preparedTypedLane{extractor: module, extract: extractEntry.extract, codec: codec}
if registry := registries.ArtifactEvidence; registry != nil {
if evidence, ok := registry.entries[lane.ArtifactKind]; ok {
// Projectors retain their own exact-type check. A mismatch is an
// unusable cache entry, not a reason to inspect domain JSON.
executor.typed.cacheEvidence = evidence.project
}
}
executor.extractValidators, err = prepareValidatorChain(pipeline, registries, deps, StageExtract, lane.ID, lane.Extract.Module, lane.ExtractReferences.ReferenceSet)
if err != nil {