Changelog¶
[0.3.4]¶
โจ Added¶
- Testing Client (
mageflow.testing): New pytest plugin providing aTestClientAdapterfor testing mageflow workflows without a live Hatchet or Redis backend. mageflow_clientfixture with automatic setup/teardown- Typed dispatch records:
TaskDispatchRecord,SwarmDispatchRecord,ChainDispatchRecord - Assertion API:
assert_task_dispatched,assert_swarm_dispatched,assert_chain_dispatchedwith subset and exact matching - Local execution mode for running task handlers in-process
fakeredisbackend support for dual-backend testing (real Redis vs in-memory)- Configurable via
pyproject.toml[tool.mageflow.testing]section - Integration Tests for Testing Plugin: User-workflow integration tests covering task, swarm, and chain dispatch scenarios.
๐ Fixed¶
- Chain Creation Inside
abounded_field: Fixed a bug where creating a chain inside anabounded_fieldcontext failed due to a nested pipeline conflict. The chain creator now correctly reuses the existing Redis pipeline instead of creating a conflicting one. - Fix retry counter: We now retry total of 4 times for setting retries=3 (like hatchet does by default)
- Timeout/Cancellation Retry: We now retry for timeout as well.
๐ Changed¶
abounded_fieldMoved tothirdmagic:abounded_fieldis now exported fromthirdmagicinstead of being an alias inmageflow. This makes it available tothirdmagic-only consumers without requiring amageflowdependency.
๐ ๏ธ Technical Improvements¶
abounded_fieldTest Suite: Added comprehensive tests covering signatures, chains, swarms, and mixed combinations insideabounded_field.- Retry Integration Tests: Added
retry_timeout_taskworker and test cases verifying retry behavior for both timeout and error scenarios.
[0.3.3]¶
โจ Added¶
- Signature Retry Cache: Durable tasks are now idempotent for creating signatures, i.e. they won't create duplicate signatures on retry, they will use the one created in the original run.
[0.3.2]¶
โจ Added¶
- Bulk Task Addition to Swarm:
aio_run_in_swarm()now accepts a list of tasks, scheduling multiple tasks in a single call with a shared message. - New
aio_run_tasks_in_swarm()method for adding multiple tasks with individual messages per task. - Example:
await swarm.aio_run_in_swarm([t1, t2], msg) - Exposed
abounded_field: A new context manager that allows multi-signature updates in a single transaction. - Lint CI Job: Added
ruffandblacklint checks to the CI pipeline. - CodeRabbit Configuration: Added
.coderabbit.yamlfor automated code review on PRs.
๐ Fixed¶
- Race Condition in Swarm Task Publishing: Tasks are now saved to the swarm atomically alongside their parameter updates, preventing
fill_running_tasksfrom publishing tasks before their kwargs are set.
๐ ๏ธ Technical Improvements¶
- Rapyer version bump:
thirdmagicnow requiresrapyer>=1.2.5to support atomic add-task + update-params transactions. - Race condition tests: Added unit tests verifying that tasks are never published before being fully configured.
[0.3.1]¶
โจ Added¶
- Configurable TTL for Signatures: Added
MageflowConfigwith per-signature-type TTL settings for active and post-completion states. TTLConfigcontrols general active/done TTL defaultsSignatureTTLConfigallows overriding TTL per signature type (task, chain, swarm)- Pass config via
Mageflow(hatchet, redis, config=MageflowConfig(ttl=TTLConfig(...))) SignatureConfigmodel inthirdmagic: NewSignatureSettingsclass variable onSignaturefor configurablettl_when_sign_done.
๐ Changed¶
- Signature cleanup TTL:
Signature.remove_task()now uses the configurableSignatureSettings.ttl_when_sign_doneinstead of the hardcodedREMOVED_TASK_TTLconstant.
๐ Fixed¶
- Swarm bug: Fixed a bug that causes swarm concurrency to fill without actually tasks running.
[0.3.0]¶
๐ Major Changes¶
- Monorepo Split: Restructured from a single package into a multi-package workspace using
uvworkspaces. libs/mageflowโ Core task orchestration enginelibs/third-magic(thirdmagic) โ Shared models, signatures, and task definitionslibs/mage-voyanceโ Visualizer (extracted frommageflow/visualizer)- Client Adapter Pattern: We changed the design to be ready for future support of additional task managers (like temporal). We extracted the hatchet unique code to client module, there we handle all the hatchet code
โจ Added¶
mageflow-mcpPackage: New MCP (Model Context Protocol) server for workflow observability, enabling AI agents to inspect mageflow workflows.- MCP tools:
get_signature,list_signatures,list_registered_tasks,get_container_summary,list_sub_tasks,get_logs
๐ Changed¶
- BREAKING โ Package Imports: All imports changed due to the split. Core orchestration from
mageflow, shared models fromthirdmagic. - Swarm Task Calling: All swarm tasks will be called from
fill_running_tasksworkflow. This is an inner task of mageflow, it is a gateway for publishing new tasks. - Task Lock Responsibility: Lock management moved from
fill_running_tasksto the task client layer. - Hatchet SDK Requirement: Now requires
hatchet-sdk>=1.22.5.
๐ Fixed¶
- Task Cancellation Handling: We dont retry task when it is cancelled or when there is a timeout.
๐ ๏ธ Technical Improvements¶
- Per-package CI coverage: Coverage pipeline reports per-package results with tags.
- Publish pipeline for thirdmagic: CI can now publish the
thirdmagicpackage independently.
[0.2.0]¶
๐๏ธ Design Changes¶
- Nested Tasks Redesign: We change how nested task (like task in a chain) alert the parent task on status change. This will help save a lot of memory in redis and have faster execution. For that we added:
- Container sub-task hooks:
on_sub_task_done()andon_sub_task_error()abstract methods onContainerTaskSignaturefor handling child task lifecycle events. - BREAKING - Removed
task_identifiersfromTaskSignature: Replaced bysignature_container_idfor parent reference.
โจ Added¶
aio_run_in_swarm()method: Add and schedule a task in a running swarm in a single call, replacing the previousadd_task()+aio_run_no_wait()two-step pattern.- Chain kwargs forwarding: Chains now accept
**kwargsthat are forwarded to all sub-tasks during execution.
๐ Changed¶
- BREAKING - Removed
BatchItemTaskSignature: Swarm tasks are no longer wrapped in batch item signatures. Tasks run directly within the swarm. - BREAKING - Removed
add_task()from swarm: Useaio_run_in_swarm()instead. - BREAKING - Removed
add_callbacks()fromTaskSignature: Callbacks are now set at creation time only. - All internal tasks are durable: Chain and swarm infrastructure tasks now use
durable_taskfor crash recovery.
๐ ๏ธ Technical Improvements¶
- Task data parameter consolidation: Only
task_idis sent as task metadata instead of a fulltask_datadictionary. This will allow users to filter workflow base on task id and will save data that is sent in tasks.
๐งช Tests¶
- Unit tests for handle decorator: Added comprehensive tests for
handle_task_callbackdecorator. - Unit tests for signature creation: Added tests for
TaskSignatureOptionsandresolve_signature_key.
[0.1.1]¶
๐ Fixed¶
- Native workflow execution: Fixed some bugs that prevented running tasks natively (no mageflow support)
[0.1.0]¶
โจ Added¶
- Signature TTL: Time-To-Live set to 1 day for automatic expiration
๐ Fixed¶
- Idempotent Swarm Tasks: Swarm task execution is now idempotent, preventing duplicate execution on retries or crash recovery
- Tasks track publishing state to avoid re-publishing already-running tasks
fill_running_tasksworkflow handles task distribution atomically- Idempotent Chain Workflows: Chain workflows now support crash recovery with idempotent task transitions
[0.0.4]¶
โจ Added¶
stagger_executiondecorator for deadlock prevention through random task staggeringclose_on_max_taskflag inadd_taskmethod - automatically closes task when maximum number of tasks (from config) is reached (can be disabled by setting flag to False)
๐ Fixed¶
- Support Hatchet retries with signature
- Error callbacks now wait until all retries are completed or stopped before activation
[0.0.3]¶
Fixed a bug for running chain in swarms
[0.0.2]¶
Stability - Limit version for rapyer
[0.0.1]¶
First release