Serialize typed artifacts at durable boundaries
This commit is contained in:
@@ -75,6 +75,46 @@ type NormalizeCheckpoint struct {
|
||||
Warnings []contracts.Warning
|
||||
}
|
||||
|
||||
// ArtifactCheckpointOutput is the durable, domain-neutral value stored at a
|
||||
// typed lane checkpoint boundary.
|
||||
type ArtifactCheckpointOutput struct {
|
||||
LaneID string
|
||||
ModuleKey string
|
||||
SourceID string
|
||||
ChunkID string
|
||||
ChunkIndex int
|
||||
ChunkRef source.SourceRef
|
||||
Artifact contracts.SerializedArtifact
|
||||
SchemaDigest string
|
||||
}
|
||||
|
||||
type ArtifactExtractCheckpoint struct {
|
||||
Outputs []ArtifactCheckpointOutput
|
||||
Rejected []contracts.RejectedOutput
|
||||
Warnings []contracts.Warning
|
||||
}
|
||||
|
||||
type ArtifactMergeCheckpoint struct {
|
||||
Output ArtifactCheckpointOutput
|
||||
Warnings []contracts.Warning
|
||||
}
|
||||
type ArtifactNormalizeCheckpoint struct {
|
||||
Output ArtifactCheckpointOutput
|
||||
Warnings []contracts.Warning
|
||||
}
|
||||
|
||||
type ArtifactCheckpointRecorder interface {
|
||||
ArtifactExtractSucceeded(string, string, []CheckpointFingerprint, []ArtifactCheckpointOutput, []contracts.RejectedOutput, []contracts.Warning) error
|
||||
ArtifactMergeSucceeded(string, string, []CheckpointFingerprint, ArtifactCheckpointOutput, []contracts.Warning) error
|
||||
ArtifactNormalizeSucceeded(string, string, []CheckpointFingerprint, ArtifactCheckpointOutput, []contracts.Warning) error
|
||||
}
|
||||
|
||||
type ArtifactCheckpointLoader interface {
|
||||
ArtifactExtract(string, string, []CheckpointFingerprint) (ArtifactExtractCheckpoint, CheckpointDecision)
|
||||
ArtifactMerge(string, string, []CheckpointFingerprint) (ArtifactMergeCheckpoint, CheckpointDecision)
|
||||
ArtifactNormalize(string, string, []CheckpointFingerprint) (ArtifactNormalizeCheckpoint, CheckpointDecision)
|
||||
}
|
||||
|
||||
type CheckpointLoader interface {
|
||||
Enabled() bool
|
||||
Source(moduleKey string) (SourceCheckpoint, CheckpointDecision)
|
||||
|
||||
Reference in New Issue
Block a user