From 3edfc1be9bce146f11249007ecbe7e8b0aba2b05 Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 17 Nov 2026 20:30:51 +0800 Subject: [PATCH] LESSONS: a check and what it counts are one step; a reading counts what it had when taken (#6958) --- LESSONS.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/LESSONS.md b/LESSONS.md index a4ec99126..4d472a1c3 100644 --- a/LESSONS.md +++ b/LESSONS.md @@ -664,6 +664,19 @@ too.** ## Concurrency and tests +**A check and what it counts are one step, and a reading counts what it +had when it was taken, not when it is looked at.** +- #6958: TestCapHoldsUnderParallelSessions went red on ubuntu CI at 93% + of a 90% cap. A turn found not near its cap was counted on the account + only once it took its lane, so turns checking in that gap passed + together. The account's usage came from replies that began while a + round was out, so the reading lacked that round. turnSpends still took + every turn come back as read, and halved what a turn spends. +- Widen the gap in a test hook to find such a red, not by rerunning. A + hook placed inside the lock it is testing hides the gap: the first + cut's test was green with the fix taken out. +- Seen 1× (2026-11-17). + **A fake or child process a test starts ends when the test does**, and **a timing test leaves room on both sides**, are in the code standards since 10-11. See [Moved to the code standards](#moved-to-the-code-standards).