Documentation
¶
Overview ¶
Package compile assembles a portfolio-wide assessment.ReportDataset from the persisted assessment corpus — the "assessment compiler" (prism-roadmap PRD FR12). This is orchestration, not persistence: it composes Store calls with prism-roadmap's pure ranking/aggregation functions, then persists exactly one new draft dataset.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compile ¶
func Compile(ctx context.Context, s Store, id string, generatedAt time.Time, policy assessment.RankingPolicy) (assessment.ReportDataset, error)
Compile fetches the current assessment corpus, ranks it (applying any persisted governance overrides), aggregates portfolio composition across every registered dimension, computes deltas against the previous compiled dataset (if any), persists the result as a new draft ReportDataset under id, and returns it.
RankCollisions are a hard error: presenting a portfolio review with two opportunities both at #3 is worse than refusing to compile until the conflicting override is fixed (see assessment.RankCollisions).
Types ¶
type Store ¶
type Store interface {
ListCurrentOpportunityAssessments(ctx context.Context) ([]assessment.OpportunityAssessment, error)
ListDimensions(ctx context.Context) ([]assessment.DimensionDefinition, error)
ListRankOverrides(ctx context.Context) ([]assessment.RankOverride, error)
ListProfileAssignments(ctx context.Context) ([]assessment.ProfileAssignment, error)
GetLatestReportDataset(ctx context.Context) (*assessment.ReportDataset, error)
SaveReportDataset(ctx context.Context, id string, dataset assessment.ReportDataset, status string) error
}
Store is the persistence surface Compile needs, satisfied by *store.DoltStore. Defined here rather than imported from store — this package tests against a fake, following this repo's existing pattern of consumer-side interfaces (see sync.Store).