Documentation
¶
Overview ¶
Package runartifact owns per-run artifact paths and run-kind markers shared by review lifecycle commands.
Index ¶
- Constants
- Variables
- func MarkerMatches(artifactPath, kind, runID string) bool
- func MarkerPath(artifactPath, kind string) string
- func WriteMarker(artifactPath, kind, runID string) error
- type Marker
- type Paths
- func (p Paths) AgentLog(agentID string) (string, error)
- func (p Paths) DossierFinalPath(name string) (string, error)
- func (p Paths) DossierIndexPath() string
- func (p Paths) DossierRawPath(name string) (string, error)
- func (p Paths) DossierSummaryPath(name string) (string, error)
- func (p Paths) LLMTaskDir(taskID string) (string, error)
- func (p Paths) LLMTaskMetadata(taskID string) (string, error)
- func (p Paths) LLMTaskRawAttempt(taskID, attempt string) (string, error)
- func (p Paths) LLMTaskValidatedOutput(taskID string) (string, error)
- func (p Paths) SlicePatch(agentID, filePath string) (string, error)
- func (p Paths) WorkbenchMetadataPath() string
Constants ¶
const ( // KindReview marks artifacts for a full review run. KindReview = "review" // KindThreadResponse marks artifacts for a response-only thread lifecycle run. KindThreadResponse = "thread_response" )
Variables ¶
var ErrMarkerInvalid = errors.New("runartifact: marker invalid")
ErrMarkerInvalid reports that an artifact marker is missing or malformed.
Functions ¶
func MarkerMatches ¶
MarkerMatches reports whether an artifact root carries a valid marker for the expected run kind and run ID.
func MarkerPath ¶
MarkerPath returns the marker path for an artifact root and run kind.
func WriteMarker ¶
WriteMarker persists the run-kind discriminator for an artifact root.
Types ¶
type Marker ¶
type Marker struct {
SchemaVersion int `json:"schema_version"`
Kind string `json:"kind"`
RunID string `json:"run_id"`
}
Marker identifies the lifecycle kind attached to one run artifact root.
func ReadMarker ¶
ReadMarker reads and validates the marker for the requested run kind.
type Paths ¶
type Paths struct {
Dir string `json:"dir"`
DiffPatch string `json:"diff_patch"`
SlicesDir string `json:"slices_dir"`
FindingsJSON string `json:"findings_json"`
RollupMarkdown string `json:"rollup_markdown"`
AgentSourcesJSON string `json:"agent_sources_json"`
AgentLogsDir string `json:"agent_logs_dir"`
LLMTasksDir string `json:"llm_tasks_dir"`
DossierDir string `json:"dossier_dir"`
WorkbenchDir string `json:"workbench_dir"`
WorkbenchRepoDir string `json:"workbench_repo_dir"`
WorkbenchScratch string `json:"workbench_scratch_dir"`
}
Paths contains per-run artifact paths. The artifact root owns these fixed child names, so methods on this type return lifecycle-owned paths rather than arbitrary user input.
func ForRun ¶
func ForRun(layout statepaths.Layout, ref gitprovider.PRRef, pr gitprovider.PR, profile, postingIdentity, runID string) (Paths, error)
ForRun returns the artifact paths for a generated run ID.
func (Paths) DossierFinalPath ¶
DossierFinalPath returns a reviewer-facing dossier artifact path by file name.
func (Paths) DossierIndexPath ¶
DossierIndexPath returns the dossier index artifact path.
func (Paths) DossierRawPath ¶
DossierRawPath returns a raw dossier artifact path by file name.
func (Paths) DossierSummaryPath ¶
DossierSummaryPath returns a summary dossier artifact path by file name.
func (Paths) LLMTaskDir ¶
LLMTaskDir returns the artifact directory for one durable LLM task.
func (Paths) LLMTaskMetadata ¶
LLMTaskMetadata returns the metadata artifact path for one durable LLM task.
func (Paths) LLMTaskRawAttempt ¶
LLMTaskRawAttempt returns the raw structured output path for a failed attempt.
func (Paths) LLMTaskValidatedOutput ¶
LLMTaskValidatedOutput returns the validated structured output path for one task.
func (Paths) SlicePatch ¶
SlicePatch returns the artifact path for an agent/file diff slice.
func (Paths) WorkbenchMetadataPath ¶
WorkbenchMetadataPath returns the workbench metadata artifact path.