Boot Orchestrator
Theathena.boot.orchestrator module provides a modular, parallelized boot sequence that replaces the monolithic .agent/scripts/boot.py.
Architecture
The boot process is broken into discrete loaders, each responsible for a specific initialization phase:Boot Phases
Phase 0: Pre-flight
- Enable crash watchdog
- Display boot banner
Phase 1: Environment Verification
- Verify Python version, dependencies
- Ensure daemon is running
- Check for crash artifacts
- Verify canary file freshness
Phase 1.1: Security Patch
- Apply CVE-2025-69872 mitigation (DiskCache security)
Phase 1.5: System Sync
Phase 2: Identity Verification
- Verify
Core_Identity.mdintegrity via SHA-384 hash - Compare against expected hash:
EXPECTED_CORE_HASH - Refuse to boot on mismatch
Phase 3: Memory Recall
- Display summary of last session
- Extract deferred action items
- Show focus area from previous session
Phase 3.5: Token Budget Check
- Measure token usage of boot files
- Auto-compact if exceeds threshold
Phase 4: Session Creation
- Create new session log in
.context/memories/session_logs/ - Format:
YYYY-MM-DD-session-XX.md
Phase 5: Audit Reset
Phase 6-7: Parallel Context Loading
The boot sequence usesThreadPoolExecutor to parallelize expensive operations:
- Reduces boot time from ~45s to ~12s
- Maximizes CPU utilization during I/O-bound operations
- Non-blocking health checks and cache warming
Phase 8: Sidecar Launch
- Sovereign index maintenance
- Background sync operations
Final: Display Summary
Loaders Reference
UILoader
StateLoader
IdentityLoader
MemoryLoader
SystemLoader
PrefetchLoader
Usage
Standard Boot
Verify Mode
Configuration
Boot Timeout
Expected Core Hash
To update the expected hash after legitimate changes toCore_Identity.md:
EXPECTED_CORE_HASH in athena/boot/constants.py.
Error Handling
Boot Failure (Identity Mismatch)
- Review changes to
Core_Identity.md - If legitimate, update
EXPECTED_CORE_HASH - If unauthorized, restore from backup
Crash Detection
Performance Metrics
Boot Time Breakdown (Parallelized):- Phase 0-1: ~2s (environment verification)
- Phase 2: ~0.5s (identity check)
- Phase 3-7: ~8s (parallel context loading)
- Phase 8: ~1s (sidecar launch)
- Total: ~12s
- Total: ~45s