Skip to content

Production Readiness Roadmap

Node1 edited this page Jun 18, 2026 · 15 revisions

Production Readiness Roadmap

Purpose

This page defines what XAI OS needs to become useful for production deployment. The QEMU target is complete (milestones 0-71), but the OS is still a single-boot, cooperative, self-test-oriented prototype. This roadmap covers the gap between "QEMU complete" and "production useful."

Items are ordered by priority within each tier. Higher tiers block lower tiers.

Tier 1 is complete as of commit 8083940 (2026-06-16). All 5 core OS items implemented: preemptive scheduler, ELF loader with address space isolation, persistent filesystem, TCP/IP stack, and SSH server. 53 files changed, ~3,900 lines added.

Tier 2 is complete as of 2026-06-16. All 5 operability items implemented: RTC/wall time, persistent logging with ring buffer, crash recovery with backoff, package delivery with SHA-256 verification, and hardware watchdog with panic recovery. 8 new files, 10 modified files.

Tier 3 is complete as of 2026-06-16. All 5 AI agent capability items implemented: Q8.8 fixed-point CPU inference, C source-code scanner, Git blob hashing and unified diff, bytecode VM sandbox execution, and app-agent command protocol with 6 dispatch commands. 4 new files, 12 modified files.

  • Item 11: Real CPU inference runtime — Q8.8 matmul_q88(), forward_pass_q88() with ReLU, MATMUL/FORWARD model kinds, identity matrix verification ✅ Done
  • Item 12: Real source-code indexingsource_index_scan_source() C tokenizer, symbol/function detection, query_symbol_count() ✅ Done
  • Item 13: Real Git operationscompute_blob_hash() SHA-256, compute_diff() unified diff with hunks, blob/diff counters ✅ Done
  • Item 14: Real sandbox execution — Bytecode VM (8 regs, 9 ops), sandbox_execute_build(), arena output, max-cycle guard ✅ Done
  • Item 15: App-agent command protocolagent_protocol.c 128-byte request/response, 6 commands, syscall 34, agenttest.c userspace app ✅ Done

Tier 4 is complete as of 2026-06-16. All 5 hardware readiness items implemented: NUMA-aware memory, SMMUv3 enforcement, stack canaries, rate limiting/quotas, and PCIe enumeration. 10 new files, 7 modified files.

  • Item 16: NUMA-aware memory allocationnuma.c, per-node free-stacks, pmm_alloc_page_on_node() ✅ Done
  • Item 17: IOMMU/SMMU enforcementsmmu.c, SMMUv3 driver at 0x09050000, stream tables, TLB invalidate ✅ Done
  • Item 18: Kernel ASLR and stack canariesstack_canary.c, CNTVCT_EL0 seed in entry.S, BEGIN/END macros ✅ Done
  • Item 19: Rate limiting and resource quotasrate_limit.c, token bucket, CPU/memory/network enforcement ✅ Done
  • Item 20: PCI/PCIe enumerationpci.c, ECAM at 0x4010000000, multi-function scan, capability walking ✅ Done

Tier 5 is complete as of 2026-06-17. All 5 ecosystem items implemented: POSIX shell with pipes/redirects/sed, CI/CD pipeline, performance benchmarking, developer documentation, and MIT licensing. 9 new files, 7 modified files.

  • Item 21: Selective POSIX compatibilityhandle_sed(), parse_and_execute_pipeline(), pipes via /tmp/_pipe_stage, posix-shell.c userspace app ✅ Done
  • Item 22: CI/CD pipeline.github/workflows/ci.yml with compile-check, ABI validation, QEMU smoke test, regression suite ✅ Done
  • Item 23: Performance benchmarkingbenchmark-baseline.py, METHODOLOGY.md, baseline-v1.json, optional Linux baseline comparison ✅ Done
  • Item 24: Developer documentationdocs/API.md, docs/ARCHITECTURE.md, docs/GETTING-STARTED.md, expanded CONTRIBUTING.md ✅ Done
  • Item 25: Licensing — MIT License (2024-2026, XAI OS Contributors) ✅ Done

