-
-
Initial state: Supervised worker executing healthy session tasks with persistent IPC memory channels and verified register allocations.
-
Signal containment: Hardware interrupt (SIGBUS/SIGSEGV) intercepted in-memory; registers and stack frames dumped prior to kernel exit.
-
Dynamic code generation: Bounded AST patch synthesized under memory safety steering constraints (max 25 LOC, <350ms ceiling).
-
In-place reanimation: Worker resumed under identical PID invariant with 0 bytes heap memory drift and active state recovery.
-
Telemetry & verification: Live Prometheus telemetry stream alongside deterministic Kiro hook invocations and MCP gateway audit traces.
Inspiration
What it does
How we built it
Inspiration
Distributed agent workflows and autonomous worker nodes frequently crash when encountering unhandled runtime faults (such as null pointer dereferences, poisoned arithmetic operands, or memory corruption). Standard orchestration platforms rely on brute-force container reboots, incurring costly downtime (5–60s), tearing down active IPC channels, and wiping in-memory session states.
We built NecroKernel-OS to treat a crashed process not as a terminal failure, but as a surgical patient—trapping faults directly at the OS signal level and reanimating the exact same runtime in-place with zero downtime.
What it does
- In-Process Signal Trapping: Intercepts fatal hardware/OS-level runtime interrupts (
SIGSEGV,SIGBUS,SIGFPE) directly within the worker lifecycle before kernel-level termination. - Bounded AST Patch Synthesis: Extracts register dumps and stack frames, parses the offending AST block, and synthesizes dynamic, strictly bounded patches in under 15ms.
- Invariant PID Continuity: Hot-swaps the patched execution frame and reanimates the suspended worker under the exact same process ID (
PID invariant) with zero heap memory drift (0B drift). - Live Telemetry & Auditability: Streams live SSE telemetry to an interactive web dashboard, exposing execution tracing, Kiro hook invocations, MCP gateway calls, and Prometheus metrics.
How we built it
- Hypervisor Engine: Python multiprocessing, low-level POSIX signal trapping, shared memory IPC, and AST mutation engines.
- Telemetry & Frontend: Next.js 14 (App Router), TypeScript, and Tailwind CSS with real-time SSE streaming and an integrated cloud simulation fallback.
- Verification & Safety: 59 deterministic pytest test suites enforcing reanimation invariants, memory safety steering limits (max 25 LOC, 350ms execution ceiling), and AST safety sandboxing.
Challenges we ran into
Preserving strict PID continuity while hot-patching runtime frames in Python without triggering container segmentation faults, while strictly bounding the dynamic AST synthesis engine to execute under 350ms to prevent cascading network timeouts across distributed agent meshes.
Accomplishments that we're proud of
- Guaranteed 100% PID continuity across repeated fatal memory and arithmetic faults.
- Maintained exactly 0 bytes of heap memory drift across measured crash/reanimation cycles.
- Successfully passing the full end-to-end hypervisor verification test suite (59/59 passing tests).
What we learned
Advanced runtime stack manipulation, low-level signal interception boundaries, and deterministic recovery protocols for resilient autonomous agent infrastructure.
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for NecroKernel-OS
Built With
- docker
- next.js
- prometheus
- pytest
- python
- react
- tailwindcss
- typescript
