Feat v0.7.12 batch exec #66

Merged
xcaliber merged 2 commits from feat/v0.7.12-batch-exec into main 2026-04-02 23:57:46 +00:00
Showing only changes of commit 14bdddd7e9 - Show all commits

View File

@@ -2,6 +2,26 @@
All notable changes to Armature are documented here.
## v0.7.12 — Concurrent Execution Primitive
New `batch` sandbox module. Enables extensions to parallelize arbitrary
Starlark callables — including frozen library exports from `lib.require()`.
**batch module (permission: `batch.exec`)**
- `batch.exec(callables, timeout=10)` — runs up to 8 zero-arg callables concurrently, each in its own `starlark.Thread` with independent step budget. Returns `(results, errors)` tuple with ordered results. Per-branch timeout (130s, default 10).
- Nested `batch.exec()` calls are prohibited (prevents exponential goroutine growth).
- `lib.require()` not available inside branches — load libraries before the batch call.
- `print()` output from branches is discarded.
**Internal**
- New file: `sandbox/batch_module.go`.
- New permission constant: `ExtPermBatchExec`.
- Runner wiring: `buildModulesWithLibCtx` creates batch module when permission granted.
- Design doc: `docs/DESIGN-batch-exec.md`.
- 12 new tests (parallel ordering, partial failure, timeout, cancellation, cap enforcement, nesting prevention, frozen sharing, permission gating).
## v0.7.11 — Query & HTTP Ergonomics
Four new Starlark sandbox builtins. No new permissions, no schema changes.