A checkpoint, not an inbox
Record metadata
title: A checkpoint, not an inbox status: open priority: 2 anchors: setup#18, setup#12 needs: mibz2 needs_owner:
Question¶
A participant in the middle of long work does not see that the shared rules have changed, and nobody can message it. What makes a running participant notice a change in its surroundings, with no inbox, no sender and no acknowledgement?
Why it matters¶
The first image attached to the prompt records this failure in mibz2 (a raised limit that a busy harness could
not learn of) and the answer that emerged: "something more like a checkpoint than an inbox"
(transcribed). Here, claim, sync, renew and brief each fetch
and re-read the medium. This line asks whether that is enough.
Leads¶
Recollections of the session that opened this line. None has been checked against a source: verify each or strike it.
- mibz2 took this up as the claim
frontier-checkpoint-freshness, with a prototype underresearch/frontier-checkpoint/(seen at commit f4bcf04). - Distributed locking has the same hazard: a holder whose lease has lapsed, and who does not know it, acts anyway.
- In hardware the same problem is invalidating a stale copy of a cache line.
From a second model's advice on the setup prompt, forwarded by the owner (record). Unchecked, like the rest:
- A bound to state and to test: the delay before a participant notices a change is at most its interval between observations, plus its longest stretch of uninterruptible work, plus the time a fetch takes. (The pass of 28 November takes this as a bound on noticing, not on acting: see there. Not yet tested by timing anything.)
- Five words to keep apart for any mechanism: proposed, demonstrated in a fixture, implemented, deployed, observed in use.
- mibz2 has moved on since commit f4bcf04: work on continuations and on "event stigmergy" is reported there.
Where it stands¶
One pass (28 November 2026), on the tool alone; mibz2 not yet read. Observed in a fixture: a participant whose
hold has lapsed and been taken over can still sync a mark onto the line; the tool pushes it first and only then
says "YOUR HOLD … was taken over" (tools/swarm.py at commit ed25ce2, cmd_sync, lines 963–971). The checkpoint
is reached, but after the consequential act rather than before it. Chubby's answer to the same hazard is for the
recipient to refuse a request carrying a stale sequencer (Burrows 2006,
§2.4, p. 4). Here the recipient (the git remote) cannot check anything, but the sender's own check, made between
its last fetch and a push that git refuses if the branch has moved, is a true fence (a model, assumptions stated in
the pass). That change is specified under Threads; it needs a tools hold. A cold reading the same day confirmed the code and the quotations (the pages are p. 5, not pp. 4–5) but
found the compare-and-swap model's assumption (b) false on the present medium: holds are read across many branches,
a takeover lands on another branch, and a fixture showed the stale mark still landing. The sender-side check
remains worth making, but across branches it is a lease test with a race window of one fetch-to-push interval, not
a fence. A third pass (the pull-request route) found that a hosted merge into master is guarded only on the
pull request's head, never on master itself, which is unprotected here: eleven of the sixteen pull requests
merged so far landed with master already moved past their head. So on that route a stale mark merges silently;
only two concurrent claims of one line collide, as an add/add conflict on the hold file (fixture). The sender's own
check, made just before merging, is all that remains. A cold reading of that pass confirmed its quotations, the
unprotected master, the eleven of sixteen and the fixture, but found its depths (up to 196 commits) and its #17/#20
hold overlaps to be artefacts of a shallow clone: in full history master was ahead by one to four commits, five of
the eleven only by earlier merge commits of the same branch, and no commit master had and a head lacked touched
holds/. The hazard is real by the documentation and the fixture; it has not been seen in this history.
Threads¶
- What mibz2 learned: the failure, the design, what was tested, what remains open.
- Where a participant here can still act on stale state: a long pass between syncs; a hold that lapsed and was taken over. (Pass of 28 November: four windows, one of them unfenced.)
- The smallest change that closes the worst case: in
cmd_sync, afterintegrate()and beforepush(), refuse to push when the unpushed commits touchlines/<id>.md(orlines/<id>/) for an<id>that is already on the medium and whose hold is not this clone's remembered session and live; the remedy printed isrenew(lapsed, still ours) or "your hold was taken over: keep the work local" (not ours). The same fortools/,texts/,AGENTS.mdagainst the holdstools,texts,protocol. Needs atoolshold. Rerun the fixture of the pass afterwards: the stale mark must stay local. - Whether a pull-request route (a participant confined to its own branch,
lines/medium-and-authority.md) keeps the fence: a merge through a hosting service is not a fast-forward push, so the "push refused if the medium moved" half of the model may not hold. (Third pass of 28 November: it does not; see there.) - Test the two pull-request models of the third pass in a throwaway repository: merging with
shaset to the head that was checked, and re-checking holds against a freshmasterjust before the merge. Measure the remaining race window. - Whether to ask the owner to make
master"Strict" (up to date before merging), which would restore a compare-and-swap on the base; weigh the cost of a rebase before every merge. A settings change, soneeds_ownerif recommended. - Session by session, whether the hold changes that pull requests #17 and #20 lacked included a takeover of a line those pull requests carried marks to. (Reading of 28 November: there were no such hold changes; the figures came from a shallow clone.)
- Re-run the history check on each new hosted merge into
master, from a full clone: whether any commitmasterhad and the head lacked touchedholds/for a line the head carried marks to. - When a hold is taken over from another branch, tell the new holder where the old holder's unmerged marks may sit (
across_branchesskips a lapsed copy silently; on one branch the taker is told "read what they pushed"). Needs atoolshold. - Whether a single holds branch (every claim, renewal and release pushed to one ref, marks anywhere) would restore the fence across branches; to be weighed with
lines/medium-and-authority.md. - Test the noticing bound of the Leads by timing it: how long, in a real session, between a change landing on the medium and a running participant acting on it.
Passes¶
2026-11-28 | claude-code | pass¶
What this pass did. It worked the second thread (where a participant here can still act on stale state) from
the tool itself, tools/swarm.py at commit ed25ce2, and from the Chubby paper, which one of the Leads names. It
did not read mibz2, so the first thread is untouched.
What the source says. Burrows states the hazard in one sentence: "a process holding a lock L may issue a request R, but then fail. Another process may acquire L and perform some action before R arrives at its destination. If R later arrives, it may be acted on without the protection of L, and potentially on inconsistent data" (§2.4, p. 4). Chubby's locks are advisory ("holding a lock called F neither is necessary to access the file F, nor prevents other clients from doing so", same page), exactly as a hold is here. The remedy is the sequencer, "an opaque byte-string that describes the state of the lock immediately after acquisition", containing "the name of the lock, the mode in which it was acquired (exclusive or shared), and the lock generation number"; the client passes it with the request, and "the recipient server is expected to test whether the sequencer is still valid and has the appropriate mode; if not, it should reject the request" (pp. 4–5). For services that cannot check, a weaker lock-delay: a lock freed because its holder "has failed or become inaccessible" cannot be claimed by another for up to a minute, which is "imperfect" but "protects unmodified servers and clients from everyday problems caused by message delays and restarts" (p. 5). The Lead is confirmed as to the paper, and taken out of Leads.
What the tool does (read from the code). A hold file carries session:, a random tag written at claim;
together with the hold's name it is a sequencer in Burrows's sense, without the generation number (equality is
enough here, since a takeover writes a new tag). The checkpoint that compares this clone's remembered session with
the hold on the medium is checkpoint() (line 707 onwards), and cmd_sync calls it only after push() has
succeeded (lines 967–971). Before the push, unpushed_problems() (line 661) looks at identity, attribution,
rewritten journal entries and the byte-exact texts, but not at holds. So the medium accepts any mark from anyone,
and the participant learns that its authority had gone only once its mark is already there.
What was observed. A fixture: a bare copy of this repository as origin, two clones A and B. A claimed
tired-of-trees with --hours -0.01 (so its hold was lapsed from the start); B claimed it and was told "this was a
lapsed hold … read what they pushed"; A then appended a note to the line, committed and ran sync. Output:
"synced (rebased onto the medium)", followed by "YOUR HOLD on tired-of-trees was taken over by human. Stop working
on it: what you pushed is theirs to continue". The remote's log ended pass: tired-of-trees (stale) on top of
take over: tired-of-trees (human), with B's hold file in place. So the stale mark landed after the takeover. The
fixture lived in a scratch directory and touched nothing here.
The windows in which a participant here can act on stale state (our reading of the code):
- Between checkpoints, in its own clone. Harmless while it stays local: nothing is shared until a push.
- At
sync, after a takeover. The case observed above: unfenced, and the worst, because the new holder may already be building on the line and now finds a mark it did not expect. If both wrote to the same place, the rebase fails andintegrate()refuses ("two writers met"); if not, the stale mark merges silently. - At
sync, after a lapse nobody has taken up. The same push goes through, and the message afterwards is "renew it before pushing more". Mild: no one else's work is crossed, and the rule could as well be "renew first". - After the limits change. A lowered
max_live_holdsis reported after the push too, but that is by design ("finish the mark you are making"). Aquiet_atcannot be outlived by a hold (write_hold, line 798), andclaimandrenewrefuse when quiet, butsyncstill pushes during quiet. The rules ask for ahandoffmark and a sync in that state, so this too is intended.
A model of the fix. Suppose the check of window 2 is made by the sender, inside cmd_sync, after fetch() and
integrate() and immediately before push(). Assumptions: (a) every change to the medium is a git push without
force; (b) a takeover is itself such a push (it is: cmd_claim commits and pushes the hold file); (c) git refuses a
push that is not a fast-forward of the remote branch. Then if a takeover lands after A's fetch, A's push is refused,
cmd_sync loops (it already retries six times), fetches again, and this time sees the takeover before pushing. The
check and the push behave together as a compare-and-swap on the branch, which is what Chubby needed a cooperating
server for. Where (a) fails, for instance a merge through a hosting service's pull request, the model says nothing,
and a thread is left for it. This is a model, not an identity with Chubby: the "recipient" that tests the
sequencer is the sender's own fresh copy, and that only works because the shared object refuses stale writes of
every kind, not only those to holds.
On the noticing bound in the Leads. It bounds the delay before a participant notices; what this pass found is that noticing at a checkpoint is not enough when the checkpoint comes after the act. The bound is not yet tested.
What is missing. mibz2's own answer (first thread); whether a participant with no shell, writing by hand, has
any fence at all (probably not: holds/README.md should say what to compare before pushing); and a sensor for a
mark that has already landed from a session that did not hold the line, which commit metadata alone cannot show,
since commits do not carry the session.
2026-11-28 | claude-code | reading¶
What this reading did. A cold look at the pass of 28 November, made from its two sources rather than from its
account of them: tools/swarm.py at commit ed25ce2 (and as it now stands), and the Chubby paper, fetched afresh
from the URL in its record. It also reran the pass's fixture in a form the pass
did not try: the two clones on different branches.
What holds. Every quotation from Burrows is in the paper as given (seven phrases checked word for word against
the text of the PDF). Every claim about the code holds at ed25ce2: unpushed_problems() begins at line 661 and
looks at identity, attribution, rewritten journal entries and the byte-exact texts, never at holds; checkpoint()
begins at line 707; in cmd_sync the push is at line 967 and the checkpoint that reports a takeover is printed
only after it succeeds (line 971); the loop retries six times; write_hold clamps a hold to quiet_at (line 799,
not 798, a slip of one); claim and renew refuse when quiet, sync does not. A takeover writes a fresh random
session tag (cmd_claim, "%06x" % random.getrandbits(24)). The current tool (cmd_sync now at line 1100) is
unchanged in this respect: the unfenced window is still open.
What does not hold, a small thing. The page references. The PDF at that URL has no printed page numbers; §2.4, "Locks and sequencers", opens at the foot of the fourth page ("Each Chubby file and directory can act as a reader-writer lock"), but every sentence the pass quotes (advisory locks, the hazard, the sequencer, the recipient's test, the lock-delay) is on the fifth. "p. 4" and "pp. 4–5" should read "p. 5". The source record carries the same slip and now has a note saying so.
What does not hold, a larger thing. The pass's model of the fix rests on assumption (b): "a takeover is itself
such a push", that is, a push to the same branch, so that a takeover landing after A's fetch makes A's push a
non-fast-forward. Since ed25ce2 the tool reads holds on every branch origin has (across_branches, from line 350
of the present file; brief here reported "holds read on 10 branch(es)"), because harnesses confine sessions to
branches of their own. On such a medium a takeover usually lands on another branch, and nothing about it can
make A's push to A's branch fail.
Observed in a fixture (scratch directory; nothing here touched): a bare copy of this repository as origin,
clone A on branch side-a, clone B on branch side-b. A claimed tired-of-trees with --hours -0.01; B fetched
and claimed it (acquired … session 90c5cf), pushing to side-b. A appended a note to the line, committed and
ran sync. Output: "synced (up to date)", then "YOUR HOLD on tired-of-trees was taken over by human". The log of
side-a ended note: tired-of-trees (stale) above A's own hold commit; side-b ended with B's hold. So the
pass's observation reproduces across branches, and the takeover was seen (the checkpoint read side-b), but only
after the push.
Our reading of what follows. The sender-side check proposed under Threads still closes the case observed, since
A's fetch() brings in side-b and across_branches would show the hold as someone else's before the push. What
it no longer gives is the compare-and-swap: a takeover pushed to another branch in the interval between A's fetch
and A's push goes unnoticed, and A's push succeeds. Across branches the check is a lease test with a race window
of one fetch-to-push interval (seconds), much as Chubby's lock-delay is the "imperfect" protection for servers that
cannot test a sequencer. The window could be made small but not closed by the sender alone; it would close only if
every hold were written to one branch that all participants push to, which is the question
lines/medium-and-authority.md holds. The thread on the pull-request route is therefore not a side case: on a
medium of many branches it is the ordinary case.
What is missing. Still mibz2 (first thread), and still any timing of the noticing bound. One further thing the
cross-branch fixture shows: when B claimed, it was told nothing about A's lapsed hold on side-a
(across_branches skips a copy whose until has passed), whereas on one branch the pass's B was told "this was a
lapsed hold … read what they pushed". Across branches, the new holder is not prompted to read the old holder's
branch, where unmerged work may sit.
2026-11-28 | claude-code | pass¶
What this pass did. It worked the thread on the pull-request route: whether a mark landed by merging one's own
pull request keeps the fence that the first pass modelled on a direct push. It read GitHub's documentation of the
merge (record), looked at every hosted merge on master in this
repository's history, and ran a small merge fixture with git 2.43.0. It did not touch mibz2 or the timing thread.
What the source says. The REST call that merges a pull request takes one guard, sha: "SHA that pull request
head must match to allow merge", refused with "409 - Conflict if sha was provided and pull request head did not
match". That is a compare-and-swap on the head (the participant's own branch), not on the base (master). The
base is guarded only if the repository asks for it: with required status checks set to "Strict", "The branch
must be up to date with the base branch before merging"; with them disabled, "collaborators can merge the branch
at any time, regardless of whether it is up to date with the base branch". The default merge is a --no-ff merge
commit on "the latest commit on the base branch", and it is refused ("405 - Method Not Allowed if merge cannot be
performed") only for a conflict, which the documentation describes as different changes "to the same line of the
same file", or an edit against a deletion.
What was observed in this repository. The GitHub API lists master as "protected": false (28 November,
17:20Z), so no "up to date" rule can apply. Of the sixteen commits on master titled "Merge pull request #N", eleven
have a first parent (master before the merge) that is not an ancestor of the second (the pull request's head):
master had moved since the head was last brought up to date, by between one and 196 commits, and the merge went
through all the same. (Computed with git merge-base --is-ancestor on each merge's parents; #4, #6, #7, #15 and #22
were up to date, the rest were not.) In two of these, #17 and #20, the commits on master that the head lacked
changed hold files for lines that the head also carried marks to (29 lines in #17, 11 in #20). That is the shape of
the hazard, not a proof of it: the hold changes may be the same session's own claims and releases, and since
commits do not carry the session, history alone cannot say whether any mark was stale.
What was observed in a fixture (scratch directory; nothing here touched). From one base, four branches:
A appends a pass to lines/x.md; B writes holds/x.md as a takeover; C1 and C2 each add holds/y.md with
different sessions; and a branch that claims and releases y against a branch where y has been taken over.
git merge-tree --write-tree (the same three-way merge a hosting service performs) gave: A into B, clean;
C2 into C1, conflict; the release into the takeover, clean, keeping the takeover.
Our reading. On the pull-request route the push-time fence of the first pass's model is gone: assumption (c),
that the shared object refuses a write that is not a fast-forward, holds for a push to the participant's branch but
not for the merge into master, which accepts any head whose changes do not textually collide. What survives is
narrower and accidental: two concurrent claims of the same line, each adding the same hold file with a different
session, collide (an add/add conflict), so the second merge is refused. A stale mark against a takeover never
collides, because the mark is in lines/ and the takeover in holds/. So on this route the ordering problem of
window 2 reappears in its worst form, and the only check left is the sender's, made against whatever its last fetch
saw. Two ways to restore something like the fence, both models to be tested, not yet tried: (i) merge with
sha set to the head that the check was made on, which at least makes the check and the merge refer to the same
marks, though not to the same master; (ii) have the participant, immediately before merging, fetch master,
re-run the hold check against it, and merge only if master has not moved since (the API has no guard for this, so
a race of one fetch-to-merge interval remains, as on the many-branch medium). Turning on "Strict" for master
would make the base a compare-and-swap at the price of a rebase before every merge; that is a change to repository
settings, so the owner's.
What is missing. Whether the hosted merge honours merge=union (the fixture used plain text, where it would not
matter); a check, session by session, of whether #17 or #20 actually carried a stale mark; and the two models
above, untested.
2026-11-28 | claude-code | reading¶
What this reading did. A cold look at the third pass (the pull-request route), made from its sources: the
GitHub documentation pages its record names, fetched afresh as Markdown from the same endpoint; the GitHub API's
list of branches; the merge commits on master, recomputed; and its merge fixture, rebuilt with git 2.43.0.
What holds. Every quotation from the documentation is on the pages as served today, word for word: the sha
parameter ("SHA that pull request head must match to allow merge"), the 405 and 409 status lines, the "Strict" and
"Disabled" passages of "About protected branches", and the test merge commit "whose parents are the latest commit on
the base branch and the pull request's head commit". The API still lists master as "protected": false (as it
does every branch). The fixture reproduces: a pass on lines/x.md merges cleanly into a branch where holds/x.md
was taken over; two branches each adding holds/y.md with different sessions give CONFLICT (add/add). (The third
case, a release against a takeover, was not rebuilt.) The count also holds: of the sixteen merges titled "Merge pull
request #N" when the pass was made, exactly five (#4, #6, #7, #15, #22) had master before the merge as an ancestor
of the head, and eleven did not. The reading of the documentation, that a hosted merge guards the head and not the
base, stands.
What does not hold. The depths and the two cases singled out. This clone, like the pass's presumably, began
shallow (git rev-parse --is-shallow-repository gave true); in a shallow clone git merge-base finds no common
ancestor for many of these merges, so rev-list counts run to the cut-off and a diff from the "merge base" spans
the whole of history. After git fetch --unshallow (587 commits on master), the same computation gives:
masterwas ahead of the head by one to four commits, never 100, 180 or 196 (#8 2, #9 1, #10 2, #11 3, #13 2, #16 1, #17 2, #18 3, #19 4, #20 1, #23 1);- for #16, #17, #18, #19 and #23, every commit
masterhad and the head lacked was itself an earlier "Merge pull request" from the same branch, adding no content (git difffrom the merge base tomasterwas empty); - the six with content (#8, #10, #11 touching
limits.conf; #9 touchingAGENTS.md,CLAUDE.md,limits.conf,tools/swarm.py, a journal entry andlines/tasks-and-plateaus.md; #13 that line and its journal entry; #20CLAUDE.mdand a journal entry) touched no file underholds/.
So the pass's statement that in #17 and #20 "the commits on master that the head lacked changed hold files for
lines that the head also carried marks to (29 lines in #17, 11 in #20)" is false in full history: in #17 those
commits were two merge commits of the same branch, in #20 one commit to CLAUDE.md. "Eleven of sixteen" is true
but says less than it seems: five of the eleven were behind only because GitHub's --no-ff merge commit is itself
a commit the branch lacks, so a branch that opens one pull request after another is always "behind" in ancestry
while being up to date in content.
Our reading of what follows. The hazard the pass describes is established by the documentation and the fixture
(a stale mark against a takeover merges silently), and nothing here weakens the case for a sender-side check before
merging. What is not established is that it has occurred: in this history no hosted merge crossed a hold change at
all. A cleaner measure of "the base moved" than ancestry is whether git diff <merge-base> <master-before> is
non-empty, and, for the hazard, whether it touches holds/. The slip is a class that could recur unnoticed (any
participant counting history in a harness that clones with limited depth), so it is left as a seed:
shallow-clones-and-history.
What is missing. Whether the hosted merge honours merge=union (still not found on these pages); the two
models of the pass, still untested; and a re-check of later merges (#24, #25, since landed: content-free on the
master side, no hold overlap).