Repository navigation
Threads function_providers through the durable path - #272
Merged
Merged
Conversation
statifier 2.15 lets a host register guard functions for cond and expr,
but a loaded position carries none, so a host had to re-stamp the list
itself before every resumed step. The step now does it.
Executions.step/5 takes function_providers: and re-stamps it beside
routes, invoke_types and send_types; the tripwire matches functions
nil. create/4 takes it inside initialize:. Driver.new/3 takes it as a
driver-level default each call may override, and a durable subchart
child the driver creates does not inherit it. A list that does not
resolve is refused at the entry, before any lock, load or write, with
{:error, {:function_providers, reason}}.
The statifier requirement moves to ~> 2.15 (locked at 2.15.0). ADR-0004
gains an Amendment at proposed; the README, the upgrading page and a
changelog fragment say what a host sees.
Refs: sp-aa9z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bead: sp-aa9z
What changes
statifier 2.15.0 lets a host register guard functions a chart's
condandexprmay call (:function_providers, st-ADR-0078). A decoded position carriesfunctions: nil, so a host resuming an execution through this package had to callStatifier.MachineState.put_function_providers/2itself before each step. This PR makes the package stamp the list:Executions.step/5takesfunction_providers:per call and re-stamps it instep_loaded/8besideroutes,invoke_typesandsend_types. The st-ADR-0064 tripwire now matchesfunctions: nilas well.Executions.create/4takes it insideinitialize:, the same way it takes the other snapshots.Driver.new/3takes it as a driver-level default. The driver carries it intoinitialize:on a create and onto every step, and a call's ownfunction_providers:outranks it, an explicitnilincluded.Statifier.Evaluator.Functions.from_providers/1answers{:error, {:function_providers, reason}}before any lock, load or write. This happens onstep/5andcreate/4, and on the driver'screate/3,send_event/4,done_invocation/5,failed_invocation/5andanswer_parent/3.t:Executions.error/0gains the arm, andt:Executions.function_providers_reason/0names the reasons.statifierrequirement moves from~> 2.9to~> 2.15, locked at 2.15.0 (predicator moves from 9.4.2 to 9.4.4 in the lock as statifier's own dependency).t:step_opt/0,t:create_opt/0andt:error/0typedocs, thestep/5andcreate/4docs, the Driver's option list, one README paragraph, and the upgrading page's floor sentence. That sentence now says every release through 0.24.2 keeps~> 2.9and the next release moves the floor to~> 2.15. Before this edit it said "every later release keeps it there", which this PR makes false.changelog.d/sp-aa9z.mdcarries the Added and Changed lines.functions; the Amendment also records the entry refusal, where the option reaches, and why a child does not inherit it. It removes zero lines.Without
function_providers:, nothing changes. The step stampsnil, which is what the decoded position already carries.Provenance
~> 2.15was decided by the conductor under a standing consent, 2026-10-12.nilon the child's driver struct. Instead,create_child/6passesfunction_providers: nilon the child's create options. That option outranks the driver's list on the child's create and on every step of its drive, while the struct keeps the list. The reason: the same struct answers the parent once the child is terminal, and the parent's step has to take the host's list. The record says so, and a test pins each half.Executionsentry. Without the driver-side check,answer_parent/3would write the child's answer to the child's record before the parent's step refused.executions_opt_types_test.exs) gains:function_providersin the step set and in the set a create ignores.Verification
mix qualitygate is green on this commit: format, compile with warnings as errors, credo, docs, doc links, unused deps, 1,445 tests with 96.0% coverage, and dialyzer. The doctor, gettext and sobelow stages are not installed in this project. The suite ran against a local Postgres server on 5432.test/statifier_persistence/function_providers_test.exscovers each clause above. Every new test carries a sabotage note for a mutation that turned it red on an assertion. The extended tripwire test turns red whenStatifier.Positionkeepsfunctionsthrough a round trip.Record direction check
Each claim in the Amendment was read against this branch and statifier v2.15.0:
Statifier.Positiondropsfunctionson encode and decode, and statifier's own refusal is spelled{:error, {:function_providers, reason}}; both are st-ADR-0078 decisions 4 and 5.MachineState.new/2raises on a bad list.Statifier.Invoke.Source.resolve/2compiles a child with no:function_providers.git diff origin/main -- docs/adr/shows zero removed lines.Tier: contract (a new public option, a new error arm, and a record). The cold review is the conductor's.