manifest

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package manifest writes manifest.json including the extraction_provenance block that records what each connector returned per repo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manifest

type Manifest struct {
	ToolVersion    string    `json:"tool_version"`
	SchemaVersion  int       `json:"schema_version"`
	RunID          string    `json:"run_id"`
	RunStartedAt   time.Time `json:"run_started_at"`
	RunCompletedAt time.Time `json:"run_completed_at"`
	// Aborted is true when the run was interrupted (SIGINT/SIGTERM) before
	// normal completion and the artifact was finalised from whatever had
	// been extracted so far (issue #183). On an aborted run RunCompletedAt
	// is the zero time; per-connector completeness is read from each
	// extraction_provenance[].pagination_complete, and connectors absent
	// from extraction_provenance were not attempted. omitempty keeps clean
	// runs byte-identical (field absent when false).
	Aborted          bool                   `json:"aborted,omitempty"`
	Window           WindowJSON             `json:"window"`
	Teams            map[string][]string    `json:"teams"`
	Repos            []RepoMeta             `json:"repos"`
	ConnectorsUsed   []string               `json:"connectors_used"`
	Counts           map[string]int         `json:"counts"`
	MailmapApplied   bool                   `json:"mailmap_applied"`
	NSquashMergedPRs int                    `json:"n_squash_merged_prs"`
	NTotalMergedPRs  int                    `json:"n_total_merged_prs"`
	SquashRate       float64                `json:"squash_rate"`
	Provenance       []connector.Provenance `json:"extraction_provenance"`
}

Manifest is the exact shape written to manifest.json. Field names and nesting must match the spec in docs/spec.md "manifest.json".

MailmapApplied is true iff every repo in the run carried a non-empty .mailmap that parsed cleanly and was applied across every author-handle table. Any repo missing a mailmap, or any per-repo parse failure, flips the run-level value to false — assay treats false as "aliases may inflate the author universe" and appends the Tornhill Ch 13 caveat to the truck-factor finding.

func (*Manifest) WriteTo

func (m *Manifest) WriteTo(w io.Writer) (int64, error)

WriteTo emits indented JSON to w with a trailing newline. The return value is the number of bytes written (per io.WriterTo).

type RepoMeta

type RepoMeta struct {
	Slug          string `json:"slug"`
	HeadSHA       string `json:"head_sha"`
	DefaultBranch string `json:"default_branch"`
}

RepoMeta is the per-repo metadata entry in manifest.json.

type WindowJSON

type WindowJSON struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

WindowJSON renders the inclusive UTC window as YYYY-MM-DD start/end.

Jump to

Keyboard shortcuts

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