power: its loop and boot tests run on a fake clock, so a busy build node cannot fail them (issue 1126) #551

Merged
mesh-tools merged 1 commits from fix/power-loop-flake into main 2026-10-28 16:26:06 +00:00
Member

mesh-catalog#549's check (it touched only modules/gitea) failed on power/cmd/power.TestTheLoopPublishesEveryIntervalAndStopsWhenCancelled: '2 lines'. The test slept a real 210 ms with a 20 ms interval and required 6 to 12 lines, so a starved test process saw fewer. Reproduced: under 4 spinners pinned to one CPU with the test at SCHED_IDLE, 20 of 20 old runs failed.

  • runDraw takes its wait as a parameter; production passes sleepFor(ctx), the same select on ctx.Done and time.After as before (unchanged behaviour). The test passes a fake wait that asserts the 20 ms interval and cancels on the 10th call: exactly 10 lines.
  • Same kind, found by audit: TestRunWithoutLogindStillSaysTheBoot ran under a 100 ms timeout racing Run's first tick; it now cancels itself once the dial and the first emit happened (not reproduced under load; fixed by reading).
    The other power tests were read: no counted window.

Tests: no new function; go test -race -count=200 -cpu=1,4 green; the 22 catalog checks pass.

Reviewed-by: rev-power-flake@shanks at 3494548c88

mesh-catalog#549's check (it touched only modules/gitea) failed on power/cmd/power.TestTheLoopPublishesEveryIntervalAndStopsWhenCancelled: '2 lines'. The test slept a real 210 ms with a 20 ms interval and required 6 to 12 lines, so a starved test process saw fewer. Reproduced: under 4 spinners pinned to one CPU with the test at SCHED_IDLE, 20 of 20 old runs failed. - runDraw takes its wait as a parameter; production passes sleepFor(ctx), the same select on ctx.Done and time.After as before (unchanged behaviour). The test passes a fake wait that asserts the 20 ms interval and cancels on the 10th call: exactly 10 lines. - Same kind, found by audit: TestRunWithoutLogindStillSaysTheBoot ran under a 100 ms timeout racing Run's first tick; it now cancels itself once the dial and the first emit happened (not reproduced under load; fixed by reading). The other power tests were read: no counted window. Tests: no new function; go test -race -count=200 -cpu=1,4 green; the 22 catalog checks pass. Reviewed-by: rev-power-flake@shanks at 3494548c8830e550a195b5e7bbc281051323486d
mesh-tools added 1 commit 2026-10-28 16:13:27 +00:00
power: the loop and run tests drive their own clock, so a loaded build node cannot starve their timing (flake in #549's check)
mesh/delivery merged: source.main moved to novox/mesh-catalog@d836a31aa721
mesh/check checking 3494548c8830 on d836a31aa721
3494548c88
Author
Member

Delivery novox/mesh-catalog@3494548c8830 — merged since 2026-10-28T16:26:07Z

Source — source.main moved to novox/mesh-catalog@d836a31aa7. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Transitions

  • 2026-10-28 16:13 (new) → proposed (announced): novox/mesh-catalog#551's head announced
  • 2026-10-28 16:13 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
  • 2026-10-28 16:26 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-catalog@3494548c8830` — **merged** since 2026-10-28T16:26:07Z **Source** — source.main moved to novox/mesh-catalog@d836a31aa721. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Transitions** - 2026-10-28 16:13 (new) → proposed (announced): novox/mesh-catalog#551's head announced - 2026-10-28 16:13 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false) - 2026-10-28 16:26 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-tools merged commit d836a31aa7 into main 2026-10-28 16:26:06 +00:00
mesh-tools deleted branch fix/power-loop-flake 2026-10-28 16:26:06 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#551