Technical · demo review service
What runs behind the walkthrough.
One small Python service with no third-party dependencies. It stores what the agent submits, returns one record per reference, and refuses anything that is not a preliminary-pass late-payment request.
Service endpoints
- GET
/healthzliveness - GET
/demo/statsqueue size, aggregates only - POST
/demo/screenthe verdict and the exact summary text, computed here - POST
/demo/waiver-requestsidempotent create - GET
/demo/waiver-requests/<ref>one request as JSON - GET
/demo/track/<ref>human-readable status - GET
/demo/reviewthe reviewer side: take a case, the customer's page changes - GET
/demo/technicalthis page
Four rules the service enforces itself
- POLICY
amount, waiver history, past duere-checked here; a declared screening result is not evidence - KEY
same key, same factsthe original record comes back, nothing is created - CASE
same facts, a new keythe original reference is returned, so one fee stays one record - LOOKUP
one match, or no answera partial reference is resolved only when exactly one recent case fits; two matches and the page names nobody
Where the summary comes from
/demo/screen returns a screening_result, a
may_submit flag and a finished summary_block. The assistant is
told to print that block and nothing else — copying a string the server wrote is
checkable, while rewriting a template from memory is not. The block always carries the
source line, all three rule outcomes, the “not independently verified” line and
the “confirming is not authorisation” line, and the service's own tests assert
all four, so a block missing one cannot ship.
What stops a duplicate
An idempotency key on its own only stops one caller from retrying. The service therefore
derives a key from the case facts and the session, so the same amount written as
29 or as 29.00 reaches one key instead of creating two records.
When the details change inside one key, the stored record wins and the fields that differ
are named in the response; nothing is overwritten.
When a partial reference still resolves
A reference is a prefix and two groups of four characters, and people read one group off a receipt. Typed back on its own, that is the part the customer actually has — not a typo. Edit distance is the wrong tool for it: one digit short puts the fragment one edit away from every other reference filed in the window, so a typo search can never answer. The status page therefore looks over the last 30 days twice. Within three keystrokes of one stored reference is treated as a typo and the page says so; four or more characters matching the end of exactly one recent reference is treated as a fragment and the page says that instead. Either way the full reference is printed, so the customer can check it rather than trust it.
Uniqueness is the whole gate. Two recent cases ending in the same four characters means
the answer is no — a page that picked one would open somebody else's request. Fewer
than four characters is not evidence either, whatever it matches. And this pass exists
only on the HTML page a person reads: /demo/waiver-requests/<ref>
still wants the exact reference and returns 404 for a guess, because a guess is
acceptable as a suggestion to a human and not as a data source.
What a reviewer row carries
Each row carries the fee type, the amount, the day it was charged and the screening result this service computed, alongside the same timestamp shape the customer's own page prints. Everything in that row was already on the customer's page — the reviewer sees the filed facts, not account data — and nothing in the row asks the reviewer to approve anything, because approving is outside what this demo is allowed to do.