Repository navigation
Documents key normalization and per-key ceiling - #155
Merged
Merged
Conversation
The README and StatifierRouter.Binding's module documentation now name the two hazards of a key program that normalizes nothing: a source that sends the id as a number has every event refused (one key_refused ledger row per event), and a padded id names a second address, a second execution under create: :if_absent. A new parcel-delivery example puts a key program that casts to string and trims on every binding of the join; the moduledoc runs that program as a doctest. The README's Broadway section states the per-key ceiling as a property: one key's events step one at a time, each delivery one transaction of several row writes, so processors raise the rate across keys and never for one key. It names the pressure valves: fold events into one, a live session for a hot key, join upstream. No figure is promised and nothing Binding.key/2 answers changes. Docs only, so no changelog fragment. Refs: sr-91uk, sr-aw0w
johnnyt
force-pushed
the
sr-91uk-key-program-and-per-key-ceiling
branch
from
October 2, 2026 10:29
a863666 to
729b9b4
Compare
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.
Docs only: two README sections and one section of the
StatifierRouter.Bindingmodule documentation. Nothing that any function answers changes.Key programs (sr-91uk)
Binding.key/2accepts only a non-empty string and normalizes nothing. Two hazards follow when a document's sources send one id in different shapes:key_refusedledger row per event;create: :if_absentit opens a second execution, and undercreate: :neverit is dropped as:no_execution.The new README subsection,
### A key program that normalizes, sits under## An example, where a reader first meets the key program, and before the scope resolver. Its new example is a parcel-delivery join with two bindings, and both use the key programtrim(event.parcel_id::string). The existing join example is untouched. The moduledoc gets the same text under## A key is used as it is answered, with a doctest. That doctest shows the raw program refusing a number and keeping the padding, the normalizing program giving"1042771"for both shapes, and an absent id still refused. The README's two bindings were also evaluated by hand against predicator 9.4.2, the version mix.lock resolves: both match and both give"1042771"for1042771and" 1042771 ".The per-key ceiling (sr-aw0w)
The new
### One key's events, one at a timesubsection under## Broadway firststates the ceiling as a property. One key's events step one at a time under the execution's lock, and each delivery that steps it is one transaction of several row writes. So more processors raise the rate across keys and never the rate for one key. It promises no figure. It names the three pressure valves: fold events into one (the host does the folding, because the pipeline has no batchers), a liveStatifier.Sessionfor a hot key, and the join done upstream.Verification
mix qualityis green on the committed tree: 436 of 436 tests passed, Dialyzer clean, Docs and Doc links clean. README.md is a gated path here, so the gate applies.Binding.key/2, one row per check, each restored byte-equal before the next:key/2 refuses a key that is not a string.changelog.d/README.md.Provenance
The file map held: README.md and the
Bindingmoduledoc, nothing else. The doctest lives in the moduledoc, so the existingdoctest Bindingruns it and no test file changed.Refs: sr-91uk, sr-aw0w