Decompose household tasks into typed atoms
CI / test (push) Successful in 1m28s
CI / test (pull_request) Successful in 1m27s

This commit is contained in:
m
2026-08-25 14:46:43 +03:00
parent 745d8b0c4d
commit c94a96c47e
3 changed files with 107 additions and 0 deletions
@@ -38,6 +38,10 @@ func TestHouseholdCreativeRouteDoesNotUseResearch(t *testing.T) {
func TestHouseholdMarketplaceBrandSearchUsesResearchRoute(t *testing.T) {
candidate := interactiondomain.BuildDeterministicCandidate("найди на WB бренд marka-wear", "", time.Unix(10, 0).UnixMilli())
decomposition := interactiondomain.DecomposeTask("найди на WB бренд marka-wear")
if decomposition.Intent != interactiondomain.TaskIntentSearch || decomposition.Object != interactiondomain.TaskObjectBrand || decomposition.Source != interactiondomain.TaskSourceWB || decomposition.Target != "marka-wear" || len(decomposition.Missing) != 0 {
t.Fatalf("marketplace request was not split into executable atoms: %+v", decomposition)
}
routes := buildChatRoutePlan(interactiondomain.SemanticResult{NeedsCognition: candidate.NeedsCognition, CapabilityHints: candidate.CapabilityHints})
if !hasChatRoute(routes, chatRouteResearch) {
t.Fatalf("marketplace brand request did not select research route: candidate=%+v routes=%+v", candidate, routes)