You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
run-slot gauges lock test flakes: eight looks with no reading run top 6 times #956
tests/scripts/ops/run-slot-gauges-lock.test.ts failed once on canary at d216f23 and passed on a rerun of the same commit, so it is a flake. It turned Audit, Lint, and Build red on canary and held a ship for one rerun.
Green rerun of the same jobs: run 41976762269, attempt 2
The failing assertion:
(fail) the gauges refresh under one lock > eight looks with no reading yet run top once [1631.38ms]
49 | test("eight looks with no reading yet run top once", async () => {
50 | const m = machine({ topDelay: 1 })
51 | await slotsTogether(m, 8)
52 | expect(tops(m)).toBe(1)
Expected: 1
Received: 6
A lead, not yet checked
gauges() in scripts/ops/run-slot.sh stamps the reading it writes with now, the time the look began, not the time the reading landed. On a loaded runner, a refresh that takes 10 s or more writes a reading that is already stale, so the next look takes the freed lock and runs top again. The six tops would then be refreshes one after another, not at once. This is a reading of the code; a run that shows it is part of the fix.
Done when
The test's cause is shown by a run, for example by slowing the fake top or the fake runner.
The fix makes the test hold under that slowdown, or the test stops depending on the runner's speed.
The test passes 20 runs in a row under bun run test:file.
Activity
feat(PG-1023): an Inbox card shows a Keychain value on the owner's cl…
fix(PG-1077): a look counts run-slot's slots 2 to 4 on one gauges rea…
fix(PG-956): the run-slot tests take a lock as the Mac does on CI's u…