fix(db): PR #177 review round — H1/H2/T1/T2/M1

H1+H2: headquarters_body is reset+derived every run (DB is never source); optional authored frontmatter override, hard-validated; tiebreak now population DESC -> city-bearing body -> type rank -> body_id, preserving belt tenancies and fixing GJ702B to GJ702Bb. T2: NULL-reset pass for corp_specialization/hq_placement before authored re-apply (poison-tested). T1: wiki/corporations/*.md globbed into IMPORT_ECONOMICS_SOURCES. M1: licensed_clinical_services vocabulary value (31st, NonPhysical->CityTenant) + somatic-futures retag. Fixpoint verified stable across 4 consecutive regens (0 diffs); regen systems.db.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 13:00:03 +02:00
co-authored by Claude Fable 5
parent 0c8a270471
commit e63caeb620
10 changed files with 275 additions and 128 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ updated: 2026-04-05
scope: reach-wide
faction_type: economic
headquarters: Kallast (GJ 144)
corp_specialization: professional_services
corp_specialization: licensed_clinical_services
tags: [medical_re-embodiment, medical_goods, longevity, tractus, assembly, ran]
decision_refs: [D-175, D-174]
cross_refs: []
+13 -9
View File
@@ -25,11 +25,12 @@
# This file has exactly one stanza per corp_specialization value — the
# REUSED D-237 specialization_vocabulary id-space (see
# wiki/economics/specialization_vocabulary.toml): the original 27
# system-authored values plus 3 corp-only Services-extension values added
# system-authored values plus 4 corp-only Services-extension values added
# alongside this file (trade_distribution, hospitality_hub,
# professional_services — a real gap the T-1074 corp categorization pass
# found: ~10% of corps do logistics/hospitality/consulting work no original
# value covered). D-242 asked for an authored "specialization -> HQ-placement
# professional_services, licensed_clinical_services — real gaps the T-1074
# corp categorization pass found: ~10% of corps do logistics/hospitality/
# consulting/licensed-clinical work no original value covered; the fourth
# landed via PR #177 M1). D-242 asked for an authored "specialization -> HQ-placement
# map"; this vocabulary already exists and already carries the signal that
# decides placement (bulk_class_projected: NonPhysical vs everything else),
# so rather than invent a second, parallel corp-only taxonomy, the map below
@@ -178,11 +179,11 @@ hq_placement = "CityTenant"
hq_placement = "CityTenant"
# -------------------------------------------------------------------------
# Services extension (3, all NonPhysical) — added alongside the vocabulary
# extension in specialization_vocabulary.toml (D-242/T-1074). Same rule as
# the rest of Services: NonPhysical -> CityTenant (an office/depot, not a
# factory — this is exactly what made these corps hard to place in the
# original 27).
# Services extension (4, all NonPhysical) — added alongside the vocabulary
# extension in specialization_vocabulary.toml (D-242/T-1074; the fourth via
# PR #177 M1). Same rule as the rest of Services: NonPhysical -> CityTenant
# (an office/depot/clinic, not a factory — this is exactly what made these
# corps hard to place in the original 27).
# -------------------------------------------------------------------------
[trade_distribution]
hq_placement = "CityTenant"
@@ -192,3 +193,6 @@ hq_placement = "CityTenant"
[professional_services]
hq_placement = "CityTenant"
[licensed_clinical_services]
hq_placement = "CityTenant"
+14 -8
View File
@@ -28,14 +28,20 @@
# frequently equalled its system's proper_name, e.g. Gate Corp's
# "headquarters: Renaissance (GJ 251)"). Once that insert path was removed
# (D-242's whole point), those names no longer exist in the pure
# markers.json pool. Every entry below was re-verified against a real
# `make regen-db` output — see the note on each stanza for its actual
# source row. Prometheus (GJ 702B) is DROPPED from this list — verified
# live: every one of its 12 bodies has zero authored markers.json city
# names AND zero population, so there is no settlement to pin at all (a
# genuine wiki content gap: the Reach's longevity-monopoly hero system has
# no named city anywhere in its system — flagged for the lead, not fixed
# here; population/settlement_class baking cannot invent a name to pin).
# markers.json pool. Every entry below is verified against real, repeated
# `make regen-db` runs — see the note on each stanza for its actual source
# row. Note (PR #177 H1/H3): corporations.headquarters_body is RECOMPUTED
# from source on every run now, so the three corp-named Standalone-HQ pins
# below (Cygni Combines, The Gate Corporation, Mastroianni Vehicle Group)
# hold because their HQ bodies carry real authored population — the
# population-first tiebreak re-derives the same body every run (verified:
# two consecutive regens, all 8 pins applied, zero placement drift) — not
# because a stale first-run value is being kept. Prometheus (GJ 702B) is
# DROPPED from this list — verified live: every one of its 12 bodies has
# zero authored markers.json city names AND zero population, so there is
# no settlement to pin at all (a genuine wiki content gap: the Reach's
# longevity-monopoly hero system has no named city anywhere — T-1115
# authors the missing names; the bake cannot invent a name to pin).
#
# Match key: (body_id, name) against atlas_city_names — NOT the numeric
# atlas_city_names.id, which is regen-volatile (AUTOINCREMENT, no
+23 -14
View File
@@ -15,8 +15,8 @@
# specialization is authored directly in its wiki-page frontmatter
# (wiki/corporations/*.md, key: corp_specialization), not in a separate
# per-corp TOML — one value in this table, two authored sources reading it.
# The 3-value "Services extension" block near the end of the Services
# section was added for corp_specialization coverage (a corp-only gap the
# The 4-value "Services extension" block near the end of the Services
# section was added for corp_specialization coverage (corp-only gaps the
# original 27 system-scale values didn't need to cover); nothing stops a
# future system from adopting them too if the fit is right.
#
@@ -266,21 +266,23 @@ production_ubiquity_projected = "MonopolySource"
description = "The single licensed longevity/re-embodiment facility; access-controlled (Prometheus)."
# -------------------------------------------------------------------------
# Services extension (3) — added D-242/T-1074 for corp_specialization reuse.
# Services extension (4) — added D-242/T-1074 for corp_specialization reuse
# (first three), extended with licensed_clinical_services per PR #177 M1.
#
# The categorization pass that backfilled corp_specialization for all 165
# corporations (T-1074) found 16/155 wiki corps (~10%) whose actual business
# corporations (T-1074) found ~10% of wiki corps whose actual business
# — moving/selling already-made goods, running hospitality/tourism
# properties, or general professional advisory — had no honest fit among
# the original 24 system-authored values above. Per D-242's amendment
# ("prefer reusing/extending the existing vocabulary over inventing a
# parallel taxonomy"), these three values extend the shared vocabulary
# rather than spawn a corp-only one. All three are NonPhysical (services;
# CityTenant HQ placement per corp_hq_placement.toml) even though
# trade_distribution's anchor commodity is itself physical — the
# SPECIALIZATION is the logistics/service activity, not manufacture, which
# is exactly the distinction that made these corps ungroupable in the first
# place (a distributor's HQ is an office/depot, not a factory).
# properties, general professional advisory, or licensed multi-site
# clinical care — had no honest fit among the original 27 system-authored
# values above. Per D-242's amendment ("prefer reusing/extending the
# existing vocabulary over inventing a parallel taxonomy"), these values
# extend the shared vocabulary rather than spawn a corp-only one. All four
# are NonPhysical (services; CityTenant HQ placement per
# corp_hq_placement.toml) even though trade_distribution's anchor commodity
# is itself physical — the SPECIALIZATION is the logistics/service
# activity, not manufacture, which is exactly the distinction that made
# these corps ungroupable in the first place (a distributor's HQ is an
# office/depot, not a factory).
# -------------------------------------------------------------------------
[trade_distribution]
commodity_id = "consumer_goods"
@@ -302,3 +304,10 @@ production_ubiquity_override = "" # catalog default (regional)
bulk_class_projected = "NonPhysical"
production_ubiquity_projected = "Common"
description = "General business/strategy/operational advisory — risk, consulting, arbitration outside the dedicated legal_archive/financial_hub identities (Saigon Consulting, Lusaka Advisory)."
[licensed_clinical_services]
commodity_id = "medical_services"
production_ubiquity_override = "concentrated"
bulk_class_projected = "NonPhysical"
production_ubiquity_projected = "Specialist"
description = "Licensed multi-site clinical network — Assembly-certified medical/re-embodiment operators, one of several (Somatic Futures, 40+ clinics); the non-monopoly counterpart to longevity_monopoly (Prometheus, THE sole facility)."