Summary
Upgrade rapyer to >=1.3.4 and use its new action-scoped refresh_ttl + Reference[T] / CascadeTTL features so that any write to a container signature (swarm / chain) refreshes its TTL and cascades that refresh to all of its sub-tasks. This keeps a container and its whole subtree alive together while the container is being actively updated.
No explicit update_ttl method and no client method — the behavior is purely declarative model config.
Approach
- Upgrade rapyer to
>=1.3.4,<1.4.0 in all libs (third-magic, mageflow-mcp, mage-voyance) and re-lock every uv workspace.
- Foreign-key the child edges so cascade has something to walk:
- swarm/chain
tasks → Reference[TaskSignature]
- swarm
publishing_state_id → Reference[PublishState] (retires the existing # TODO ... once we use foreign key)
- Configure the containers with
refresh_ttl = ActionGroup.<all writes> + cascade_ttl = CascadeTTL() on their Meta.
- Refactor the spots that read
self.tasks as raw keys to go through task_ids / target_key.
- Breaking-change review for rapyer 1.3.0→1.3.4 (apipeline no longer auto-refreshes TTL,
afind_one→None, afind key/expr mixing, mark_actions MarkVersion) with a full-suite regression pass.
Cascade semantics
rapyer's cascade re-arms each reached child to its own Meta.ttl (keep-the-subtree-alive-together), not "copy one number onto every child". With mageflow's uniform active TTL this is the desired behavior.
Tasks
Verify at implementation
- Confirm action-scoped
refresh_ttl cascades to Reference children on ordinary writes/atomic ops (not only asave/explicit aset_ttl(cascade=True)).
- Confirm
Reference works inside a RedisList (swarm does atomic ops on tasks).
- Confirm cascade works under
fakeredis[lua].
Summary
Upgrade rapyer to
>=1.3.4and use its new action-scopedrefresh_ttl+Reference[T]/CascadeTTLfeatures so that any write to a container signature (swarm / chain) refreshes its TTL and cascades that refresh to all of its sub-tasks. This keeps a container and its whole subtree alive together while the container is being actively updated.No explicit
update_ttlmethod and no client method — the behavior is purely declarative model config.Approach
>=1.3.4,<1.4.0in all libs (third-magic,mageflow-mcp,mage-voyance) and re-lock every uv workspace.tasks→Reference[TaskSignature]publishing_state_id→Reference[PublishState](retires the existing# TODO ... once we use foreign key)refresh_ttl = ActionGroup.<all writes>+cascade_ttl = CascadeTTL()on theirMeta.self.tasksas raw keys to go throughtask_ids/target_key.afind_one→None,afindkey/expr mixing,mark_actionsMarkVersion) with a full-suite regression pass.Cascade semantics
rapyer's cascade re-arms each reached child to its own
Meta.ttl(keep-the-subtree-alive-together), not "copy one number onto every child". With mageflow's uniform active TTL this is the desired behavior.Tasks
tasksand swarmpublishing_state_idtoReference[T]refresh_ttl(write ActionGroup) +cascade_ttlon swarm/chainself.taskskey consumers totask_idsVerify at implementation
refresh_ttlcascades toReferencechildren on ordinary writes/atomic ops (not onlyasave/explicitaset_ttl(cascade=True)).Referenceworks inside aRedisList(swarm does atomic ops ontasks).fakeredis[lua].