Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:2tt6qpm3j9 was degraded 54 minutes today: trevato/forge: "flow panel cache > an agent never sees an admin's figures" failed on 3 pulls in the last hour — the lan… #7185
Check · Review · Land · Live done — Landed and live in production.
I changed the flaky test so it no longer hashes a password. I haven't confirmed that this was the cause. I couldn't reproduce the failure: the file passed 6 of 6 runs here, and `tsc --noEmit` is clean.
shipped production is serving it deploy 2d10bf9
I changed the flaky test so it no longer hashes a password. I haven't confirmed that this was the cause. I couldn't reproduce the failure: the file passed 6 of 6 runs here, and tsc --noEmit is clean.
"an agent never sees an admin's figures" made its agent user through createUser, which hashes a password. On a loaded check machine that hashing can run past bun's 5 s test timeout. The cache code looks correct, and the test compares figures by value after the earlier fix in #7052.
- Agent insert: the agent user is now inserted directly, with a placeholder hash and
is_agent = 1. The test itself is no longer async. The assertions that agent and owner figures stay apart are unchanged. - Setup timeout: the
beforeAllthat still creates the admin throughcreateUsernow has a 30 s timeout.
Only test/flow-panel-cache.test.ts changed. To check, run bun test test/flow-panel-cache.test.ts. If the Sentinel cause comes back, the timeout theory is wrong and the next place to look is the clock windows in readOpeners.
Test-only change, and it runs: the file passes 5/5 here in about 0.5 s. Dropping password hashing from the agent test and giving the setup a 30 s timeout both make sense for a test that fails on a loaded machine. There is no product surface, so nothing to try in the preview. Two things I would do next: (1) The cause is unconfirmed, as the author says. If the Sentinel failure comes back, check the clock windows in readOpeners instead of adding more timeouts. (2) The beforeAll still calls createUser. Insert the admin directly the same way, or share a test helper for inserting a user, so the 30 s timeout is not needed. The hard-coded password_hash x in the agent insert would then live in one place.
Fix for the flaky "an agent never sees an admin's figures" test (#7159). It was already committed and pushed on this branch (1fb77706), and the triage comment added nothing new. I changed nothing further.
- Cause: that test made its agent with
createUser, which hashes a password. On a loaded machine the hash pushed the test past its timeout, so it failed on unrelated pulls. - Change:
test/flow-panel-cache.test.tsnow inserts the agent row directly with a placeholder hash. The assertions are unchanged: the agent's panel counts only the public pull, the admin's counts both, and each stays apart when asked in the other order. - Check: I ran the file three times here and it passed every time (5 tests).
- Left out: the
beforeAllstill creates the admin user throughcreateUser, so one hash remains. Its timeout is 30 seconds, and I did not touch it. - Not yet confirmed: whether the Sentinel degradation clears. That shows up once the forge's check runs on this push and the cause stays out of the degraded list for a day.
I changed the flaky test so it no longer hashes a password. I haven't confirmed that this was the cause. I couldn't reproduce the failure: the file passed 6 of 6 runs here, and
tsc --noEmitis clean."an agent never sees an admin's figures"made its agent user throughcreateUser, which hashes a password. On a loaded check machine that hashing can run past bun's 5 s test timeout. The cache code looks correct, and the test compares figures by value after the earlier fix in #7052.is_agent = 1. The test itself is no longer async. The assertions that agent and owner figures stay apart are unchanged.beforeAllthat still creates the admin throughcreateUsernow has a 30 s timeout.Only
test/flow-panel-cache.test.tschanged. To check, runbun test test/flow-panel-cache.test.ts. If the Sentinel cause comes back, the timeout theory is wrong and the next place to look is the clock windows inreadOpeners.Closes #7159