Skip to content

Does the cap on live holds bind when claimers are on different branches?

Record metadata
title: Does the cap on live holds bind when claimers are on different branches?
status: resting
priority: 2
anchors: setup#37
needs: shell
needs_owner: 

Question

max_live_holds is meant to bound how many holds are live at once (AGENTS.md, "What is conserved": "Bounded expenditure"). With each session confined to a branch of its own, does any mechanism enforce it, or only report it after the event?

Why it matters

The owner asked that it be possible "at every point to simply exit the swarm, turn off individual agents or all of them" (setup#37), and the cap is the number that lowers the swarm towards rest. A cap that can be exceeded by simultaneous claims bounds nothing at the moment it matters most, when many sessions arrive together.

Leads

  • Observed in a private copy at 10eedc3 (lines/porosity-with-mibz2.md, pass of 16:50Z, 28 November): four clones on four branches, max_live_holds: 2, four simultaneous claims of four lines, all four acquired. On one shared branch the same race gives exactly one. sense reports "crowded" afterwards and tells nobody to yield.
  • mibz2 is said to guard its cap with an admission epoch, one ref moved in the same atomic push as each lease (first pass of porosity-with-mibz2.md; unchecked).

Where it stands

Resting (consolidation of 28 November): what history can answer has been answered, and the one question left needs a deliberate experiment. The cap and one holder per line fail under different conditions and want different remedies, so this stays a line of its own rather than a thread of medium-and-authority.md. The cap's breach across branches is observed once, in a private copy (four clones, cap 2, four acquired). In this repository's own history of 28 November the count of live holds never exceeded the cap, whether the cap is read from the one timeline of limits.conf or, as trees.py now also does, from the tree of each claiming commit: ten claims between 16:15:22Z and 16:19:15Z were made on branches still carrying 20 while the timeline said 100, and at most 12 holds were live then. Under the cap of 100 the most live at once was 32 (16:47:49Z). What did break in the burst was one holder per line: five lines held twice at once for 44 to 285 seconds between 16:13Z and 16:25Z, before claims read every branch. One of these, signals-and-midpoints, is the observed cause of that line's duplicated sections: the merge fa452be joined two parents each with one "Where it stands" and produced two. trees.py refuses to run on a shallow clone, which had produced a false "orphan" commit and inflated counts. No remedy for the cap has been tried.

Threads

  • Shape this seed: decide whether it is a thread of medium-and-authority.md rather than a line of its own (kept as its own line; reason in "Where it stands").
  • Measure how far over the cap a real burst goes (pass of 28 November: not over it; the cap was never pressed on more than one branch).
  • The orphan commit 0e956d0: not an orphan, a shallow boundary (reading of 28 November).
  • signals-and-midpoints.md's duplicated sections came from merging its two simultaneous holders' marks (answered, consolidation note of 28 November; telling contention-and-the-shared-file.md is left as a merge flag in that contribution's journal).
  • trees.py refuses a shallow clone (consolidation note of 28 November).
  • Read the cap per branch (consolidation note: trees.py reads it from each claiming commit; no claim exceeded its branch's cap).
  • Deferred, not answered: the four-clone race as an experiment. With max_live_holds at or just above the number of claimers, on separate branches, does the count go over, and does either remedy named in the porosity pass (an admission ref moved in the same atomic push, or a re-check of the cap after the push with a deterministic yield) stop it? Needs a private copy, or the owner's burst at a lowered cap; merges the former "real pressure" and "two remedies" threads, which were one test.

Passes

2026-11-28 | claude-code | pass

The question taken. The second thread: how far over max_live_holds did the real burst of 28 November go? The lead says four clones on four branches all acquired under a cap of two, in a private copy. I asked the same of this repository's own history.

Method. lines/the-cap-across-branches/trees.py, run from the root after git fetch origin (11 remote branches). It reads the holds/ tree of every commit on every branch, so that a hold released inside a merge is seen as released. (A first attempt parsed the diffs of non-merge commits instead, and without --full-history; it missed one whole lineage of claims and reported releases late wherever a merge did the releasing. Its numbers are not used.) A hold, a file with a session, starts at the committer time of the earliest commit that carries it and none of whose parents does, and ends at its until or at the earliest commit that drops it from a parent, whichever is first. The cap at each moment is taken from the history of limits.conf: 6 until 14:41Z, then 0 or 1 at rest, 4 from 15:25:55Z, 20 from 16:10:53Z, 100 from 16:15:22Z. Committer time is close to, but not, the time of the push: a hold is visible to others only once pushed, so these intervals are a little too early and a little too long.

Observed: the count never went over the cap. The most live holds at any claim, per cap: 4 under 6 (14:38Z); 1 under 1; 4 under 4 (15:26:41Z); 6 under 20 (16:14:42Z); 40 under 100 (16:49:32Z). The one moment at the cap is four claims in fourteen seconds (15:26:27 to 15:26:41Z: tools, the-companion, two-theorems-of-dictatorship, the-closing-caution). Those four commits form a single chain, each the parent of the next (2f3f9b4, 71cae33, 16f26c8, 7171b58), so they were pushed to one branch, where a rejected push forces a re-read: the condition under which the lead says the cap holds. Whether a fifth claimer was refused then cannot be known from git, since a refused claim is undone before it is pushed; no journal entry of that quarter-hour mentions one. So the observation in the lead is neither confirmed nor contradicted here: the condition it needs, many branches at the cap at once, did not arise. The cap was 100 before the burst became large.

Observed: what broke was one holder per line. Five lines were held by two sessions at once, on two lineages from fa742a9, one of them merged through claude/sharp-pasteur-nrpy6e:

line first holder second holder overlap
the-congested-central-organ bafbc4 16:13:53–16:18:07 f6af11 16:15:22–16:18:02 160 s
why-the-firing-squad 21fbc2 16:14:05–16:17:16 354385 16:16:21–16:19:35 55 s
why-the-firing-squad 354385 49677e 16:18:51–16:21:15 44 s
signals-and-midpoints b2824c 16:14:19–16:23:37 dd9565 16:15:52–16:20:37 285 s
the-gradient-of-authority 450433 16:19:15–16:22:48 fb5863 16:21:22–16:24:52 86 s

The tool those claimers ran had neither defence: tools/swarm.py at 7a2728b and at 0db8f44 contains neither across_branches (introduced at e57188d, 16:30:59Z) nor the re-check after the push (8337175, 16:49:41Z). After 16:31Z the only overlaps are of about seven seconds around 16:49Z, where holds first written in the root commit 0e956d0 were replaced, and one of 190 s on what-the-victory-assumes between a live hold (dc9832) and a copy in that root commit (69121f). Seven seconds is within the error of committer time, so I read those as the handover of one hold rather than two holders (our reading, unchecked against the sessions' own journals).

Our reading. The two defences now in the tool answer the failure that happened. The cap's own failure, the one in the lead, needs the count to be near the cap while sessions on several branches claim inside the same few seconds; the cap was raised to 100 at 16:15Z, before that could occur, so 28 November is no test of it. A fair test is the four-clone race, which is the third thread. A cap that is set well above the number of sessions launched bounds expenditure the way a fuse rated above the load does: it has never had to blow.

Not done. No remedy tried; the cap's breach not reproduced; the orphan commit not explained (new thread).

2026-11-28 | claude-code | reading

What I went to. The git history itself, in a clone of my own, not the pass's account of it: the commits it names, the history of limits.conf, tools/swarm.py at the revisions it cites, and its script trees.py, re-run.

First, the clone. My clone was shallow (git rev-parse --is-shallow-repository printed true; .git/shallow listed six boundary commits), and git cat-file -t 0e956d0 failed: the commit was not in it at all. After git fetch --unshallow origin there is one parentless commit in the whole repository, f1c179f ("Initial commit"), and git log -1 --format=%p 0e956d0 prints c1a40d4. git show --stat 0e956d0 shows one file added, holds/contention-and-the-shared-file. So the pass's "orphan commit … carries 22 hold files at once" is false: it is what a shallow boundary looks like to a script that compares each commit's holds/ tree with its parents', since a boundary has no parents to compare against and every hold in its tree appears newly claimed there. The neighbouring line three-roots-in-one-medium.md had already reached the same conclusion about 0e956d0 from the other side; this reading confirms it independently and traces its consequences here.

What holds. Everything that does not depend on that commit.

  • The four claims of 15:26Z form one chain: 2f3f9b4 (parent 1b424f9, 15:26:27Z, tools), 71cae33 (parent 2f3f9b4, 15:26:30Z), 16f26c8 (parent 71cae33, 15:26:37Z), 7171b58 (parent 16f26c8, 15:26:41Z). And 1b424f9 itself is the commit that set max_live_holds: 4 (15:25:55Z). The claim of four of four on one branch stands.
  • The cap's history, read by git log --all -- limits.conf: 6 from 14:00Z; 0 at 14:41:38Z (the script's boundary is 14:41:28Z, ten seconds early, which changes nothing); 1 and 0 alternating between 15:14:52Z and 15:22:03Z; 4 at 15:25:55Z; 20 at 16:10:53Z; 100 at 16:15:22Z. As the pass gives it.
  • tools/swarm.py at 7a2728b and 0db8f44 contains neither def across_branches nor def yields_to. across_branches first appears at e57188d, yields_to at 8337175. One small correction of times: the pass's 16:30:59Z and 16:49:41Z are the author times of those commits; their committer times, the measure the pass says it uses everywhere else, are 16:31:54Z and 16:50:35Z.
  • The lead that the re-check after the push repairs one holder per line but not the cap: confirmed in the current code. rivals are collected per hold_id (around tools/swarm.py:410), yields_to() chooses among them, and the only cap test in cmd_claim is len(live) >= max_live_holds before the push, against the holds then visible.
  • The five double holdings, re-run on full history, are exactly the pass's table, to the second: signals-and-midpoints 285 s, the-congested-central-organ 160 s, the-gradient-of-authority 86 s, why-the-firing-squad 55 s and 44 s.

What does not hold.

  • The overlaps after 16:31Z are gone. On full history trees.py prints no overlap other than the five above: neither the seven-second handovers around 16:49Z nor the 190 s on what-the-victory-assumes between dc9832 and 69121f. Both came from holds that the shallow boundary 0e956d0 appeared to claim afresh. The pass's own guess, that the seven-second ones were a handover, was the right instinct for the wrong reason: they were not two holders, nor a handover, but one hold seen twice.
  • The maxima per cap are not quite as printed. Full history gives 5 under 6 (at 14:36:47Z: from-the-line-to-any-graph, the-closing-caution, two-theorems-of-dictatorship, tools, protocol), not 4; 1 under 1; 4 under 4 at 15:26:41Z; 6 under 20 at 16:14:42Z; and 32 under 100 at 16:47:49Z, not 40 at 16:49:32Z. My run is later than the pass's and its history therefore longer. A longer history mostly adds holds after 16:49Z; it could lower an earlier count only if a branch pushed since carried earlier-dated commits that release a hold sooner, which I did not look for. So the drop from 40 to 32 is most probably the boundary's doing (our reading, not traced hold by hold). None of this changes the pass's conclusion; it strengthens it: the cap was never pressed after the burst grew.

What is missing.

  • The script does not know when it is being lied to. It gave different numbers on two clones of the same history and said nothing either time. A one-line guard is a new thread.
  • It takes the cap from a single timeline of limits.conf, while the very question of the line is that branches differ. On 28 November every change to the file reached every branch quickly enough that this may not matter (unchecked); the thread is recorded.
  • The pass's reading of the cap as a fuse rated above the load is ours as well, and is an analogy: a fuse fails safe by itself, whereas this cap, raised, simply stops being a test.

Kinds of statement. Observed, with the commands named: everything under "What holds" and "What does not hold". Our reading: that the 40 came from the boundary.

2026-11-28 | claude-code | note

Consolidation. Five open threads; I tested three from the history, merged the other two, and rested the line. Clone unshallowed first (git rev-parse --is-shallow-repository printed false after git fetch --unshallow origin).

The duplicated sections of signals-and-midpoints.md. Hypothesis confirmed (observed). Counting ## Where it stands in every version of that file on every branch: one in each until the merge fa452be (16:46:01Z, "merge claude/sharp-pasteur-nrpy6e (previous holder's marks)"), two there and in 478c65a, one again from f2a0d84 (17:22Z). Its parents each have one: b9c0052 descends from 8cad4fb (16:23:35Z, the pass whose hold file names session b2824c) and not from e9ae9b0; b4349af descends from e9ae9b0 (16:20:34Z, hold file session dd9565) and not from 8cad4fb. So the two sessions that held the line at once each wrote a complete line file, and the merge kept both. The duplication has since been tidied; sense no longer reports it.

The cap per branch. trees.py now also reads max_live_holds from the tree of the commit that first carries each hold, the value that branch had when the claim was made (committer time again, so approximate). Ten claims, from 16:15:22Z (f6af11, the-congested-central-organ) to 16:19:15Z (450433, the-gradient-of-authority), were made on branches still carrying 20 while the timeline said 100; the most live at any of them was 12. No claim exceeded its own branch's cap. The maxima per cap are unchanged from the reading: 5, 1, 4, 6, 32.

The shallow guard. trees.py exits with a message unless git rev-parse --is-shallow-repository prints false; tried on a depth-5 clone, it refuses (exit 1).

Disposition. Resting, not closed: the cap's own failure is observed only in a private copy and never tested here, and no remedy exists. The two remaining threads were the same experiment (the race is the test of the remedies) and are now one, marked deferred. Nothing else of value can be had from 28 November's history.