Replay explanations through shared history selections
This commit is contained in:
@@ -76,14 +76,17 @@ func (builder *historyBuilder) observeCLIEvidence(applications []historyApplicat
|
||||
}
|
||||
index := new(mappingIndex)
|
||||
for item := 0; item < count; item++ {
|
||||
var applicationRef historyPayloadRef
|
||||
hasApplication := false
|
||||
if item < len(applications) {
|
||||
application := applications[item]
|
||||
payload := builder.addCLIPayload(&application, nil)
|
||||
applicationRef = builder.addCLIPayload(&application, nil)
|
||||
hasApplication = true
|
||||
walkHistoryApplication(application, func(_, effective Path, node *document.Node) {
|
||||
origin := sourceApplicationOrigin(application, node)
|
||||
attribution := builder.addAttribution(origin, nil, nil)
|
||||
builder.addObservation(historyObservation{
|
||||
path: effective, phase: historyPhaseCLI, payload: payload,
|
||||
path: effective, phase: historyPhaseCLI, payload: applicationRef,
|
||||
reportedPath: effective, role: historyRoleContribution,
|
||||
afterPresent: true, sensitive: node.Sensitive,
|
||||
attributionRef: attribution,
|
||||
@@ -94,6 +97,11 @@ func (builder *historyBuilder) observeCLIEvidence(applications []historyApplicat
|
||||
if item < len(records) {
|
||||
record := records[item]
|
||||
payload := builder.addCLIPayload(nil, &record)
|
||||
if hasApplication {
|
||||
owned := &builder.model.cliPayloads[payload.id]
|
||||
owned.applicationRef = applicationRef
|
||||
owned.hasApplicationRef = true
|
||||
}
|
||||
attribution := builder.addAttribution(record.change.Origin, nil, nil)
|
||||
for _, displaced := range record.displaced {
|
||||
builder.addObservation(historyObservation{
|
||||
|
||||
Reference in New Issue
Block a user