Documentation
¶
Overview ¶
Package deps coordinates exact dependency updates across isolated repository worktrees. Ecosystem adapters own discovery and mutation; the runner owns Git, verification, publication, and deterministic reports.
Index ¶
- func BumpOperationID(events []ReleaseEvent) string
- func WriteBumpReports(directory string, report BumpReport) error
- func WriteReports(directory string, report Report) error
- type BumpOptions
- type BumpPhase
- type BumpProgress
- type BumpReport
- type BumpWaveReport
- type Decision
- type Ecosystem
- type Graph
- func (graph Graph) HTML(defaultView GraphView) ([]byte, error)
- func (graph Graph) JSON() ([]byte, error)
- func (graph Graph) Markdown() string
- func (graph Graph) Output(format string, view GraphView) ([]byte, error)
- func (graph Graph) Project(view GraphView) (GraphProjection, error)
- func (graph Graph) SVG(view GraphView) ([]byte, error)
- func (graph Graph) YAML() ([]byte, error)
- type GraphFilters
- type GraphModule
- type GraphOptions
- type GraphProjection
- type GraphProjectionEdge
- type GraphProjectionNode
- type GraphReportPaths
- type GraphRepository
- type GraphRequirement
- type GraphSummary
- type GraphView
- type Options
- type PublishedGoRelease
- type ReleaseEvent
- type ReleaseObservation
- type RemoteCheck
- type Report
- type Repository
- type RepositoryReport
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BumpOperationID ¶
func BumpOperationID(events []ReleaseEvent) string
BumpOperationID returns the stable campaign identity for a sorted seed set.
func WriteBumpReports ¶
func WriteBumpReports(directory string, report BumpReport) error
WriteBumpReports atomically replaces the human and machine campaign indexes.
func WriteReports ¶
WriteReports writes deps-set.md and deps-set.yaml to the requested directory.
Types ¶
type BumpOptions ¶
type BumpOptions struct {
Options
MaxWaves int
PollInterval time.Duration
Previous *BumpReport
Persist func(BumpReport) error
// LatestGoVersion is injectable for deterministic wave tests.
LatestGoVersion func(context.Context, string) (string, error)
// LatestGoRelease is injectable for graph traversal through modules that
// were updated and published before this campaign started.
LatestGoRelease func(context.Context, string) (PublishedGoRelease, error)
}
BumpOptions adds wave and release discovery policy to shared lifecycle options.
type BumpPhase ¶ added in v0.12.0
type BumpPhase string
BumpPhase identifies the operation currently represented by a persisted report. It makes an interrupted campaign distinguish graph discovery from a wave that is waiting on local or remote work.
const ( BumpPhasePreparing BumpPhase = "preparing" BumpPhaseDiscoveringGraph BumpPhase = "discovering_graph" BumpPhasePlanningWave BumpPhase = "planning_wave" BumpPhaseProcessingWave BumpPhase = "processing_wave" BumpPhasePlanned BumpPhase = "planned" BumpPhaseAwaitingMerge BumpPhase = "awaiting_merge" BumpPhaseAwaitingRelease BumpPhase = "awaiting_release" BumpPhaseCompleted BumpPhase = "completed" )
type BumpProgress ¶ added in v0.12.0
type BumpProgress struct {
Wave int `yaml:"wave,omitempty"`
RepositoriesTotal int `yaml:"repositories_total,omitempty"`
RepositoriesCompleted int `yaml:"repositories_completed,omitempty"`
LastRepository string `yaml:"last_repository,omitempty"`
}
BumpProgress records the bounded unit of work for Phase. During graph discovery it advances once per selected repository; during wave processing it identifies the selected wave repositories.
type BumpReport ¶
type BumpReport struct {
SchemaVersion int `yaml:"schema_version"`
Operation string `yaml:"operation"`
Status string `yaml:"status"`
Phase BumpPhase `yaml:"phase"`
Progress BumpProgress `yaml:"progress"`
Ecosystem Ecosystem `yaml:"ecosystem"`
SeedEvents []ReleaseEvent `yaml:"seed_events"`
GitHubDir string `yaml:"github_dir"`
BaseRef string `yaml:"base_ref"`
Verification []quality.Check `yaml:"verification,omitempty"`
Parallel int `yaml:"parallel"`
Waves []BumpWaveReport `yaml:"waves"`
}
BumpReport is the persistent Markdown/YAML state of a wave campaign.
func LoadBumpReport ¶
func LoadBumpReport(directory string) (BumpReport, error)
LoadBumpReport loads persisted resume state.
func RunBump ¶
func RunBump(ctx context.Context, events []ReleaseEvent, repositories []Repository, options BumpOptions) (BumpReport, error)
RunBump propagates explicit Go release events through recalculated direct consumer waves. Each newly observed provider release becomes the next wave.
func (BumpReport) Markdown ¶
func (report BumpReport) Markdown() string
Markdown renders the wave, repository, and release-evidence index.
func (BumpReport) YAML ¶
func (report BumpReport) YAML() ([]byte, error)
YAML renders deterministic machine-readable wave state.
type BumpWaveReport ¶
type BumpWaveReport struct {
Index int `yaml:"index"`
Status string `yaml:"status"`
Events []ReleaseEvent `yaml:"events"`
Repositories []RepositoryReport `yaml:"repositories"`
Releases []ReleaseObservation `yaml:"releases,omitempty"`
}
BumpWaveReport records one recalculated direct-consumer layer.
type Decision ¶
type Decision struct {
Dependency string `yaml:"dependency,omitempty"`
File string `yaml:"file"`
BeforeRef string `yaml:"before_ref,omitempty"`
BeforeVersion string `yaml:"before_version,omitempty"`
TargetVersion string `yaml:"target_version"`
ResolvedRef string `yaml:"resolved_ref,omitempty"`
AfterRef string `yaml:"after_ref,omitempty"`
AfterVersion string `yaml:"after_version,omitempty"`
Action string `yaml:"action"`
Reason string `yaml:"reason"`
}
Decision explains one existing dependency reference before and after update.
type Ecosystem ¶
type Ecosystem string
Ecosystem identifies a dependency manifest or reference format.
type Graph ¶ added in v0.9.0
type Graph struct {
SchemaVersion int `json:"schema_version" yaml:"schema_version"`
Ecosystem Ecosystem `json:"ecosystem" yaml:"ecosystem"`
BaseRef string `json:"base_ref" yaml:"base_ref"`
Filters GraphFilters `json:"filters" yaml:"filters"`
Summary GraphSummary `json:"summary" yaml:"summary"`
Repositories []GraphRepository `json:"repositories" yaml:"repositories"`
Modules []GraphModule `json:"modules" yaml:"modules"`
Requirements []GraphRequirement `json:"requirements" yaml:"requirements"`
}
Graph is the canonical, deterministic evidence model shared by every view.
func BuildGraph ¶ added in v0.9.0
func BuildGraph(ctx context.Context, repositories []Repository, options GraphOptions) (Graph, error)
BuildGraph scans selected repositories once and returns canonical evidence.
func (Graph) HTML ¶ added in v0.9.0
HTML renders all projections into one self-contained interactive document.
func (Graph) Markdown ¶ added in v0.9.0
Markdown renders canonical counts and every manifest evidence row.
func (Graph) Project ¶ added in v0.9.0
func (graph Graph) Project(view GraphView) (GraphProjection, error)
Project derives one visual view without rescanning canonical evidence.
type GraphFilters ¶ added in v0.9.0
type GraphFilters struct {
Dependencies []string `json:"dependencies,omitempty" yaml:"dependencies,omitempty"`
}
GraphFilters records evidence filters applied after repository discovery.
type GraphModule ¶ added in v0.9.0
type GraphModule struct {
Path string `json:"path" yaml:"path"`
Repository string `json:"repository" yaml:"repository"`
Manifest string `json:"manifest" yaml:"manifest"`
}
GraphModule is a module declaration and its source manifest.
type GraphOptions ¶ added in v0.9.0
type GraphOptions struct {
Ecosystem Ecosystem
GitHubDir string
Ref string
Parallel int
Timeout time.Duration
Retry int
Dependencies []string
}
GraphOptions controls read-only dependency discovery and evidence filtering.
type GraphProjection ¶ added in v0.9.0
type GraphProjection struct {
View GraphView
Nodes []GraphProjectionNode
Edges []GraphProjectionEdge
}
GraphProjection is a deterministic view derived only from Graph.
type GraphProjectionEdge ¶ added in v0.9.0
type GraphProjectionEdge struct {
ID string
From string
To string
DirectCount int
IndirectCount int
Status string
Evidence []string
}
GraphProjectionEdge aggregates canonical evidence for a visual relation.
type GraphProjectionNode ¶ added in v0.9.0
type GraphProjectionNode struct {
ID string
Kind string
Label string
Subtitle string
Status string
Repository string
Dependency string
Version string
GitHubURL string
CodeGrapherURL string
Organization string
}
GraphProjectionNode is a visual entity with stable identity.
type GraphReportPaths ¶ added in v0.9.0
GraphReportPaths identifies every artifact written for one graph scan.
func WriteGraphReports ¶ added in v0.9.0
func WriteGraphReports(directory string, graph Graph, view GraphView) (GraphReportPaths, error)
WriteGraphReports atomically writes every human, machine, and visual artifact.
type GraphRepository ¶ added in v0.9.0
type GraphRepository struct {
Slug string `json:"slug" yaml:"slug"`
Organization string `json:"organization" yaml:"organization"`
Modules []string `json:"modules,omitempty" yaml:"modules,omitempty"`
}
GraphRepository is a selected repository retained by the filtered graph.
type GraphRequirement ¶ added in v0.9.0
type GraphRequirement struct {
Dependency string `json:"dependency" yaml:"dependency"`
Version string `json:"version" yaml:"version"`
ConsumerModule string `json:"consumer_module" yaml:"consumer_module"`
ConsumerRepository string `json:"consumer_repository" yaml:"consumer_repository"`
Manifest string `json:"manifest" yaml:"manifest"`
Indirect bool `json:"indirect,omitempty" yaml:"indirect,omitempty"`
ProviderModule string `json:"provider_module,omitempty" yaml:"provider_module,omitempty"`
ProviderRepository string `json:"provider_repository,omitempty" yaml:"provider_repository,omitempty"`
ProviderCandidates []string `json:"provider_candidates,omitempty" yaml:"provider_candidates,omitempty"`
}
GraphRequirement is one manifest-owned dependency selection.
type GraphSummary ¶ added in v0.9.0
type GraphSummary struct {
Repositories int `json:"repositories" yaml:"repositories"`
Modules int `json:"modules" yaml:"modules"`
Requirements int `json:"requirements" yaml:"requirements"`
InternalRequirements int `json:"internal_requirements" yaml:"internal_requirements"`
ExternalDependencies int `json:"external_dependencies" yaml:"external_dependencies"`
Selections int `json:"selections" yaml:"selections"`
AmbiguousProviders int `json:"ambiguous_providers" yaml:"ambiguous_providers"`
}
GraphSummary provides view-independent canonical counts.
type GraphView ¶ added in v0.9.0
type GraphView string
GraphView selects one visual projection of canonical dependency evidence.
func ParseGraphView ¶ added in v0.9.0
ParseGraphView validates a CLI or report projection name.
type Options ¶
type Options struct {
GitHubDir string
Ref string
Parallel int
DryRun bool
Resume bool
AllowDowngrade bool
Verify bool
Checks []quality.Check
Timeout time.Duration
Retry int
// GoPrivate supplies comma-separated Go module path patterns that must not
// be looked up through a public module proxy or checksum database. The
// patterns are merged with the caller's GOPRIVATE/GONOPROXY/GONOSUMDB only
// for Go subprocesses; WB never writes Go's global environment.
GoPrivate []string
Commit bool
Push bool
PR bool
Merge bool
ReportDir string
// ResolveGitHubRef is injectable for hermetic adapter tests.
ResolveGitHubRef func(context.Context, string, string) (string, error)
}
Options controls repository isolation, verification, and optional publishing.
type PublishedGoRelease ¶
PublishedGoRelease is immutable registry evidence used to carry an event through an already-current consumer without manufacturing another release.
type ReleaseEvent ¶
type ReleaseEvent struct {
Dependency string `yaml:"dependency"`
Version string `yaml:"version"`
Source string `yaml:"source"`
}
ReleaseEvent is version evidence that starts or advances a dependency wave.
type ReleaseObservation ¶
type ReleaseObservation struct {
Module string `yaml:"module"`
Repository string `yaml:"repository"`
Before string `yaml:"before,omitempty"`
After string `yaml:"after,omitempty"`
Source string `yaml:"source"`
Status string `yaml:"status"`
Reason string `yaml:"reason"`
ExpectedRequirements map[string]string `yaml:"expected_requirements,omitempty"`
RequireNewer bool `yaml:"require_newer,omitempty"`
}
ReleaseObservation prevents the wave engine from inventing provider versions.
type RemoteCheck ¶
type RemoteCheck = orchestrate.RemoteCheck
RemoteCheck is the normalized GitHub check state observed before merge.
type Report ¶
type Report struct {
SchemaVersion int `yaml:"schema_version"`
Operation string `yaml:"operation"`
Status string `yaml:"status"`
Target Target `yaml:"target"`
GitHubDir string `yaml:"github_dir"`
BaseRef string `yaml:"base_ref"`
Verification []quality.Check `yaml:"verification,omitempty"`
Parallel int `yaml:"parallel"`
Repositories []RepositoryReport `yaml:"repositories"`
}
Report is the stable Markdown/YAML index for one exact-set operation.
func Run ¶
func Run(ctx context.Context, target Target, repositories []Repository, options Options) (Report, error)
Run resolves one exact target and delegates repository lifecycle to the shared typed orchestration engine. The adapter owns dependency decisions.
type Repository ¶
type Repository = orchestrate.Repository
Repository identifies a canonical clone selected by command-level discovery.
type RepositoryReport ¶
type RepositoryReport struct {
Repository string `yaml:"repository"`
CanonicalDir string `yaml:"canonical_dir,omitempty"`
WorktreeDir string `yaml:"worktree_dir,omitempty"`
Branch string `yaml:"branch,omitempty"`
Ref string `yaml:"ref"`
Status string `yaml:"status"`
Reason string `yaml:"reason"`
Decisions []Decision `yaml:"decisions,omitempty"`
ChangedFiles []string `yaml:"changed_files,omitempty"`
Verifications []quality.VerificationEntry `yaml:"verifications,omitempty"`
Commit string `yaml:"commit,omitempty"`
Pushed bool `yaml:"pushed,omitempty"`
PR string `yaml:"pr,omitempty"`
Checks []RemoteCheck `yaml:"checks,omitempty"`
Merged bool `yaml:"merged,omitempty"`
}
RepositoryReport records one selected repository and every external stage.
type Target ¶
type Target struct {
Ecosystem Ecosystem `yaml:"ecosystem"`
Dependency string `yaml:"dependency"`
Version string `yaml:"version"`
Resolved string `yaml:"resolved,omitempty"`
}
Target is the exact dependency identity and version requested by the user.
func ParseTarget ¶
ParseTarget validates a command target such as strongo/cicd@v1.10.5.