Normalize baseline and source history evidence

This commit is contained in:
2026-10-26 15:01:54 +00:00
parent 2419e63717
commit 3828b117e8
6 changed files with 472 additions and 31 deletions

View File

@@ -18,6 +18,7 @@ type historyRole uint8
const (
historyRoleDefinition historyRole = iota
historyRoleContribution
historyRoleCompositeDefinition
historyRoleOperation
historyRoleControl
@@ -54,8 +55,10 @@ type historyObservation struct {
}
type historyModel struct {
observations []historyObservation
attributions []historyAttribution
observations []historyObservation
attributions []historyAttribution
baseline *document.Node
sourcePayloads []historySourcePayload
shapesByPointer map[string][]Path
shapeOrder []Path
@@ -116,7 +119,7 @@ func (builder *historyBuilder) addObservation(observation historyObservation) in
builder.model.observations = append(builder.model.observations, observation)
builder.addShape(observation.path)
switch observation.role {
case historyRoleDefinition, historyRoleCompositeDefinition, historyRoleCheckpoint:
case historyRoleDefinition, historyRoleContribution, historyRoleCompositeDefinition, historyRoleCheckpoint:
pointer := observation.path.String()
builder.model.observationsByPointer[pointer] = append(builder.model.observationsByPointer[pointer], observationID)
case historyRoleOperation, historyRoleControl: