scroll Portal boot is a 4-phase process: ## Phase 0:Proto-Boot Minimal startup. Initialize Forest(SQLite at ~/.hexos/forest.db). Load db-targetThings from Forest to discover PostgreSQLhosts. This phase requires ZERO network —just the local filesystem. ## Phase 1:Database Discovery Try each db-target host inorder (hexlet first, localhost, remotes).2-second timeout per host. First successfulconnect wins. Auto-create schema if tablesmissing. ## Phase 2: Definition Loading FromPostgreSQL (or Forest fallback), load intoOnceLock caches: - GEM_DEFINITIONS (10 gemsfrom gem ring) - RING_DEFINITIONS (136 rings)- MESH_NODE_DEFINITIONS (9 nodes) -COMMAND_DEFINITIONS (104 commands from commandThings) - CONFIG_CHIPS (54 chips) ## Phase 3:Mesh Awareness Announce to mesh (writelast_boot + last_heartbeat on this nodeThing). Start Pulse heartbeat (60s). Sync FIDpillars. Initialize AT Protocol PDS signingkey. Register XRPC actions. ## Failure Mode:Forest Sovereignty If ALL PostgreSQL hostsfail, Portal runs on Forest (SQLite). Commandsdegrade gracefully. New Things createdlocally. When PostgreSQL returns,recovery_sync_to_pg pushes offline changesback. ## Federation Pattern Every node looksto hexlet for source of truth. Nodes keepProto-Boot Things (db-targets, config, gems,rings) in Forest for offline resilience. Ifhexlet goes down, nodes create Things locally.When hexlet returns, local Things sync backvia HEXPANSE push. Inventory Box: per-Beingportable box that mirrors touched Things toForest. Survives disconnect. The start offederated boxes.