Feat v0.9.7 workflow starlark write (#81)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Has been skipped
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-go-pg (push) Successful in 2m49s
CI/CD / test-sqlite (push) Successful in 3m2s
CI/CD / build-and-deploy (push) Successful in 29s
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Has been skipped
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-go-pg (push) Successful in 2m49s
CI/CD / test-sqlite (push) Successful in 3m2s
CI/CD / build-and-deploy (push) Successful in 29s
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #81.
This commit is contained in:
31
CHANGELOG.md
31
CHANGELOG.md
@@ -2,6 +2,37 @@
|
||||
|
||||
All notable changes to Armature are documented here.
|
||||
|
||||
## v0.9.7 — Full Read/Write Workflow Starlark Module
|
||||
|
||||
Extensions with `workflow.access` permission can now start, advance,
|
||||
cancel, and signoff workflow instances directly from Starlark scripts.
|
||||
|
||||
**WorkflowEngine interface**
|
||||
|
||||
- Defined in `sandbox` package to break the `workflow ↔ sandbox` circular
|
||||
import (follows `NotificationSender` / `ConnectionResolver` pattern)
|
||||
- 4 methods: `Start`, `Advance`, `Cancel`, `SubmitSignoff`
|
||||
- `workflow.Engine` satisfies the interface implicitly — zero changes to
|
||||
the engine package
|
||||
|
||||
**New Starlark builtins**
|
||||
|
||||
- `workflow.start(workflow_id, data={})` → instance dict
|
||||
- `workflow.advance(instance_id, data={})` → instance dict
|
||||
- `workflow.cancel(instance_id)` → None
|
||||
- `workflow.submit_signoff(instance_id, decision, comment="")` → signoff dict
|
||||
- All write ops require authenticated user context (`RunContext.UserID`)
|
||||
- Graceful errors when engine or user context unavailable
|
||||
|
||||
**Refactors**
|
||||
|
||||
- `instanceToDict` helper extracted — shared by `get_instance`, `start`,
|
||||
`advance`
|
||||
- `signoffToDict` helper for signoff return values
|
||||
- `dictToJSON` helper for Starlark dict → `json.RawMessage` conversion
|
||||
|
||||
**Tests:** 6 new unit tests (mock engine, happy path + error guards)
|
||||
|
||||
## v0.9.6 — Deprecate stage_type, Collapse stage_mode
|
||||
|
||||
Simplifies the workflow stage classification model by removing
|
||||
|
||||
Reference in New Issue
Block a user