A date check for “next session”
The café gate, Stage A
Working records behind the working note Assuring the Reading (posting 4 December 2026). Study 2, Stage A, of the open protocol.
What this is
In the repair café case, a venue coordinator wrote “your next session” on a Thursday, and the assistant read it on Monday. A reader, S.S., suggested a cheap check: count “next” from when the notice was sent and from when it is read, and stop the edit if the two counts pick different sessions. This page is that check, built as a small deterministic program, and the cases it was tested on.
The check never authorizes an edit. It either stops it, with a reason, or finds nothing to stop.
What it checks
It takes a notice that has already been read into structured fields: when it was sent and read, whether it names a session, a date or “next session”, and any session it rules out. Turning a raw email into those fields is a separate problem (Stage B), not tested here.
- “Next session”: it finds the first session after the send time and the first after the read time, using the calendar as it stands. If they differ, or two sessions tie, it stops the edit. If they agree on a session other than the one being edited, it stops that too.
- A named session or date: it checks the name and date agree with each other and with the calendar, and that they point at the session being edited.
- Sessions ruled out: if the notice keeps the edited session where it is, it stops the edit.
- Unclear calendar entries: a tentative session, or one whose group is unknown, stops the edit only if it could change which session is next.
The full rules, including six changes from the published protocol, are in SPEC.md.
How it was tested
I wrote 36 cases with fresh venues, dates and session IDs, set the answer each should get, and hashed them before any code existed. Each case also carries the answer a careful reviewer would give (Authorize, Clarify or Reject), which is a judgment, not a measurement.
To see whether the cases tested anything, I broke the check one rule at a time. The first pass found two rules nothing tested on its own: matching dates in the venue’s timezone, and ruling out the edited session when both counts agree on it. I added a case for each. After review, one case’s reviewer answer changed from Authorize to Clarify. Both changes are recorded, with reasons, in FREEZE.md.
Results
Layer 1. The check returned the expected code on all 38 of 38 cases, and all 22 broken versions failed at least one case.
Layer 2. What the check returned, against the answer a careful reviewer would give:
| Gate code | Authorize | Clarify | Reject |
|---|---|---|---|
NO_TEMPORAL_CONFLICT_DETECTED |
11 | 3 | 1 |
INTERRUPT_TEMPORAL_DISAGREEMENT |
0 | 4 | 0 |
INTERRUPT_CONTRADICTORY_IDENTIFIER |
0 | 3 | 0 |
INTERRUPT_TARGET_MISMATCH |
0 | 0 | 5 |
INTERRUPT_UNRESOLVED_INPUT |
3 | 6 | 2 |
- True interrupts (20): the check stopped an edit a reviewer would also hold or decline.
- Appropriate clearances (11): it found nothing to stop, and the edit was supported.
- Unnecessary interruptions (3): it stopped a supported edit because the notice said “this Saturday” or “the upcoming session”, or moved two sessions at once. Version 1 doesn’t handle those.
- Known non-temporal remainders (3): it found nothing to stop, but a reviewer would ask first: a one-off session when the standing one may have been meant, conditional wording, and a cancellation the record couldn’t date.
- Missed (1): it let through a notice sent by someone without authority to confirm the move. It checks dates, not who sent the notice.
These are counts from a test bank I designed to cover every rule. They describe the bank, not how often each outcome happens in real use. Because I wrote both the rules and the cases, they show the code does what the specification says, not that the specification is right. An outside check of the cases would be welcome; see Help wanted.
Step through the cases
Each case below shows what the gate was given, what it returned, and what a careful reviewer would do. These are the recorded results of the Python gate; this page replays them and doesn’t run it.
Downloads
Download the specification, cases, code and results (zip). Python 3.9 or later, standard library only, no network. Start with README.md. To rerun:
python3 -I -B run_suite.py
python3 -I -B mutation_check.py
Zip SHA-256: 52573602bb572317869ad5b9b8a1dbf05db08f4d89e79799ce3c82e51f774e9a
3e76cb86edb9f73d01580e82bbd0e5d6626198bfd0f1fe43f909608b685cac58 FREEZE.md
8ab7ea1d00585837933c0cfb35c568bb47dd109886d441fa126ad0477dc04cea MUTATION-CHECK.txt
2d9fda0fbfba6f8ce7630ce50232f9dd8b43c2c53a2bd1df89be672e245cae8a README.md
1cf1ec9656e635539ebbce856975600d8ad9e792c785b8029b3c76a1aceb9dc0 RESULTS.md
81574e55d7b54016685cc836375e912686c1dca21f9d6b790e2b20b54bd8f2d4 SPEC.md
eecf17644988de6d448377779fd80e18f33acb7e6eaccb61e46167e7e7dd8489 fixtures.json
8e512980e3ad20b8525f3c9cd7f276e1b706af979720afc6f92e9e1f28fdf984 gate.py
ba8431ca15ae790be5dd4daf854928981c24fee0715fe9c44c06fbff6022288f make_fixtures.py
23bc7602c9793de0c150c405c33156ea1717e3c4cd7deb905fcf37c798ba2462 mutation_check.py
aa25b8af1248984a4762b75e99b7a5d8123a37a18858dfa3e7bab0e9690b4565 results.json
4275a6989d3ff4c2a97840ca3ee7ec12fc7ae612445094f9a283af86a7858832 run_suite.py