Feat v0.7.12 batch exec (#66)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-go-pg (push) Successful in 2m46s
CI/CD / test-sqlite (push) Successful in 2m58s
CI/CD / build-and-deploy (push) Successful in 1m27s
CI/CD / test-frontend (push) Successful in 5s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #66.
This commit is contained in:
2026-04-02 23:57:46 +00:00
committed by xcaliber
parent c2d52f50c5
commit 3b74774077
8 changed files with 1001 additions and 5 deletions

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.