Repository navigation
Pins a late event before and after the reap - #153
Merged
Merged
Conversation
Adds tests and a dated Note on ADR-0002 for a late event whose execution has finished. Before the reap deletes its address row the event is dropped as finished; after it, an if_absent binding opens a second execution for the key, a never binding drops the event as no_execution, and an always_new binding opens a new execution either way. The Note and the README reaper paragraph name the knob: the longest dedupe horizon of any enabled binding naming the document. Nothing under lib/ changes. Refs: sr-n0y4
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.
Pins what a late event meets once its execution has finished, before and after
StatifierRouter.Addresses.reap/3deletes the execution's address row, under eachcreatemode, and records the trade as the host's. Nothing underlib/changes.Bead: sr-n0y4.
What changes
StatifierRouter.LatePartnerTest(test/statifier_router/late_partner_test.exs), over the parcel chart and the parcel scan bindings already in the test support::if_absent: a latedeliveredscan isdropped: finishedbefore the reap, and after the reap it opens a second execution for the parcel;:if_absent: the longest dedupe horizon of any enabled binding naming the document is what keeps the row, and a disabled binding's longer horizon does not count;:never: the late scan isdropped: finishedbefore the reap anddropped: no_executionafter it, creating nothing;:never: its cost, adeliveredscan that arrives before itsloadedscan is lost;:always_new: every scan opens its own execution before and after a reap, which finds no row.docs/adr/0002-addressing.md: the knob is the dedupe horizon, a document no enabled binding names (one reached only through the execution target) has a horizon of zero, a per-mode table of what a late event meets, andcreate: :neveron the partner binding as the first-line answer with its cost. A refusing create mode and a tombstone kept past the address row are left for a later record.Addresses.reap/2paragraph, naming the same knob and trade.No changelog fragment: tests and docs only, which
changelog.d/README.mdexcludes.Provenance
The trade documented as the host's, with no new create mode and no tombstone in this change: ruled by the operator, 2026-10-01.
Direction check of the Note
Every claim was read against main at the branch's base. The horizon is the longest
horizon_msof the enabled bindings naming the document, read per call (the privatehorizons/1ofStatifierRouter.Addresses, reached throughreap/3), and counted fromterminal_seen_at(ADR-0002, sections 5 and 6; the privatedue?/3). A dedupe row'sexpires_atis the delivery's time plus the samehorizon_ms(StatifierRouter.Dedupe.claim/4). The per-mode table matches ADR-0003, section 4 and the privateby_mode/4andabsent/4ofStatifierRouter.Delivery; the "after" column ofif_absentis the created path's outcome,created_and_deliveredordropped: unmatched_event(ADR-0004), and the test shows the second for a scan the chart's first state does not take.always_newwriting no row is ADR-0002, section 7. The Note opens with the house sentence, cites by anchor, and the diff removes zero lines underdocs/adr/.Verification
mix qualitygreen on the committed tree: the isolated stage, the suite, Dialyzer, Docs and Doc links.if_absentafter-reap cell names both outcomes, the Note saysterminal_seen_atis never earlier than the finish, the knob test orders the longest horizon first and carries a disabled binding, and the Note's tests bullet says exactly what is pinned.lib/lines it covers and went red on an assertion; the mutation is noted above each test.