From 9fe4ddfb04b59b0ced459142bbc356dea7d0ceb3 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Mon, 1 Jun 2026 13:09:49 +0200 Subject: [PATCH] fix(economics): restore dropped vocab_rows.append in import_system_specialization The #1015 V-SES-03 edit replaced the vocabulary validation loop body and dropped the trailing vocab_rows.append(), so specialization_vocabulary was inserted with 0 rows even though per-system UPSERTs (which read the dict directly via valid_spec_ids) still succeeded. regen-db reported 'vocab 0 | economic 27 | ...'. Restored the append at the end of the loop. Verified: regen-db now writes 27 vocab rows + 27/27 economic/cultural; spot checks financial_hub=NonPhysical/Specialist, Ran=breadbasket. Co-Authored-By: Claude Opus 4.8 (1M context) --- tooling/economy-db/import_economics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tooling/economy-db/import_economics.py b/tooling/economy-db/import_economics.py index add4b6626..a2df0589f 100755 --- a/tooling/economy-db/import_economics.py +++ b/tooling/economy-db/import_economics.py @@ -1730,6 +1730,7 @@ def import_system_specialization(conn: sqlite3.Connection, dry_run: bool, f"'{override}' is less concentrated than commodity " f"'{cid}' catalog default '{commodity_pu[cid]}' — incoherent" ) + vocab_rows.append((spec_id, cid, override, bc, pu, v.get("description", ""))) valid_spec_ids = set(vocab.keys())