Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions apps/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
<link rel="icon" type="image/png" href="/logo.png" />
<link rel="apple-touch-icon" href="/logo.png" />

<!-- Typography: Poppins & JetBrains Mono -->
<!-- Typography: Poppins, JetBrains Mono & Silvana Editorial Serif -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&family=JetBrains+Mono:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,300..800;1,6..72,300..800&display=swap" rel="stylesheet">
<link href="https://fonts.cdnfonts.com/css/silvana" rel="stylesheet">

<!-- Schema.org JSON-LD Structured Data -->
<script type="application/ld+json">
Expand Down
Binary file added apps/web/public/fonts/silvana/Silvana-Bold.woff
Binary file not shown.
Binary file added apps/web/public/fonts/silvana/Silvana-Italic.woff
Binary file not shown.
Binary file added apps/web/public/fonts/silvana/Silvana-Light.woff
Binary file not shown.
Binary file added apps/web/public/fonts/silvana/Silvana-Medium.woff
Binary file not shown.
Binary file not shown.
8 changes: 5 additions & 3 deletions apps/web/src/components/layout/RootLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import { cn } from '../../lib/utils';
* - Dominating cream background (#FFF8F0) with skeuomorphic porcelain depth.
* - Fluid, component-by-component Framer Motion transitions.
* - Subtle ambient cobalt blue lighting.
* - Editorial Silvana typography applied across pages, preserving sans on home hero/navbar/footer.
*/
export const RootLayout: React.FC = () => {
const location = useLocation();
const isHome = location.pathname === '/';
const isPatents = location.pathname.startsWith('/patents') || location.pathname === '/governance/patents';
const isArchitect = location.pathname.startsWith('/architect');

Expand All @@ -34,7 +36,7 @@ export const RootLayout: React.FC = () => {
className="pointer-events-none fixed inset-0 z-0 opacity-20 bg-[linear-gradient(to_right,rgba(26,26,26,0.03)_1px,transparent_1px),linear-gradient(to_bottom,rgba(26,26,26,0.03)_1px,transparent_1px)] bg-[size:4rem_4rem]"
/>

{/* Floating Porcelain Dock Navbar */}
{/* Floating Porcelain Dock Navbar (Maintains Poppins / font-sans) */}
<Navbar />

{/* Centered Main Stage */}
Expand All @@ -56,14 +58,14 @@ export const RootLayout: React.FC = () => {
animate={{ opacity: 1, y: 0, scale: 1 }}
exit={{ opacity: 0, y: -10, scale: 0.995 }}
transition={{ duration: 0.32, ease: [0.16, 1, 0.3, 1] }}
className="w-full"
className={cn('w-full', !isHome && 'silvana-scope')}
>
<Outlet />
</motion.div>
</AnimatePresence>
</div>
</main>
{/* Antigravity-Style Monumental Footer */}
{/* Antigravity-Style Monumental Footer (Maintains Poppins / font-sans) */}
<Footer />
</div>
</OnboardingGate>
Expand Down
69 changes: 69 additions & 0 deletions apps/web/src/components/topology/TopologyGraph.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { describe, expect, it } from 'bun:test';
import { TopologyGraph } from './TopologyGraph';
import { clusterState } from '../../engine/state';

describe('TopologyGraph Component & Autonomous DAG Suite', () => {
it('exports TopologyGraph as a valid React functional component', () => {
expect(TopologyGraph).toBeDefined();
expect(typeof TopologyGraph).toBe('function');
});

it('validates 7 enterprise nodes in cluster state', () => {
const nodes = clusterState.getNodes();
expect(nodes.length).toBeGreaterThanOrEqual(7);

const ids = nodes.map((n) => n.id);
expect(ids).toContain('db-primary');
expect(ids).toContain('db-replica');
expect(ids).toContain('redis-cache');
expect(ids).toContain('auth-service');
expect(ids).toContain('payment-service');
expect(ids).toContain('api-gateway');
expect(ids).toContain('web-frontend');
});

it('verifies DAG is cycle-free with Kahn topological sort', () => {
const graph = clusterState.getGraph();
expect(graph.hasCycle()).toBe(false);

const order = graph.getTopologicalRecoveryOrder();
expect(order).toBeDefined();
expect(order.length).toBe(7);

Check failure on line 31 in apps/web/src/components/topology/TopologyGraph.test.ts

View workflow job for this annotation

GitHub Actions / 🧪 Unit Test Execution

error: expect(received).toBe(expected)

Expected: 7 Received: 8 at <anonymous> (/home/runner/work/horizon/horizon/apps/web/src/components/topology/TopologyGraph.test.ts:31:26)

// Root database must be restored before dependent microservices
const dbIndex = order.indexOf('db-primary');
const authIndex = order.indexOf('auth-service');
const gatewayIndex = order.indexOf('api-gateway');
const webIndex = order.indexOf('web-frontend');

expect(dbIndex).toBeLessThan(authIndex);
expect(authIndex).toBeLessThan(gatewayIndex);
expect(gatewayIndex).toBeLessThan(webIndex);
});

it('verifies reverse blast radius calculation for root db outage', () => {
const graph = clusterState.getGraph();
const blast = graph.computeBlastRadius('db-primary');

expect(blast.targetNodeId).toBe('db-primary');
// Primary DB failure cascades to cache, replica, auth, payment, gateway, web
expect(blast.affectedNodeIds).toContain('redis-cache');
expect(blast.affectedNodeIds).toContain('db-replica');
expect(blast.affectedNodeIds).toContain('auth-service');
expect(blast.affectedNodeIds).toContain('payment-service');
expect(blast.affectedNodeIds).toContain('api-gateway');
expect(blast.affectedNodeIds).toContain('web-frontend');
expect(blast.severity).toBe('critical');
});

it('verifies minimal leaf blast radius for web frontend outage', () => {
const graph = clusterState.getGraph();
const blast = graph.computeBlastRadius('web-frontend');

expect(blast.targetNodeId).toBe('web-frontend');
// Frontend is an edge leaf node; downtime should not cascade to core databases
expect(blast.affectedNodeIds.length).toBe(0);
expect(blast.severity).toBe('low');
});
});

Loading
Loading