Require explicit manifest schemas
This commit is contained in:
@@ -41,6 +41,7 @@ type RunStageRecord struct {
|
||||
|
||||
// RunManifest is the invocation-scoped execution record under runs/{run_id}/manifest.json.
|
||||
type RunManifest struct {
|
||||
SchemaVersion string `json:"schema_version"`
|
||||
SessionID string `json:"session_id"`
|
||||
Campaign string `json:"campaign,omitempty"`
|
||||
RunID string `json:"run_id"`
|
||||
@@ -66,6 +67,7 @@ type RunManifest struct {
|
||||
// NewRun constructs a new run manifest with deterministic timestamps.
|
||||
func NewRun(sessionID, campaign, runID string, force bool, requestedStages []string, now time.Time) *RunManifest {
|
||||
return &RunManifest{
|
||||
SchemaVersion: RunManifestSchemaVersion,
|
||||
SessionID: strings.TrimSpace(sessionID),
|
||||
Campaign: strings.TrimSpace(campaign),
|
||||
RunID: strings.TrimSpace(runID),
|
||||
@@ -156,6 +158,10 @@ func (m *RunManifest) ensureStage(name string, at time.Time) *RunStageRecord {
|
||||
CreatedAt: at,
|
||||
UpdatedAt: at,
|
||||
}
|
||||
if stageName == "analyze" {
|
||||
s.AnalyzeStateVersion = AnalyzeStateContractVersion
|
||||
s.AnalyzeArtifacts = map[string]AnalyzeArtifactRecord{}
|
||||
}
|
||||
m.Stages[stageName] = s
|
||||
}
|
||||
if s.Name == "" {
|
||||
|
||||
Reference in New Issue
Block a user