Issue #3615634: Let a node's deadline be computed by a plugin, not only read from a duration or a variable

Makes a node's timeout deadline a plugin. Every timeout now names a deadline provider, and orchestra bundles the two that used to be hardcoded alternatives:

  • relative — a duration (literal or variable-named, falling back to default_timeout) measured from park, instance or node
  • absolute — a date (literal or variable-named) with an optional signed offset

A module ships its own when the deadline belongs to a live subject the run does not own. That is the case no written value serves: a value is only as true as the last thing that wrote it, so such a model had to carry a step on every path reaching the wait, purely to keep a number current.

DeadlineCalculator collapses to resolving the provider and asking it; the duration/anchor/offset arithmetic moves into the two built-ins. Because there is now one key, the old deadline-beats-until-beats-duration precedence disappears.

The interface has a second method, rearms(), because only the provider knows whether asking again means anything: a window measured from each park recurs, an instance- or node-anchored budget is spent, and a fixed date asked again would answer the same past moment and fire on every sweep for ever. That replaces TimeoutSweeper matching on anchor strings, and re-arming now asks for a fresh deadline rather than repeating the old one — so a subject that moved its deadline is waited on again instead of being left parked with none.

DeadlineStateInterface is the seam for a provider that records something per node (the relative provider's first-arrival anchor). The executor forgets on the way out without knowing which provider stores what, replacing its direct read of timeout.anchor.

Config shape change. duration, until, until_offset and anchor are gone from the node's timeout; a provider id lives in deadline and its settings in deadline_settings (its own key, since settings already belongs to the action). Pre-1.0, so the old paths are deleted rather than kept alongside. Every shipped config and test in this repo is converted; consumers with their own workflows must convert too (yoyaku's are being done alongside).

Tests: ComputedDeadlineTest covers a token parking on the computed moment, a provider answering nothing, a deadline moved after the park being picked up on re-arm, and a non-re-arming deadline not being asked again — with a test provider reading its deadline from state so the test can move it. Docs and the French translation updated.

Merge request reports

Loading
Loading