feat(sandokan-local): B1.2 — LocalEngine

Primera implementación del trait Engine: orquestación in-process.

- LocalEngine encarna Cards vía arje-incarnate, mantiene un registro
  HashMap<Ulid, Entity> de entidades activas.
- run()       — incarnate + registro; mergea env del contexto.
- stop()      — SIGTERM + período de gracia + SIGKILL + reap.
- list()      — reaping perezoso (waitpid WNOHANG) + handles activos.
- status()    — reaping perezoso + LifecycleState.
- telemetry() — lee /proc/<pid>/status (VmRSS + Threads), sin invocar
                binarios externos.
- Reaping sin task de fondo: cada consulta hace waitpid WNOHANG.

proc.rs: lectura directa de procfs (mem_bytes, thread_count, proc_exists).

4 tests verdes (2 proc + 2 engine: empty list, NotFound paths).
cargo check --workspace verde.

v1: IsolationLevel es advisory (Sealed reservado para cuando el Intent
transporte rootfs spec). CPU% pendiente (requiere 2 samples).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
sergio
2026-05-20 13:57:26 +00:00
parent af5d4a1f22
commit cba3a9dd6e
5 changed files with 325 additions and 0 deletions
+1
View File
@@ -36,6 +36,7 @@ members = [
"crates/runtime/arje-echo",
"crates/runtime/sandokan-lifecycle",
"crates/runtime/sandokan-core",
"crates/runtime/sandokan-local",
# ============================================================
# compat/ — Shims D-Bus para correr software systemd-aware