Include glossary guidance in proposal conversations

This commit is contained in:
2026-11-26 18:22:52 +00:00
parent 20db09bd2a
commit e0445abe48
15 changed files with 82 additions and 15 deletions

View File

@@ -74,8 +74,8 @@ func TestProcessingPlanReusesOnlyMatchingGlossaryViews(t *testing.T) {
exempt.Module = "glossary"
cfg := &config.Config{
GlossaryCollections: map[string]config.GlossaryCollection{
"a": {Entries: []config.GlossaryEntry{{ID: "a", Name: "A"}}},
"b": {Entries: []config.GlossaryEntry{{ID: "b", Name: "B"}}},
"a": {Instruction: "First instruction", Entries: []config.GlossaryEntry{{ID: "a", Name: "A"}}},
"b": {Instruction: "Second instruction", Entries: []config.GlossaryEntry{{ID: "b", Name: "B"}}},
},
Pipeline: config.Pipeline{Stages: []config.Stage{item, item, reversed, exempt}},
}
@@ -93,6 +93,9 @@ func TestProcessingPlanReusesOnlyMatchingGlossaryViews(t *testing.T) {
plan[2].Glossary[0].ID != "b" || plan[3].GlossaryVariables.ProtectionJSON != "[]" {
t.Fatalf("incorrect glossary reuse or exemptions: %+v", plan)
}
if !strings.Contains(plan[1].GlossaryVariables.InstructionsBlock, "First instruction") || strings.Index(plan[2].GlossaryVariables.InstructionsBlock, "Second instruction") > strings.Index(plan[2].GlossaryVariables.InstructionsBlock, "First instruction") {
t.Fatalf("instruction reuse/order: %+v", plan)
}
}
func TestProcessingPlanPreservesFirstInspectionFailureAndCause(t *testing.T) {