Add artifact-aware analyze resume planning
This commit is contained in:
@@ -53,14 +53,35 @@ const maxResumeReasonLength = 512
|
||||
type ResumeValidation struct {
|
||||
Resumable bool
|
||||
Reason string
|
||||
Analyze *AnalyzeResumeSummary
|
||||
}
|
||||
|
||||
// AnalyzeResumeSummary describes the artifact-level decision behind an
|
||||
// aggregate analyze resume result.
|
||||
type AnalyzeResumeSummary struct {
|
||||
ExplicitTargets []string
|
||||
PrerequisiteWork []AnalyzeResumeArtifact
|
||||
ExecutionOrder []AnalyzeResumeArtifact
|
||||
ReusedCurrent []AnalyzeResumeArtifact
|
||||
}
|
||||
|
||||
// AnalyzeResumeArtifact is one deterministic artifact-level plan entry.
|
||||
type AnalyzeResumeArtifact struct {
|
||||
Key string
|
||||
Role string
|
||||
Reason string
|
||||
Forced bool
|
||||
}
|
||||
|
||||
// Normalized returns a result with a bounded reason and no reason on success.
|
||||
func (r ResumeValidation) Normalized() ResumeValidation {
|
||||
if r.Resumable {
|
||||
return Resumable()
|
||||
r.Reason = ""
|
||||
return r
|
||||
}
|
||||
return NonResumable(r.Reason)
|
||||
normalized := NonResumable(r.Reason)
|
||||
normalized.Analyze = r.Analyze
|
||||
return normalized
|
||||
}
|
||||
|
||||
// ResumeValidator is implemented by stages that validate persisted success before reuse.
|
||||
|
||||
Reference in New Issue
Block a user