Says what the create and step hooks reach - #135
Merged
Merged
Conversation
A host that wraps every step in a tenancy context of its own asked whether :on_create and :on_step are enough. They are for the create and the step, and not for the rest of the delivery. "Wrapping the create and step calls" now says so: a context set in the hook's body covers the create or the step and what they write through the configuration's repo; the delivery's transaction and savepoint are already open before either hook is called (Delivery.deliver/4); and the dedupe claim, the address row's read and insert with the id minter, an existing execution's status read, the resolver calls, the on-complete route, the terminal_seen_at update and the ledger row run outside it. route/3 also asks the bindings resolver and writes a key_refused row with no delivery transaction open. It names the two seams that reach further (the :delivery option, and a direct caller's own transaction the delivery nests into) and where neither reaches: the Broadway pipeline, the key_refused row, and a send to an execution target (Delivery.deliver_event/4). The missing whole-delivery seam is stated as an open gap, left for a later decision. Documentation text only; no function changes. README.md is a gated path, so the full gate (mix quality) ran green on this exact tree. No changelog fragment: changelog.d/README.md excludes documentation. Refs: sr-2cwo
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.
Refs: sr-2cwo
What
A host that wraps every step in a tenancy context of its own asked whether the
:on_createand:on_stephooks are enough. The finding, written on the bead before this change: they cover the create and the step, and not the rest of the delivery. README.md's "Wrapping the create and step calls" now says so, in three paragraphs after the option table:StatifierRouter.Delivery.deliver/4), and what runs outside the hook's body: the dedupe claim (StatifierRouter.Dedupe.claim/4), the address row's read and insert with the:execution_idminter, an existing execution's status read (StatifierPersistence.Storage.fetch_execution/2), the:resolverand:chart_resolvercalls, the:on_completeroute, theterminal_seen_atupdate and the ledger row; plus the bindings resolver call and thekey_refusedrow thatStatifierRouter.route/3makes with no delivery transaction open;:deliveryoption; a direct caller's own transaction aroundroute/3orStatifierRouter.Webhook.handle/3, which the delivery nests into) and where neither reaches:StatifierRouter.Broadway, thekey_refusedrow, and a send to an execution target (StatifierRouter.Delivery.deliver_event/4);Documentation text only; no function changes. No changelog fragment:
changelog.d/README.mdexcludes documentation.Gate
README.md is a gated path, so the full
mix qualityran on this exact tree (the staged tree was byte-identical to the tree the gate ran green on; the commit is a bare commit citing this run). Its output, quoted whole from the stage list:Review
In-turn review (documentation, gate tier). I re-read the diff against the bead and its notes and checked each claim against the code on main by anchor: the transaction opens in
settled/5and the savepoint inguarded/5beforeclaimed/4callsDedupe.claim/4; the hooks are called only frompersistence_create/4andpersistence_step/5; the address row is read bylookup/4and inserted byinsert_or_existing/4, which callsmint_execution_id/4;existing/5reads the status throughStorage.fetch_execution/2;resolve/3andchart/2call the two resolvers;complete/3delivers to the:on_completeroute;stamp_terminal_seen/3updatesterminal_seen_at;record/6writes the ledger row, all inStatifierRouter.Delivery.StatifierRouter.route/3callsConfig.bindings_for/2andkey_refused/5writes its row outside any delivery transaction; the default delivery module is called asconfig.delivery.deliver/4;settled/5's comment and code nest into a caller's transaction;StatifierRouter.Broadway.handle_message/3callsroute/3andpartition/3calls the bindings resolver;StatifierRouter.SendHandlerdelivers to an execution target throughDelivery.deliver_event/4, never through the:deliverymodule.Provenance
The probe was run on the bead before the docs change; the gap it found is tracked as a separate item for a later decision on one whole-delivery seam, so the README states it in words.