SPB Git forge

spb/fabri-ka

Public

Agrégateur de produits québécois — www.fabri-ka.com

217commits 1branches 0releases
66.1 MBsize
maindefault branch
7 h agolast push
Python 38.4% HTML 30.3% TypeScript 17.2% CSS 11% JavaScript 3.2%

build_registry: préservation des overrides manuels d un rebuild à l autre

Un rebuild régénérait enabled=true pour les 91 boutiques Wix désactivées à
l audit du 2026-08-23 et écrasait les réparations faites au registre.
Désormais préservés depuis le stores.json précédent : disabled_reason
(l entrée reste désactivée), timeout par boutique (canadel.com), et
plateforme/endpoint/url des entrées marquées manual_platform (rose.ca,
migrée Woo -> Shopify boutique.rose.ca).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Simon-Pierre Boucher committed 1 mo ago (Aug 23, 2026) parent f3403c9

2 changed files +29 −1

modified data/stores.json +2 −1
@@ -147368,7 +147368,8 @@
147368 147368 "city": "Drummondville South",
147369 147369 "precision": "fsa"
147370 147370 },
147371 − "migration_note": "boutique migrée de WooCommerce (www.rose.ca, Store API vide) vers Shopify boutique.rose.ca — 2026-08-23"
147371 + "migration_note": "boutique migrée de WooCommerce (www.rose.ca, Store API vide) vers Shopify boutique.rose.ca — 2026-08-23",
147372 + "manual_platform": true
147372 147373 },
147373 147374 {
147374 147375 "id": "rubanbleu.ca",
modified scripts/build_registry.py +27 −0
@@ -231,6 +231,20 @@ def main():
231 231 v = json.loads(line)
232 232 vers[v["domain"]] = v
233 233
234 + # Overrides manuels du registre précédent, préservés d'un rebuild à
235 + # l'autre (audits et réparations faits directement dans stores.json) :
236 + # - disabled_reason -> l'entrée reste désactivée (audit 2026-08-23 :
237 + # 91 boutiques Wix sans app Stores, un rebuild les réactivait toutes)
238 + # - timeout -> délai par boutique (ex. canadel.com : Store API à ~50 s/page)
239 + # - manual_platform: true -> plateforme/endpoint/url constatés à la main
240 + # (ex. rose.ca migrée Woo -> Shopify boutique.rose.ca) prioritaires sur
241 + # verified.jsonl tant que celui-ci n'est pas re-sondé
242 + prev_path = os.path.join(ROOT, "data", "stores.json")
243 + prev = {}
244 + if os.path.exists(prev_path):
245 + with open(prev_path) as f:
246 + prev = {s["id"]: s for s in json.load(f).get("stores", [])}
247 +
234 248 stores, seen_final = [], {}
235 249 for dom, cand in sorted(cands.items()):
236 250 ver = vers.get(dom, {})
@@ -284,6 +298,19 @@ def main():
284 298 "status": "verified" if (conf >= 0.6 and ver.get("mentions_quebec")) else "probable",
285 299 "enabled": bool(catalog_endpoint),
286 300 }
301 + old = prev.get(final_dom)
302 + if old:
303 + if old.get("disabled_reason"):
304 + store["enabled"] = False
305 + store["disabled_reason"] = old["disabled_reason"]
306 + if "timeout" in old:
307 + store["timeout"] = old["timeout"]
308 + if old.get("manual_platform"):
309 + store["manual_platform"] = True
310 + for k in ("platform", "catalog_endpoint", "url"):
311 + if old.get(k):
312 + store[k] = old[k]
313 + store["enabled"] = old.get("enabled", store["enabled"])
287 314 seen_final[final_dom] = store
288 315 stores.append(store)
289 316
290 317