This commit is contained in:
greeneclipse committed 2026-10-14 18:47:00 +02:00
1 parent 7537a41955
commit ff6c2df618
14 files changed
+767 -349

No files matched your search

+17 -16
View File
@@ -26,24 +26,24 @@ const platformDemoCompanyName = "Platform Demo"
// RepairCategoryEnhancePromptsResult is the dry-run / apply summary for
// RepairA1DemoCategoryEnhancePrompts.
type RepairCategoryEnhancePromptsResult struct {
CompaniesScanned int `json:"companies_scanned"`
CategoriesSeen int `json:"categories_seen"`
WouldUpdate int `json:"would_update"`
Updated int `json:"updated"`
AlreadyOK int `json:"already_ok"`
EmptySkipped int `json:"empty_skipped"`
SeedMatched int `json:"seed_matched"`
SplitFromLegacy int `json:"split_from_legacy"`
FallbackTemplate int `json:"fallback_template"`
TitleTemplateBackfill int `json:"title_template_backfill"`
DescTemplateBackfill int `json:"description_template_backfill"`
CompaniesScanned int `json:"companies_scanned"`
CategoriesSeen int `json:"categories_seen"`
WouldUpdate int `json:"would_update"`
Updated int `json:"updated"`
AlreadyOK int `json:"already_ok"`
EmptySkipped int `json:"empty_skipped"`
SeedMatched int `json:"seed_matched"`
SplitFromLegacy int `json:"split_from_legacy"`
FallbackTemplate int `json:"fallback_template"`
TitleTemplateBackfill int `json:"title_template_backfill"`
DescTemplateBackfill int `json:"description_template_backfill"`
// *_Cleared count non-seed categories whose leftover formula artifacts
// (English defaults from earlier repairs / cats.json / migration) were removed.
TitleTemplateCleared int `json:"title_template_cleared"`
DescTemplateCleared int `json:"description_template_cleared"`
ByCompany map[string]int `json:"by_company"`
DryRun bool `json:"dry_run"`
SeedPath string `json:"seed_path,omitempty"`
TitleTemplateCleared int `json:"title_template_cleared"`
DescTemplateCleared int `json:"description_template_cleared"`
ByCompany map[string]int `json:"by_company"`
DryRun bool `json:"dry_run"`
SeedPath string `json:"seed_path,omitempty"`
// WPCategoriesPath is set when overlays came from wp_product_categories.sql.
WPCategoriesPath string `json:"wp_categories_path,omitempty"`
SeedEntries int `json:"seed_entries,omitempty"`
@@ -285,6 +285,7 @@ func loadA1CategoryPromptOverlays(path string) (byNorm map[string]string, byUID
}
for _, e := range f.Entries {
p := strings.TrimSpace(e.Prompt)
p, _ = aiprompts.NormalizeA1RepeatedBenefits(p)
if p == "" {
continue
}