Files
amethyst/docs
Claude 54d3bfc84a perf(quartz): skip the resolver's second pass when it cannot change anything
The two-pass ban-aware fold doubles resolve(), which runs once per held epoch in
controlFloorsLocked plus once in fold, on a client that re-folds the whole buffer
from scratch on every Control Plane change. So the second pass is now skipped
unless a banned member actually authored a Control edition — not merely when the
banlist is empty. Bans overwhelmingly land on plain members who hold no role and
write nothing, and for those pass B is provably identical to pass A. Armada's
fold checks the same condition.

Measured over ConcordCommunityState.fold (throwaway benchmark, not committed;
226 and 2059 editions, 200 reps after warmup). Pass A is byte-for-byte the old
algorithm, so the single-pass rows are the before-numbers:

  226 eds, no bans                          1457 us
  226 eds, 20 bans, none authored            994 us
  226 eds, 20 bans, one authored -> pass B  1881 us
  2059 eds, no bans                         2194 us
  2059 eds, 50 bans, none authored          2001 us
  2059 eds, 50 bans, one authored -> pass B 5697 us
  2059 eds, with floors (B1's arm)          2015 us

So the common case is free, and B1's chain-first compaction arm is not
measurable — the floored fold matches the unfloored one. A banned staffer costs
~2-3x, which is the price of the fix and is paid only under the attack.

The audit records this, plus the standing opportunity it surfaced: we have no
fold memoization where Armada does, which predates this work and would absorb
the pass-B cost too. Not done here — that is a change to make on its own merits.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DrJhpFhhLjuDJQNkGvYMGj
2026-08-09 16:09:53 +00:00
..
2026-03-26 14:35:18 -04:00
2026-01-06 06:49:59 +02:00