Repository navigation
Shares the router key and pins card-route redrives - #226
Merged
Merged
Conversation
The card application form's two routes and the parcel recipe's doorstep route each spelled the router's idempotency key as a string with the same code, line for line. StatifierExamples.RouterKey.join/1 is now the one spelling, and all three routes call it; every stored key is the same string as before. A new test pins that a redriven delivery writes nothing back to the application: values planted on the row after the first hand-off survive the redrive on both routes. The existing redrive test only counted outbox rows. The writer's documentation says the status records that an application was handed on, from the first hand-off, and that the two reference columns say which routes it reached. The guide and the routes' moduledocs say why the routes read the example's one library system rather than a value in their route configuration.
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.
Works the four points of se-wkmu: a test that a redrive writes nothing back, the status word, one spelling of the router key, and where the routes read the library system.
What changes
StatifierExamples.RouterKey.join/1replacesStatifierExamples.FormPost.Sends.key/1and the doorstep route's private copy of the same code. The card application form's patron system and newsletter routes and the parcel recipe's doorstep route all call it. The function body is the one both copies had, so every stored key is the same string as before; the existing route tests that match the stored key strings stay green.routes_test.exsdelivers on both routes, plants values on the application row that no route writes (status, both references,updated_at), redrives both deliveries with the same key, and matches the row unchanged. The existing redrive test counted outbox rows only, so it stayed green when a redrive wrote the reference back.Writer.record_reference/4's doc and the guide's section 5 saysentrecords that the application was handed on, from the first hand-off; a second route's hand-off writessentagain and movesupdated_at, and the two reference columns say which routes it reached. The status values are unchanged, so the host's retention, which keys onsent, is unchanged.:route_adapters, one value for every execution routed through it, while the library system belongs to each application. The guide's section 5 and both routes' moduledocs say so, and point a multi-tenant host at the execution, asSteps.library_system/0already does for the steps.No function answers differently.
Provenance
sentkey, and a per-route library system would be wrong for any host with more than one library system. Decided by the conductor under a standing consent, 2026-10-11.StatifierExamples.RouterKey, rather than one recipe calling into the other's module, so neither recipe depends on the other.Checks
mix qualitygreen on the committed tree after a rebase onto main.Sends.record/5's redrive branch call the writer turned the new redrive test red at the stored row's match; spelling an absent ordinal as the empty string turned theRouterKeytest, its doctest and the doorstep route's existing key test red.