Route merge and normalization through core with domain migrations pending

This commit is contained in:
2026-11-25 15:30:04 +00:00
parent ccecf13a4c
commit 8240566281
20 changed files with 173 additions and 177 deletions

View File

@@ -29,16 +29,18 @@ func (pilotChunker) Plan(_ context.Context, request contracts.ChunkRequest) (con
type pilotMerger struct{}
func (pilotMerger) Key() string { return "pilot/merge" }
func (pilotMerger) Merge(_ context.Context, request contracts.TypedMergeRequest[dnd.SpellList]) (contracts.TypedMergeResult[dnd.SpellList], error) {
return contracts.TypedMergeResult[dnd.SpellList]{Value: request.ExtractOutputs[0].Value}, nil
func (pilotMerger) PrepareMerge(_ context.Context, request contracts.MergeInput[dnd.SpellList]) (contracts.PreparedOperation[dnd.SpellList], error) {
value := request.ExtractOutputs[0].Value
return contracts.DeterministicOperation[dnd.SpellList]{Evaluation: contracts.CandidateEvaluation[dnd.SpellList]{Result: contracts.EvaluationView[dnd.SpellList]{Candidate: &value}}}, nil
}
type pilotNormalizer struct{}
func (pilotNormalizer) Key() string { return "pilot/normalize" }
func (pilotNormalizer) ReferenceSlots() []contracts.ReferenceSlot { return nil }
func (pilotNormalizer) Normalize(_ context.Context, request contracts.TypedNormalizeRequest[dnd.SpellList]) (contracts.TypedNormalizeResult[dnd.SpellList], error) {
return contracts.TypedNormalizeResult[dnd.SpellList]{Value: request.MergeOutput.Value}, nil
func (pilotNormalizer) PrepareNormalize(_ context.Context, request contracts.NormalizeInput[dnd.SpellList]) (contracts.PreparedOperation[dnd.SpellList], error) {
value := request.MergeOutput.Value
return contracts.DeterministicOperation[dnd.SpellList]{Evaluation: contracts.CandidateEvaluation[dnd.SpellList]{Result: contracts.EvaluationView[dnd.SpellList]{Candidate: &value}}}, nil
}
type pilotOutput struct{}