Status Legend

Marker Meaning
⬜ Not started Planned but no implementation yet.
🔵 In progress Active engineering work.
✅ Done Implemented and tested.
⚠️ Blocked Waiting on prerequisite design, code, hardware, or tooling.

Contents


Tier 1: Core OS Functionality

Without these, nothing real can run. These are the critical-path items.

# Item Description Status
1 Real preemptive scheduler with concurrent execution Round-robin scheduler on CPU 0 with GICv3 PPI timer interrupts (INTID 30). Full context save/restore (34 registers). CPUs 1-3 remain leased AI cores with no-migration guarantee. scheduler_tick() drives preemption and address space switching. ✅ Done
2 Real ELF loader with proper address space isolation Full ELF64 parser validating magic/class/machine (EM_AARCH64). Per-process L2/L3 page table sub-trees with shared L0/L1. Non-Global (nG) bit on user PTEs. xaios_process_aspace_t tracks private physical pages. Address space swap on context switch with TLBI VMALLE1IS. ✅ Done
3 Persistent filesystem across reboots Separate xaios-persistent.img VirtIO block device surviving reboots. MFS v3: 64 nodes, 16 blocks/file, 256 data sectors. fsck_volume() consistency check on mount. Handle-based multi-device virtio_blk API. ✅ Done
4 Real TCP/IP stack with external connectivity Persistent VirtIO-net driver with live TX/RX queues. ARP cache, IPv4 headers, ICMP echo reply. Static IP 10.0.2.15 via QEMU SLIRP. Socket syscall ABI (LISTEN/ACCEPT/RECV/SEND/CLOSE). network_poll_tick() for scheduler-driven RX. ✅ Done
5 Real SSH server Userspace /bin/sshd on port 22. Crypto from scratch: SHA-256 (FIPS 180-4), HMAC-SHA256 (RFC 2104), AES-128-CTR (FIPS 197), Curve25519 (RFC 7748). SSH-2 protocol: KEX, user auth, session channels. Baked-in test keypair, hardcoded admin:admin. ✅ Done

Tier 2: Operability

Without these, the system is not manageable in any real deployment.

# Item Description Status
6 Real-time clock and wall time PL031 RTC driver at 0x01010000 reading epoch seconds. wall_time_now_ns() combines RTC epoch with monotonic counter offset for sub-second wall-clock resolution. wall_time_calibrate() called once at boot. Self-test verifies monotonicity and epoch lower bound. ✅ Done
7 Proper logging daemon with persistent log storage 64 KB in-kernel ring buffer (klog_ring.c). Log levels (DEBUG/INFO/WARN/ERROR/PANIC) with klog_level() prepending wall-clock timestamps. klog_flush() persists ring to /var/log/kern.log via mutable_fs. klog_rotate() at 8 KB file limit. All klog() output captured to ring simultaneously with UART. ✅ Done
8 Process crash recovery and restart policies Exponential backoff (1s base, doubling to 60s cap). "on-failure" restart policy (restart on crash, not clean exit). 8-slot crash dump ring recording service name, exit code, wall-clock timestamp, restart count, and uptime. service_heartbeat() updates per-service heartbeat time. service_watchdog_check() detects hung services (30s timeout). ✅ Done
9 Package/update delivery mechanism Freestanding FIPS 180-4 SHA-256 implementation (sha256.c), verified with NIST test vectors. update_stage_chunk() for chunked payload delivery (4 KB max chunks) to /update/staging.bin. Running SHA-256 hash verification via update_verify_hash(). Key-value manifest parser (update_parse_manifest()) extracting version, target, size, hash, generation. Delivery status tracking (bytes received/expected, chunks written, hash verified). ✅ Done
10 Hardware watchdog and panic recovery Timer-based watchdog with 10s deadline. watchdog_trigger_reset() issues PSCI SYSTEM_RESET via HVC #0 (0x84000009), replacing the infinite wfe halt in panic_at(). Boot counter persisted to /var/boot_counter via mutable_fs. Recovery mode activated after 3 consecutive failed boots (skips non-essential services, attempts update recovery). Boot counter reset on successful boot completion. ✅ Done

