Separate storage shard meshes and unify Endor backup topology
Verify and deploy Tabularium / verify-and-deploy (push) Has been cancelled

This commit is contained in:
2026-10-27 21:10:43 +08:00
parent 1c27f6bc1e
commit 36840ef1d4
11 changed files with 925 additions and 549 deletions
+23 -12
View File
@@ -1,4 +1,4 @@
"""Protect the relationships that make this a topology rather than a block chart."""
"""Protect the topology, independent shard sets and unified backup boundary."""
from pathlib import Path
import tempfile
import unittest
@@ -17,21 +17,32 @@ class ArchitectureTest(unittest.TestCase):
root = ET.parse(first).getroot()
ns = {'s': 'http://www.w3.org/2000/svg'}
texts = [''.join(e.itertext()) for e in root.findall('.//s:text', ns)]
self.assertEqual(texts.count('Aster VM'), 6)
for i in range(1, 4):
self.assertEqual(texts.count(f'Nexus Runtime {i}'), 2)
self.assertEqual(texts.count('Aster VM'), 10)
for i in range(1, 6):
self.assertEqual(texts.count(f'Nexus Runtime {i:02}'), 2)
for i in range(1, 3):
self.assertEqual(texts.count(f'Traefik {i}'), 2)
for prefix in ('NA', 'AS'):
for i in range(1, 3):
self.assertIn(f'{prefix}-{i:02} / 数据分片', texts)
self.assertIn(f'{prefix}-{i:02} 备份集', texts)
mesh_edges = [e for e in root.findall('.//s:path', ns)
if e.get('stroke-width') == '1.35' and e.get('opacity') == '0.65']
self.assertEqual(len(mesh_edges), 12, 'Each region must retain the full K2,3 mesh')
# The figure must remain self-contained and editable.
for family in ('PG', 'AO', 'S3'):
for i in range(1, 4):
self.assertIn(f'{prefix}-{family}-{i:02}', texts)
paths = root.findall('.//s:path', ns)
runtime_mesh = [e for e in paths if e.get('stroke-width') == '1.35'
and e.get('opacity') == '0.65']
self.assertEqual(len(runtime_mesh), 20, 'Two complete K2,5 gateway meshes')
storage_mesh = [e for e in paths if e.get('stroke-width') == '1.15'
and e.get('opacity') == '0.55']
self.assertEqual(len(storage_mesh), 36, 'Each region has two K3,3 storage meshes')
self.assertEqual(texts.count('03 统一备份系统'), 1)
for family in ('PostgreSQL', 'Aerarium', 'S3'):
self.assertIn(f'{family} 备份', texts)
self.assertIn('… / etc', texts)
self.assertIn('其他区域', texts)
self.assertNotIn('PG + Aerarium + S3', texts)
self.assertNotIn('概念设计 · 草案', texts)
self.assertNotIn('一个全球入口,多个区域,一组可恢复的对象。', texts)
self.assertFalse(any('位于北美' in t or '位于亚洲' in t for t in texts))
self.assertEqual(root.findall('.//s:image', ns), [])
self.assertIn('异步复制 / 版本化备份', texts)
if __name__ == '__main__':