package company import "testing" // Regression: the generic invent shapes (" is a … product from …" and // " je … znamk|kategor|produkt …") matched any length of copy. In Slovenian " je " // appears in almost every sentence and A1 spec lists start with "Znamka: ", // so real formula output was classified as invent fallback, discarded, and replaced // with the supplier feed text — Review then showed Original ≈ Enriched. func TestLooksLikeHeuristicSynthesize_keepsRealFormulaCopy(t *testing.T) { t.Parallel() slovenianFormulaCopy := "

BRUNNER zložljiv stol ONE SHOT za udobje na poti

" + "

Zložljiv stol iz aluminija je zasnovan za dolge ure udobnega sedenja na terenu, na snemanju ali ob " + "kampiranju. Okvir se razpre v enem gibu in ostane stabilen tudi na neravnih tleh, medtem ko tkanina " + "sedišča prijetno diha in se hitro suši. Naslonjala za roke razbremenijo ramena, hrbtni del pa podpira " + "naravno držo. Zaradi majhne teže ga brez napora prenesete od avtomobila do prizorišča.

" + "

Stabilnost in dolga življenjska doba

" + "

Konstrukcija združuje trpežne materiale in premišljene detajle. Aluminijasti profili so odporni proti " + "koroziji, spoji pa so ojačani na mestih največjih obremenitev. Sivo črna kombinacija ostaja videti " + "urejena tudi po sezoni uporabe na prostem, saj se madeži manj poznajo.

" + "" if LooksLikeHeuristicSynthesize(slovenianFormulaCopy) { t.Fatal("real Slovenian formula copy must not read as invent fallback") } englishFormulaCopy := "

Acme Monitor Pro

This monitor is a strong choice for colour-critical work, " + "with a factory-calibrated panel and a stand that adjusts through a wide range. Cable routing keeps the " + "desk tidy, and the built-in hub means one cable to the laptop. Panel uniformity holds up across the " + "whole surface, so gradients stay smooth from edge to edge in long editing sessions.

" + "" // "Key features" is ordinary section wording: suggestive enough to force a // re-enhance, never enough to discard the copy. if IsInventFallbackDescription(englishFormulaCopy) { t.Fatal("real English formula copy must not read as invent fallback") } if IsInventFallbackDescription(slovenianFormulaCopy) { t.Fatal("real Slovenian formula copy must not read as invent fallback") } } func TestLooksLikeHeuristicSynthesize_stillCatchesInvent(t *testing.T) { t.Parallel() cases := []string{ "Vogel's WALL 3245 is a TV Mounts product from Vogel's. Key specs: width 45 cm, max_load 40 kg.", "Gorenje EHT6020 je izdelek znamke Gorenje.", "Samsung QLED je izdelek v kategoriji Televizorji.", "Acme Widget is a catalog product with the known attributes.", "Acme Widget — catalog product.", "BRUNNER ONE SHOT — Stolčki, znamka BRUNNER. Širina: 44 cm.", "

Gorenje EHT6020

Gorenje EHT6020 — Štedilniki, znamka Gorenje.

" + "

Ključne lastnosti

", } for _, c := range cases { if !LooksLikeHeuristicSynthesize(c) { t.Fatalf("invent fallback must still be detected: %q", c) } } }