impact

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package impact projects an incoming Git comparison onto the source evidence owned by an existing Change Saga. It never compares authored content.

Index

Constants

View Source
const Schema = "change-saga.impact/v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type BaselineStatus

type BaselineStatus struct {
	SagaID      string         `json:"saga_id"`
	Title       string         `json:"title"`
	Source      SourceIdentity `json:"source"`
	Complete    bool           `json:"complete"`
	Covered     int            `json:"covered"`
	Total       int            `json:"total"`
	Uncovered   int            `json:"uncovered"`
	Stale       int            `json:"stale"`
	Overlapping int            `json:"overlapping"`
}

type Change

type Change struct {
	Relationship string       `json:"relationship"`
	Atom         gitdiff.Atom `json:"atom"`
}

type Diagnostic

type Diagnostic struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type IncomingStatus

type IncomingStatus struct {
	SagaID string         `json:"saga_id,omitempty"`
	Title  string         `json:"title,omitempty"`
	Source SourceIdentity `json:"source"`
}

type Result

type Result struct {
	Schema          string          `json:"schema"`
	Mode            string          `json:"mode"`
	Basis           string          `json:"basis"`
	ContentCompared bool            `json:"content_compared"`
	Baseline        BaselineStatus  `json:"baseline"`
	Incoming        IncomingStatus  `json:"incoming"`
	Summary         Summary         `json:"summary"`
	Targets         []TargetImpact  `json:"targets"`
	NewContent      []UnownedChange `json:"new_content"`
	Diagnostics     []Diagnostic    `json:"diagnostics"`
}

func Analyze

func Analyze(document *saga.Saga, baseline gitdiff.ChangeSet, report coverage.Report, incoming gitdiff.ChangeSet, mode string, incomingSaga *saga.Saga) Result

Analyze projects incoming changed atoms onto the baseline Saga's ownership graph. baseline must describe the repository tree at incoming.BaseOID.

type SourceIdentity

type SourceIdentity struct {
	Repository string `json:"repository"`
	Base       string `json:"base"`
	Head       string `json:"head"`
	BaseOID    string `json:"base_oid"`
	HeadOID    string `json:"head_oid"`
}

type Summary

type Summary struct {
	IncomingAtoms         int `json:"incoming_atoms"`
	DirectIntersections   int `json:"direct_intersections"`
	ContextualAdditions   int `json:"contextual_additions"`
	NewContentRequired    int `json:"new_content_required"`
	TargetsMustUpdate     int `json:"targets_must_update"`
	TargetsConsiderUpdate int `json:"targets_consider_update"`
}

type TargetImpact

type TargetImpact struct {
	Target        string   `json:"target"`
	Kind          string   `json:"kind"`
	Title         string   `json:"title"`
	Location      string   `json:"location,omitempty"`
	ContentPath   string   `json:"content_path,omitempty"`
	Action        string   `json:"action"`
	EvidenceFiles []string `json:"evidence_files"`
	Changes       []Change `json:"changes"`
}

type UnownedChange

type UnownedChange struct {
	Atom   gitdiff.Atom `json:"atom"`
	Reason string       `json:"reason"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL