Run 203's findings: helpers past the backend's places, the code review's lint, a late compaction #576

Closed
opened 2026-11-20 16:50:50 -05:00 by cmoriarty · 1 comment
Owner

What happens (run 203, braid#565, findings 2 to 4; finding 1 shipped in pull request 566)

  1. Twice in run 203's code review, three sessions worked on a backend Braid holds to two, for 2.3 and 1.3 min. A helper's place comes from two gates that do not count each other: osfd's grants, and the guard's own gate. A waiter falls back to the guard's gate when osfd does not answer within 2 s, so one helper ending can start two.
  2. The code review changes tests but never runs the test lint. Its waitForTimeout failed the lanes' first round, costing 5.5 min.
  3. After compacting a step, Braid waits for its session to go quiet before it sends its note and checks the shrink. Reports from queued helpers kept the review busy for 17 min.
    • Braid's note reached a review that had already finished, and it went over its work again.
    • The compaction was recorded as 215k to 131k, when it made 8.6k.
    • A slightly longer review would have had a working compaction counted as failed.

Fix

  1. Every helper takes a place at the guard's gate as well as from osfd. osfd bounds the backend, the guard's gate bounds the run's server, and when osfd does not answer only the guard's gate decides.
  2. The review's brief asks for the same lint over the tests it changed, through the braid tool, as apply's brief does.
  3. The step's first turn after a compaction settles it: that turn's reading is the shrink, and Braid's note follows at once, quiet session or not.

Done when: each fix has a test that fails without it, and fix 4 is shown by a simulated run in which a helper's report wakes the step after its compaction.

Related, not in this change: braid#575 (the code review loops while its readers work).

**What happens** (run 203, braid#565, findings 2 to 4; finding 1 shipped in pull request 566) 2. Twice in run 203's code review, three sessions worked on a backend Braid holds to two, for 2.3 and 1.3 min. A helper's place comes from two gates that do not count each other: osfd's grants, and the guard's own gate. A waiter falls back to the guard's gate when osfd does not answer within 2 s, so one helper ending can start two. 3. The code review changes tests but never runs the test lint. Its `waitForTimeout` failed the lanes' first round, costing 5.5 min. 4. After compacting a step, Braid waits for its session to go quiet before it sends its note and checks the shrink. Reports from queued helpers kept the review busy for 17 min. - Braid's note reached a review that had already finished, and it went over its work again. - The compaction was recorded as 215k to 131k, when it made 8.6k. - A slightly longer review would have had a working compaction counted as failed. **Fix** 2. Every helper takes a place at the guard's gate as well as from osfd. osfd bounds the backend, the guard's gate bounds the run's server, and when osfd does not answer only the guard's gate decides. 3. The review's brief asks for the same lint over the tests it changed, through the `braid` tool, as apply's brief does. 4. The step's first turn after a compaction settles it: that turn's reading is the shrink, and Braid's note follows at once, quiet session or not. **Done when:** each fix has a test that fails without it, and fix 4 is shown by a simulated run in which a helper's report wakes the step after its compaction. *Related, not in this change: braid#575 (the code review loops while its readers work).*
Author
Owner

Shipped in pull request 578, on production since 46464d0, and archived in pull request 579.

  1. Helpers past the backend's places. Every helper now takes a place at the guard's own gate as well as from osfd. When osfd does not answer, the guard's gate alone decides, and a helper it lets in still counts there. A test replays run 203's order: one helper at work, two queued, one late answer from osfd, then the helper ends. Before the fix both queued helpers started; now one does. A new call beside a helper the guard's gate let in alone is now answered "Queued"; before, it started.
  2. The code review's lint. After a change to a test, the review's brief asks for the braid tool's lint over the tests it changed, as apply's does. A test checks the line and the base commit it names. The brief stays within its budget (5,994 of 6,000 characters).
  3. The late compaction. The step's own first turn begun after the compaction now settles it. That turn's reading is the shrink, and Braid's note goes at once, waiting behind the turn if the step is busy. The stopped turn, the compaction's own turn and helpers' turns do not count.
    • A new simulated run, compaction-woken-by-a-helper, has a helper's report wake the step after its compaction, as in run 203. Before the fix it counted the compaction as failed ("did not shrink the context (36000 -> 27000)") and went on in a fresh session. Now the compaction counts at 9,000 and the run succeeds.
    • A test over run 203's order of turns reads 8,648, not 131,189.

./tools/test.sh passed on the laptop and on CI. The 7 smoke runs and the 6 compaction and helper runs pass.

Shipped in pull request 578, on production since `46464d0`, and archived in pull request 579. 2. **Helpers past the backend's places.** Every helper now takes a place at the guard's own gate as well as from osfd. When osfd does not answer, the guard's gate alone decides, and a helper it lets in still counts there. A test replays run 203's order: one helper at work, two queued, one late answer from osfd, then the helper ends. Before the fix both queued helpers started; now one does. A new call beside a helper the guard's gate let in alone is now answered "Queued"; before, it started. 3. **The code review's lint.** After a change to a test, the review's brief asks for the `braid` tool's `lint` over the tests it changed, as apply's does. A test checks the line and the base commit it names. The brief stays within its budget (5,994 of 6,000 characters). 4. **The late compaction.** The step's own first turn begun after the compaction now settles it. That turn's reading is the shrink, and Braid's note goes at once, waiting behind the turn if the step is busy. The stopped turn, the compaction's own turn and helpers' turns do not count. - A new simulated run, `compaction-woken-by-a-helper`, has a helper's report wake the step after its compaction, as in run 203. Before the fix it counted the compaction as failed ("did not shrink the context (36000 -> 27000)") and went on in a fresh session. Now the compaction counts at 9,000 and the run succeeds. - A test over run 203's order of turns reads 8,648, not 131,189. `./tools/test.sh` passed on the laptop and on CI. The 7 smoke runs and the 6 compaction and helper runs pass.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/braid#576
No description provided.