Canonicalize agent and graph async execution #61

Merged
lost-rob0t merged 6 commits from feature/issue-54-agent-graph-canonical-async into main 2026-08-16 16:46:04 +00:00
lost-rob0t commented 2026-08-16 16:43:38 +00:00 (Migrated from github.com)

Summary

Completes the next core portion of #54 by migrating latency-bearing agent and graph execution to the canonical async-first architecture established by #59 and #60.

Agent

  • canonical execute predicates for spawn/send/pump/cancel
  • async surfaces submit execute predicates only
  • sync surfaces start/await the same async operation
  • internal child cancellation and typed-plan spawning call execute ABIs directly
  • preserve the bounded logical-agent host worker pool and its mailbox/backpressure semantics
  • propagate rlm_async cancellation as a control signal
  • attach host-controlled runtime/agent/trace/session Future metadata

Graph

  • canonical execute predicates for run/resume
  • async surfaces submit execute predicates only
  • sync run/resume start/await the same operation
  • inline subgraphs call graph_run_execute/4 directly, avoiding nested Future waits
  • preserve graph cancellation/checkpoint/resume behavior
  • propagate rlm_async cancellation as a control signal
  • attach host-controlled graph/run/trace/session Future metadata

Regression coverage

Adds directionality and exact-once tests for agent and graph operations, sync/async equivalence, mailbox/capability behavior, cancellation/timeout behavior, resume correctness, metadata, worker bounds, and a bounded scheduler-saturation test that fails quickly if inline subgraphs regress to nested Future waits.

Authority policy semantics from #53 are preserved; this PR does not add authority presentation, agentProlog/, or the TUI.

Refs #54
Refs #53

## Summary Completes the next core portion of #54 by migrating latency-bearing agent and graph execution to the canonical async-first architecture established by #59 and #60. ### Agent - canonical execute predicates for spawn/send/pump/cancel - async surfaces submit execute predicates only - sync surfaces start/await the same async operation - internal child cancellation and typed-plan spawning call execute ABIs directly - preserve the bounded logical-agent host worker pool and its mailbox/backpressure semantics - propagate `rlm_async` cancellation as a control signal - attach host-controlled runtime/agent/trace/session Future metadata ### Graph - canonical execute predicates for run/resume - async surfaces submit execute predicates only - sync run/resume start/await the same operation - inline subgraphs call `graph_run_execute/4` directly, avoiding nested Future waits - preserve graph cancellation/checkpoint/resume behavior - propagate `rlm_async` cancellation as a control signal - attach host-controlled graph/run/trace/session Future metadata ### Regression coverage Adds directionality and exact-once tests for agent and graph operations, sync/async equivalence, mailbox/capability behavior, cancellation/timeout behavior, resume correctness, metadata, worker bounds, and a bounded scheduler-saturation test that fails quickly if inline subgraphs regress to nested Future waits. Authority policy semantics from #53 are preserved; this PR does not add authority presentation, `agentProlog/`, or the TUI. Refs #54 Refs #53
Sign in to join this conversation.
No description provided.