Complete assembled validation and migrate remaining tests

This commit is contained in:
2026-11-10 18:13:12 +00:00
parent ba1d5d2367
commit 2844ce7e6a
44 changed files with 577 additions and 1624 deletions

View File

@@ -23,12 +23,7 @@ func (h testChunkProposalHarness) collectEnrichedProposals(
transcript *schema.Transcript,
sections []chunking.Section,
) ([]proposals.EnrichedCorrectionProposal, error) {
runSpecs, err := ResolveModuleRunSpecs([]string{h.module.Key()})
if err != nil {
return nil, err
}
runSpec := runSpecs[0]
runSpec := ModuleRunSpec{ModuleKey: h.module.Key(), InstanceName: h.module.Key()}
runSpec.ReplacementPolicy = h.module.ReplacementPolicy()
out := make([]proposals.EnrichedCorrectionProposal, 0)
@@ -209,7 +204,7 @@ func TestApplyFakeProposalsAcrossMultipleChunksWithStaleSkip(t *testing.T) {
t.Fatalf("collectEnrichedProposals failed: %v", err)
}
result := proposals.ApplyProposals(transcript, enriched, module.ReplacementPolicy())
result := proposals.ApplyProposals(transcript, enriched, module.ReplacementPolicy(), nil)
if len(result.Applied) != 2 {
t.Fatalf("expected 2 applied changes, got %d", len(result.Applied))
@@ -249,7 +244,7 @@ func TestChunkProposalCompositionDoesNotMutateNormalizedTranscript(t *testing.T)
t.Fatalf("collectEnrichedProposals failed: %v", err)
}
_ = proposals.ApplyProposals(transcript, enriched, module.ReplacementPolicy())
_ = proposals.ApplyProposals(transcript, enriched, module.ReplacementPolicy(), nil)
if !reflect.DeepEqual(transcript, before) {
t.Fatalf("normalized transcript mutated\nbefore=%+v\nafter=%+v", before, transcript)