fix(topology): correct mission anchors and rover ports

This commit is contained in:
2026-07-09 21:49:52 +08:00
parent 808276e225
commit e7becba0b0
2 changed files with 71 additions and 2 deletions
+22 -2
View File
@@ -23,6 +23,8 @@ def seed():
# ============================================================
# PHASE 0: Clean existing data (reverse dependency order)
# ============================================================
cur.execute("DELETE FROM diagram_nodes")
cur.execute("DELETE FROM diagram_layouts")
cur.execute("DELETE FROM topology_connections")
cur.execute("DELETE FROM component_states")
cur.execute("DELETE FROM component_versions")
@@ -106,6 +108,9 @@ def seed():
events["BL-01_0"] = add_event("BL-01",
ts("2024-04-19T22:58:00Z"), 0, "component_introduced",
"冰轮一号着陆东方海", source_ref="Timeline.md BL-01")
events["BL-01_terminal"] = add_event("BL-01",
ts("2024-05-17T23:01:00Z"), 1, "mission_checkpoint",
"BL-01任务最后记录", source_ref="Timeline.md BL-01末条记录")
# ---- GHC-01 ----
events["GHC-01_0"] = add_event("GHC-01",
@@ -128,6 +133,9 @@ def seed():
ts("2024-07-01T10:37:00Z"), 0, "connection_established",
"冰轮一号与冰轮二号通过柔性管道完成燃料连接",
source_ref="Timeline.md GHC-02 EVA-1")
events["GHC-02_terminal"] = add_event("GHC-02",
ts("2024-07-15T03:16:00Z"), 1, "mission_checkpoint",
"GHC-02任务最后记录", source_ref="Timeline.md GHC-02末条记录")
# ---- GHC-03 ----
events["GHC-03_0"] = add_event("GHC-03",
@@ -150,6 +158,9 @@ def seed():
"核反应堆以15%功率开始运行",
details={"time_precision": "date", "power_percent": 15},
source_ref="Timeline.md GHC-03")
events["GHC-03_terminal"] = add_event("GHC-03",
ts("2024-08-30T12:45:00Z"), 5, "mission_checkpoint",
"GHC-03任务最后记录", source_ref="Timeline.md GHC-03末条记录")
# ---- BL-03 ----
events["BL-03_0"] = add_event("BL-03",
@@ -186,6 +197,9 @@ def seed():
ts("2024-11-08T00:00:00Z"), 6, "connection_established",
"冰轮三号接入基地统一燃料/电力网络",
details={"time_precision": "date"}, source_ref="Timeline.md GHC-04 EVA-16")
events["GHC-04_terminal"] = add_event("GHC-04",
ts("2024-11-20T13:57:00Z"), 7, "mission_checkpoint",
"GHC-04任务最后记录", source_ref="Timeline.md GHC-04末条记录")
# ---- GHC-05 ----
events["GHC-05_0"] = add_event("GHC-05",
@@ -224,6 +238,9 @@ def seed():
"核反应堆功率调整至30%,全基地整合验证完成",
details={"time_precision": "date", "power_percent": 30},
source_ref="Timeline.md GHC-05 EVA-15")
events["GHC-05_terminal"] = add_event("GHC-05",
ts("2025-01-22T10:52:00Z"), 9, "mission_checkpoint",
"GHC-05任务最后记录", source_ref="Timeline.md GHC-05末条记录")
print(f"Events: {len(events)}")
@@ -511,10 +528,13 @@ def seed():
# GHC-04: Binglun fuel & power network
bl_events = {"binglun_1": "GHC-04_4", "binglun_2": "GHC-04_5",
"binglun_3": "GHC-04_6"}
hub_ports = {"binglun_1": "west", "binglun_2": "south",
"binglun_3": "east"}
for bl, ev in bl_events.items():
add_connection(bl, "fuel_port", "power_module_hub", "west",
hub_port = hub_ports[bl]
add_connection(bl, "fuel_port", "power_module_hub", hub_port,
"fuel", ev)
add_connection(bl, "power_port", "power_module_hub", "west",
add_connection(bl, "power_port", "power_module_hub", hub_port,
"power", ev)
# GHC-05: Core <-> four new modules (structural)