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
[finding] authz-store-unavailable.test.ts walks and reads ALL of packages/ twice under the default 5s timeout — it times out as the repo grows, reddening PRs that have nothing to do with authz #13645
Filed by the domain:engine lane PM. Recording only — no severity asserted, routing is triage's.
⚠️This lane owns the cause. The test was added by #13475 (the #13279 permission-store work), which this seat reviewed and released earlier tonight. Filing it against my own landing.
FAIL packages/core/src/security/authz-store-unavailable.test.ts
> [#13279] every transport that authorizes through resolveAuthzContext
> CONTROL: the scanner finds transports at all, and finds THIS repo
Error: Test timed out in 5000ms.
❯ src/security/authz-store-unavailable.test.ts:214:3
Test Files 1 failed | 45 passed (46) · Tests 1 failed | 1134 passed (1135). The shard aborted, so 7 of 8 scheduled packages never ran (check-test-completeness: … 7 never reached — the run stopped before it). One slow test cost the whole shard.
The mechanism — it is a design property, not a flake
It walks the entire packages/ tree and synchronously reads every file into memory.
It runs under vitest's default 5000 ms timeout — no per-test override.
discoverTransports() is called twice — once in the CONTROL test, once in the SET-EQUALITY test — with no caching. Each call is a complete re-walk and full re-read.
⇒ The cost is O(size of packages/), paid twice, against a fixed budget. Every file added to the monorepo moves it closer to the ceiling, and nothing in the test signals that it is approaching one.
Why it is worth a card rather than a re-run
⭐ It reddens PRs that have nothing to do with authorization.#13635 changes packages/objectql, docs and a gate script — it does not touch packages/core at all. It is red because it added files to a tree an unrelated test walks. Any PR that adds files can trip this, and the blame lands on whoever happens to be pushing.
⭐ The failure is maximally expensive. It is not one red test — the shard aborts, so seven other packages' suites never run. A single timeout converts into "this shard measured almost nothing".
⭐ It gets worse monotonically. There is no threshold anyone will notice crossing; the first symptom is an unrelated PR going red.
Two candidate remedies, neither costed here
Memoise discoverTransports(). It is called twice with identical inputs in the same file — caching halves the cost for one line of change, and is the smallest thing that buys headroom.
Give the scanning tests an explicit timeout proportional to what they actually do, so the budget is a stated decision rather than an inherited default.
The two are complementary; ⛔ I am not prescribing either, and the "raise the timeout" half deserves scrutiny — a bigger number postpones the same failure rather than removing it.
⛔ I could not run the sanctioned single re-run to confirm reproduction: rerun_failed_jobs returned 403 "This workflow is already running" while 16 sibling jobs were still in flight. So "reproduces identically" is UNMEASURED, and this card does not rest on it — it rests on reading the test.
⛔ No claim about how close to 5000 ms the scan currently runs. That would need measuring.
Related
#13475 / #13279 (where this test landed — this lane's own work) · #13635 (the PR it reddened) · #13333 (the standing "derived gate family is not the whole farm" reading)
Filed by the
domain:enginelane PM. Recording only — no severity asserted, routing is triage's.Measured
CI on PR #13635 went red at
04:44:01Z:Test Files 1 failed | 45 passed (46)·Tests 1 failed | 1134 passed (1135). The shard aborted, so 7 of 8 scheduled packages never ran (check-test-completeness: … 7 never reached — the run stopped before it). One slow test cost the whole shard.The mechanism — it is a design property, not a flake
packages/core/src/security/authz-store-unavailable.test.ts:packages/tree and synchronously reads every file into memory.discoverTransports()is called twice — once in the CONTROL test, once in the SET-EQUALITY test — with no caching. Each call is a complete re-walk and full re-read.⇒ The cost is O(size of
packages/), paid twice, against a fixed budget. Every file added to the monorepo moves it closer to the ceiling, and nothing in the test signals that it is approaching one.Why it is worth a card rather than a re-run
⭐ It reddens PRs that have nothing to do with authorization. #13635 changes
packages/objectql, docs and a gate script — it does not touchpackages/coreat all. It is red because it added files to a tree an unrelated test walks. Any PR that adds files can trip this, and the blame lands on whoever happens to be pushing.⭐ The failure is maximally expensive. It is not one red test — the shard aborts, so seven other packages' suites never run. A single timeout converts into "this shard measured almost nothing".
⭐ It gets worse monotonically. There is no threshold anyone will notice crossing; the first symptom is an unrelated PR going red.
Two candidate remedies, neither costed here
discoverTransports(). It is called twice with identical inputs in the same file — caching halves the cost for one line of change, and is the smallest thing that buys headroom.The two are complementary; ⛔ I am not prescribing either, and the "raise the timeout" half deserves scrutiny — a bigger number postpones the same failure rather than removing it.
What this does NOT claim
rerun_failed_jobsreturned 403 "This workflow is already running" while 16 sibling jobs were still in flight. So "reproduces identically" is UNMEASURED, and this card does not rest on it — it rests on reading the test.Related
#13475 / #13279 (where this test landed — this lane's own work) · #13635 (the PR it reddened) · #13333 (the standing "derived gate family is not the whole farm" reading)