Tier 3: AI Agent Capability

Without these, XAI OS can't do its actual job — running embedded AI agents that improve applications.

# Item Description Status
11 Real CPU inference runtime with actual model execution Q8.8 fixed-point matmul_q88() and forward_pass_q88() with ReLU activation. MATMUL (kind=5) and FORWARD (kind=6) model dispatches. Identity matrix (I_2x2 × I_2x2 = I_2x2) self-test in Q8.8. cpu_ai_runtime_inference_count() counter. Max 16×16 matrix dimension. ✅ Done
12 Real source-code indexing source_index_scan_source() walks C source character-by-character: skips comments/strings, identifies typedef/struct/enum/union as TYPE symbols, function declarations via type-keyword + identifier + (. query_symbol_count() API. source_index_scan_count() counter. Self-test with 4-line C fixture. ✅ Done
13 Real Git operations git_workspace_compute_blob_hash() formats "blob \0" and hashes with SHA-256. git_workspace_compute_diff() line-by-line comparison producing unified diff hunks (max 8). blob_hash_count() and diff_count() counters. Self-test verifies hello-world hash and 1-hunk diff. ✅ Done
14 Real build/test sandbox execution Bytecode VM: 8 int64_t registers, 9 opcodes (NOP/LOAD_IMM/ADD/MUL/EMIT/CMP/JNZ/HALT/EMIT_STR). sandbox_execute_build() runs program in BUILDING state, emits bytes to arena. Max cycles = insn_count × 64. sandbox_vm_exec_count() counter. Self-test emits "OK". ✅ Done
15 App-agent command protocol agent_protocol.c with 128-byte request (magic=0x41475251) and response (magic=0x41475253) headers. 6 commands: INFERENCE, INDEX_QUERY, GIT_STATUS, GIT_DIFF, BUILD, PING. Syscall 34 (XAIOS_SYSCALL_AGENT_DISPATCH) with XAIOS_CAP_AGENT capability. agenttest.c userspace app testing 4 commands + bad-magic rejection. ✅ Done

Tier 4: Hardware Readiness

Without these, XAI OS won't survive real deployment on physical hardware.

# Item Description Status
16 NUMA-aware memory allocation NUMA topology module (numa.c) creates single node spanning all conventional memory on QEMU virt. Per-node free-stacks (262K pages/node max). pmm_alloc_page_on_node(node_id), pmm_alloc_page_near(preferred) for locality-aware allocation. pmm_node_of_page() for page-to-node lookup. Existing pmm_alloc_page() delegates to node 0 with multi-node fallback. Self-test verifies topology, alloc/free, node lookup. ✅ Done
17 IOMMU/SMMU enforcement SMMUv3 driver (smmu.c) at MMIO 0x09050000 (page 0 + page 1). IDR0 detection with graceful bypass fallback. Linear stream table (32 STEs × 64B). 128-entry command queue with producer/consumer tracking. smmu_register_stream()/smmu_unregister_stream() for device stream management. smmu_tlb_invalidate_all() via TLBI command. CR0.SMMUEN enable with CR0ACK polling. GBPA bypass for unmapped streams. smmu=on added to QEMU machine options. ✅ Done
18 Kernel ASLR and stack canaries Stack canary seeded from CNTVCT_EL0 XOR'd with 0x5841494F535F4341 in entry.S after BSS clear. XAIOS_STACK_PROTECT_BEGIN/END macros for manual insertion: XOR canary with SP, push/pop/compare. stack_canary_check() panics on mismatch. Self-test verifies canary seed, protected function execution, and deliberate corruption detection. Applied to critical kernel paths. ✅ Done
19 Rate limiting and resource quotas per AI cell Token bucket rate limiter (rate_limit.c) with per-cell CPU, network RX/TX, and memory quotas. rate_limit_cpu_consume() throttles on exhaustion. rate_limit_check_memory()/rate_limit_memory_commit()/rate_limit_memory_release() for memory cap enforcement. rate_limit_check_network() drops frames exceeding bandwidth. Lazy refill via timer_now_ns(). Violation counters per resource type. Self-test exercises exhaustion, cap violations, and release. ✅ Done
20 Proper PCI/PCIe enumeration beyond discovery ECAM-based PCIe enumeration (pci.c) at base 0x4010000000. Maps bus 0 (1MB) with device-nGnRnE attributes. Full config space read: vendor/device ID, class/subclass/prog_if, header type, 6 BARs, interrupt line/pin. Multi-function device scanning via header type bit 7. PCIe capability list walking (cap ID 0x10 detection). Device table (64 max) with VirtIO (vendor 0x1AF4) and class-based counting. pci_find_device() for vendor/device lookup. ✅ Done

Tier 5: Ecosystem

Without these, the project won't be adopted by external developers.

# Item Description Status
21 Selective POSIX compatibility layer handle_sed() for s/old/new/[g] substitution in remote_login.c. parse_and_execute_pipeline() with find_unquoted_char() for pipe and redirect (>) support via temp files (/tmp/_pipe_stage). Userspace /bin/posix-shell scripted test exercising echo/grep/head/tail/cat pipes, file redirects, and sed. 25+ commands in shell interpreter. ✅ Done
22 CI/CD pipeline with automated QEMU regression .github/workflows/ci.yml with 4 jobs: compile-check (-fsyntax-only for all kernel/userspace C files, excluding x86_64), ABI contract validation (qemu-abi-contract.py), build-and-smoke (make image + qemu-smoke.py), and regression suite. Makefile compile-check and qemu-baseline targets. ✅ Done
23 Performance benchmarking against Linux/BSD baselines benchmark-baseline.py runs XAI OS smoke test, extracts telemetry, optionally boots Linux kernel in QEMU for comparison (via XAIOS_LINUX_KERNEL/XAIOS_LINUX_INITRD env vars). benchmarks/METHODOLOGY.md documents QEMU TCG caveats. baseline-v1.json example format. No performance claims from QEMU data. ✅ Done
24 Developer documentation for external contributors API reference (docs/API.md), system architecture guide (docs/ARCHITECTURE.md), and getting-started guide (docs/GETTING-STARTED.md) for app-agent developers and driver contributors. CONTRIBUTING.md expanded with code style, dev environment setup, and app/module contribution guides. ✅ Done
25 Licensing decision MIT License adopted. LICENSE file contains full MIT text (2024-2026, XAI OS Contributors). Permissive license allowing use, modification, and distribution with attribution. ✅ Done

Effort Estimates

Tier Scope Items Rough estimate
Tier 1 Core OS functionality 1-5 6-12 months Complete (commit 8083940)
Tier 2 Operability 6-10 2-4 months Complete (2026-06-16)
Tier 3 AI agent capability 11-15 4-8 months Complete (2026-06-16)
Tier 4 Hardware readiness 16-20 3-6 months Complete (2026-06-16)
Tier 5 Ecosystem 21-25 1-2 months Complete (2026-06-17)

Critical path: Items 1-10 (Tier 1 + Tier 2), items 11-15 (Tier 3), items 16-20 (Tier 4), and items 21-25 (Tier 5) are complete. All five tiers of the production readiness roadmap are implemented.

Dependencies

Tier 1 (items 1-5)
  └── Tier 2 (items 6-10)
        └── Tier 3 (items 11-15)
              └── Tier 4 (items 16-20)
                    └── Tier 5 (items 21-25)

Tier 1 items are largely independent of each other but all must be complete before Tier 2 makes sense. Tier 3 requires Tier 2 operability (logging, crash recovery, updates). Tier 4 requires Tier 3 to be working in QEMU before porting to physical hardware. Tier 5 is ongoing but becomes priority after Tier 4.

Related Pages

Clone this wiki locally