interplane.Get Omega
Read in your language

aegis-runtime-mv

Native Rust agent runtime: Axum WebSocket/SSE/REST gateway, heartbeat scheduler, dependency-aware task workflow, SQLite storage. Attachment of AienOS. Pre-alpha.

Brought by drakestapleton

Hermes prior art 5: delivery and scheduling guarantees stated per path (at-least-once reply ledger, at-most-once cron)

Open · #68 · open 2026-10-18 19:11 UTC

Imported from GitHub aien-dev/aegis-runtime-mv#68, by drakestapleton

drakestapleton wrote on 2026-10-18 19:11 UTC

Hermes source: gateway/delivery_ledger.py, gateway/delivery.py, cron/scheduler_tick.py, cron/occurrences.py, cron/scheduler_authority.py, cron/scheduler_liveness.py, cron/quota_hold.py, hermes_state_runtime.py.

Mechanics to implement in the gateway and heartbeat scheduler:

  • Reply delivery is at-least-once: the reply row is written to a ledger before the send; a crash-recovered send carries a visible duplicate marker. Obligation id is a content hash of session key, message reference and reply text, so re-recording collapses to one row. Owner stamps are pid plus process start time, compare-and-set.
  • Scheduled jobs fire at most once: the schedule is advanced before the job runs; if the advance cannot be persisted the job is skipped on purpose; each fire is identified by its exact scheduled instant; an unclear outcome pauses the job and only a matching verified receipt lifts that pause; liveness is silence since the last progress stamp, not run length.
  • Per-session admission queue with a runtime epoch and generation fences; rows started by an older epoch become unknown and need an operator's word.
  • Each guarantee is stated in the code next to the choice.

Allen's heartbeat and the hive's queue have no stated guarantee today.

Acceptance: kill during send shows one marked duplicate and no silent loss; kill during a cron fire shows no second fire and a paused job with its receipt path; a wedged job is reclaimed while a long busy one is not.

Parent: aien-dev/aien-architecture#267. Research note: aien-architecture docs/research/hermes-agent-prior-art.md. Prior art: Hermes Agent, Nous Research, MIT, commit 5480918 (2026-10-18). No Hermes code is copied; the mechanism is re-implemented from reading. The module header credits Hermes Agent, Nous Research, the MIT licence and the commit. Rust now, pure part effect-free and content-addressed so it can move to Omega (ADR 0024). No Python.

🤖 Generated with Claude Code

drakestapleton wrote on 2026-10-23 04:14 UTC

Progress on #68: the current feat/68-delivery-scheduling-guarantees@0b8171f5b1add5a2395a44f563a74db3eec3dc5b is only an initial reply-ledger foundation. It does not yet wire the gateway/heartbeat or satisfy the occurrence, receipt, epoch, liveness and real crash/recovery acceptance. It is not ready for publication or issue closure.

A blocking native baseline fixture has now been independently diagnosed and fixed, without changing runtime security logic: ../../etc/passwd from a deeply nested temporary workspace does not necessarily exist, so the old test hit a missing-file error before containment. The corrected test creates a real existing outside sibling file and preserves the original rejection assertions.

  • Functional fixture fix: 468b6809dcf3d54766e5132f4554703cdb66c938.
  • Raw RED/GREEN, missing-guard mutation and full-suite evidence.
  • Complete native suite: 153 passed, 0 failed, 0 ignored; formatting and all-target Clippy with warnings denied also exit0.
  • Temporarily disabling the read-containment guard makes the preserved assertion fail; the delivered runtime guard is byte-identical to the base. No weakened assertion or skipped control.

These exact supplemental commits are handed off for the existing implementation to carry, not a competing PR. The implementation worker is no longer live; continuation from the saved checkpoint has been requested through the existing designated coordinator. The rest of #68 and independent whole-candidate review remain pending.

Sign in to comment