mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 09:37:55 -05:00
feat: Add domain architecture and extract core services from Prism Console
## Domain Architecture - Complete domain-to-service mapping for 16 verified domains - Subdomain architecture for blackroad.systems and blackroad.io - GitHub organization mapping (BlackRoad-OS repos) - Railway service-to-domain configuration - DNS configuration templates for Cloudflare ## Extracted Services ### AIops Service (services/aiops/) - Canary analysis for deployment validation - Config drift detection - Event correlation engine - Auto-remediation with runbook mapping - SLO budget management ### Analytics Service (services/analytics/) - Rule-based anomaly detection with safe expression evaluation - Cohort analysis with multi-metric aggregation - Decision engine with credit budget constraints - Narrative report generation ### Codex Governance (services/codex/) - 82+ governance principles (entries) - Codex Pantheon with 48+ agent archetypes - Manifesto defining ethical framework ## Integration Points - AIops → infra.blackroad.systems (blackroad-os-infra) - Analytics → core.blackroad.systems (blackroad-os-core) - Codex → operator.blackroad.systems (blackroad-os-operator) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
27
services/aiops/maintenance.py
Normal file
27
services/aiops/maintenance.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Maintenance window utilities."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
|
||||
from . import ARTIFACTS
|
||||
|
||||
CALENDAR = ARTIFACTS / "maintenance.json"
|
||||
|
||||
|
||||
def next_window(
|
||||
service: str,
|
||||
action: str,
|
||||
calendar: Optional[List[dict]] = None,
|
||||
) -> Optional[dict]:
|
||||
if calendar is None:
|
||||
if CALENDAR.exists():
|
||||
with open(CALENDAR, "r", encoding="utf-8") as fh:
|
||||
calendar = json.load(fh)
|
||||
else:
|
||||
calendar = []
|
||||
windows = [w for w in calendar if w.get("service") == service and w.get("action") in {action, "*"}]
|
||||
windows.sort(key=lambda w: w.get("start"))
|
||||
return windows[0] if windows else None
|
||||
Reference in New Issue
Block a user