Skip to content

v0.2.7 — Server-Side Deterministic Cancel (Issue #32)

Choose a tag to compare

@dahai80 dahai80 released this 02 Sep 02:49
· 6 commits to main since this release
742879e

v0.2.7 — Server-Side Deterministic Cancel (Issue #32)

Patch release. Adds server-side deterministic cancel of in-flight execute_stream over UDS, plus a version bump.

Added

  • Server-side cancel (executor.cancel) — cancel an in-flight streaming execution with a deterministic process-tree kill, not a cooperative stop request. Resolves the stream by its JSON-RPC request id, fires a oneshot channel that fe-sandbox::run_streaming's biased tokio::select! is waiting on, then kills the whole process group: killpg(-pgid, SIGINT) → 500ms grace → killpg(-pgid, SIGKILL) → ppid-tree descendant walk (RUN-9) for setsid orphans. The terminal Done frame returns exit_code: -1 + cancelled: true.
    • fe-sandbox run_streaming(cfg, cancel_rx) — biased select over exit / cancel / channel-closed.
    • fe-ipc StreamRegistry = Mutex<HashMap<String, oneshot::Sender<()>>> (IPC layer, keeps Executor stateless per M-ARCH-1). Cancel works cross-connection.
    • ExecutionResult.cancelled: bool (#[serde(default, skip_serializing_if="is_false")]), 4-layer wired.
    • Python FusionSandboxExecutor.cancel_stream(stream_id, *, sock_path=None) -> bool.

Changed

  • Version bump 0.2.6 → 0.2.7 (3-point SSOT: Cargo.toml + pyproject.toml + python/fusion_executor/__init__.py fallback).

Tests

500 Rust + 210 Python (1 skip TCC) green. clippy --all-targets -D warnings clean (only upstream block v0.1.6 future-incompat). fmt / ruff clean. maturin builds.

Notes

  • 0 new unsafe — reuses fe-sandbox::kill_process_group_async (nix killpg / kill, all safe).
  • In-process execute_streaming(req, None) path is never cancellable (no serve() running → no registry); cancel is a UDS-only capability.
  • Closes #32 via PR #33.