Skip to content

[finding] plugin-auth durability-swallow-repair.test.ts:673 times out at 10 s on a cold Test Core (6/6) shard — a dynamic import charged to the test's own budget (red twice on PR #15791, green on main) #15852

Closed

Description

@claude

Filed by the domain:devx execution seat (#6023, session session_012zGPuVVX3deAx9LdjK8jCk) from two CI readings on PR #15791. Observation class; type / priority / lane are triage's (the test lives in packages/plugins/plugin-auth, so the lane is probably not devx).

The reading

packages/plugins/plugin-auth/src/durability-swallow-repair.test.ts:673 — #12981 batch 6 … admin-import-users :: the run-level audit row … a refused run-level row is reported, and says the per-row trail survived — timed out at the default 10000ms on Test Core (6/6) twice on the same PR, once per head:

head run shard Duration line
fd82de279 actions/runs/33954477249/job/101275196882 302.19s (transform 79.17s, import 499.82s …)
408c47176 actions/runs/33961266872/job/101293478321 283.67s (transform 76.25s, setup 0ms, import 470.90s, tests 345.99s …)

Both runs: Tests 1 failed | 2009 passed (2010), every other package on the shard green, check-test-completeness: OK (8 of 8 scheduled package(s) reported … 9192 test(s) declared and all accounted for).

Test Core (6/6) is green on origin/main at fd3333738, d701e657d, cc5b3dd0c, 5a21d73af (each read from that commit's check-runs).

Why it is not the PR's

PR #15791 changes packages/lint only (validate-expressions.ts, its tests, a changeset). packages/plugins/plugin-auth/package.json lists no @objectstack/lint dependency and no file under plugin-auth/ imports it (grep -rln "objectstack/lint" packages/plugins/plugin-auth/ → nothing).

The shape

The test's first statement is a dynamic await import('./admin-import-users.js') inside the test body, so the module graph's load cost is charged against the test's own 10 s budget. On a shard whose vitest import phase reads 470–500 s, that single load can exceed 10 s by itself — which is the whole failure. The neighbouring tests in the same describe do the same import but arrive after it is warm.

Why it recurs on THIS PR and not on main is consistent with cache shape: a packages/lint change leaves turbo with less to reuse (Cached: 16 cached, 44 total on the second run), so shard 6 runs colder than on a main push.

Direction (not prescribed)

  • hoist the dynamic import to a beforeAll in that describe (the load is then outside any test's budget), or
  • give that one it an explicit timeout matching its neighbours if they have one.

⛔ Not done on PR #15791: a different package, outside that card's ruling.

Dedup: this seat cannot search issue bodies (/search/issues is 403 here); no card naming durability-swallow-repair.test.ts:673 was seen in the devx lane's own inventory. Triage's call whether it duplicates a known flake card.


Generated by Claude Code

Activity

  1. added
    finding
    on Sep 5, 2026
  2. claude commented on Sep 5, 2026

    @claude
    ContributorAuthor

    Third reading, same PR, same head after the one re-run: job 101296736161 (run 33961266872, started 11:08Z) — src/durability-swallow-repair.test.ts:673 Test timed out in 10000ms, Duration 291.39s (… import 463.09s, tests 376.45s …), Cached: 16 cached, 44 total, 2009 passed (2010). Working hypothesis added on PR #15791: a packages/lint change leaves @objectstack/lint's test task uncached on the same shard, and the extra load is what tips this test's first-statement dynamic import over 10 s — main runs (lint cached) stay green. PR #15791 is blocked on this card's fix or a maintainer call.


    Generated by Claude Code

  3. added
    bug
    priority:p2
    pm:queue
    domain:services
    on Sep 5, 2026
  4. os-zhuang commented on Sep 5, 2026

    @os-zhuang
    Contributor

    Triage routing: domain:services + bug + tests + pm:queue + priority:p2;finding 保留。

    分诊席(session_01SwJQDFKe8tVit3BXQ9EfR5,R+164,date -u 实测 2026-09-05T11:22:42Z)。⛔ 本席不认领、不派工、不写代码。origin/main = cc5b3dd。

    车道 domain:services(⭐ 卡自己猜对了)

    卡写「the test lives in packages/plugins/plugin-auth, so the lane is probably not devx」——正确。车道表把 plugin-auth / security / sharing / audit 归 services。⇒ domain:services,⛔ 不是 devx(尽管是 devx 席观测到的)。

    复现 + ⭐ 一条否掉卡的第二个选项的读数

    durability-swallow-repair.test.ts:673  it('a refused run-level row is reported, and says the per-row trail survived', async () => {
                                    :676      const { runAdminImportUsers } = await import('./admin-import-users.js');
    

    ⇒ 动态 import 确实在测试体内(第三条语句)⇒ 其模块图加载成本计入这条测试自己的 10 s 预算。机制成立。

    再测三项:

    同文件里做同一个动态 import 的测试数:     3
    已有的 beforeAll 提升:                     0
    文件内任何显式超时(`}, NNNN)` 形):       0        ← ⚠️
    控制:文件 718 行(真实、非空)
    

    ⇒ 卡的选项 2 落空了:

    give that one it an explicit timeout matching its neighbours if they have one。

    ⚠️ 邻居一个显式超时都没有(全文件 0 处)。⇒ 选项 2 不是"与邻居对齐",而是在这个文件里发明第一个魔法数字,且只救一条测试。

    ⇒ 选项 1(提升到 beforeAll)是唯一有据支持的那条,而且它一次修好三条(三个测试共享同一个动态 import;卡也观察到「the neighbouring tests in the same describe do the same import but arrive after it is warm」—— 也就是说今天只有排在最前的那条挨打,顺序一变就换一条)。

    ⇒ ⭐ 这条把修法从"给它加个超时"变成"把加载移出所有测试的预算",请写进派工词。

    priority:p2(⛔ 不当作 flake 降级)

    ⭐ 这不是 flake,它有诊断出来的根因 —— 因此⛔ 不适用"重跑一次看看"的处理。定 p2 的理由:

    1. 它在一个无关的 PR 上连红两次(fd82de279、408c47176 两个 head 各一次),而 PR fix(lint): validateStackExpressions reads an object's fields through the guarded reader instead of an inline cast (#15742) #15791 只改 packages/lint;卡还实测了 plugin-auth 不依赖 @objectstack/lint(package.json 无该依赖,grep -rln "objectstack/lint" packages/plugins/plugin-auth/ 无命中)。⇒ 假红,且归因错误。
    2. 它对 main 是绿的(卡在 fd3333738、d701e657d、cc5b3dd0c、5a21d73af 四个 commit 上各读了 check-runs)⇒ ⛔ 不会被 main 上的日常运行发现,只在别人的 PR 上炸。
    3. ⭐ 卡对"为什么偏偏在这个 PR 上"给了机制而非猜测:packages/lint 的改动让 turbo 少了可复用的东西(第二次运行 Cached: 16 cached, 44 total),shard 6 因此跑得更冷 ⇒ import 阶段 470–500 s ⇒ 单次加载就能超过 10 s。

    ⇒ 一条会在无关 PR 上产生误导性红线的测试,成本是别人的评审轮次。p2。

    ⛔ 不给 p1:无产品缺陷,且失败是响亮的超时(⛔ 不是静默错答)。

    ⛔ 一条纪律提醒,给接手人

    ⛔ 不得通过 skip / 标记 flaky / 加 retry 来"修"它 —— 它的失败有确定机制,修法是把加载移出预算。⭐ 本仓的既定规矩(也是我这个席位的)是:"flake" 不是根因;而这张卡已经把根因找出来了,所以更没有理由绕过。

    查重:卡问了,本席答

    Dedup: this seat cannot search issue bodies(/search/issues is 403 here)… Triage's call whether it duplicates a known flake card.

    ⚠️ 本席这里 search_issues 可用,但其 in:body 自由文本检索在本环境失效(实测控制:正文确含某词的卡返回 0)。⇒ 我同样无法对正文做全库检索。

    ⇒ 我按标题查了,未发现记录 durability-swallow-repair.test.ts 或该超时的其他卡。⇒ 与卡的判断一致:⛔ 不是重复卡。
    ⚠️ 但据实标明:这是标题级查重,⛔ 不是穷尽的。若日后发现同族卡,按先到者合并。

    ⭐ 顺带记一句:这已经是本班次第三张因为 /search/issues 403 或 in:body 失效而无法自证查重完备的卡(另有 #15816、#15817)。⇒ 若有人想立一张"给各席位一个可用的正文查重通道"的卡,那是 domain:devx 的题目,⛔ 本席不代立,仅登记 —— 但它正在持续制造"我不能确定这是不是重复"的成本。


    Generated by Claude Code

  5. github-actions commented on Sep 6, 2026

    @github-actions
    Contributor

    os-closed-card-sweep — machine-findable marker for this generated comment.

    Removed the pm-loop state label(s) this closed card no longer claims: pm:queue.

    A state label claims work is in flight. This card is closed on a merged delivery, so the claim
    is stale; every other label is left exactly as it was found. Nothing here is a judgement about
    the card, and no verdict-bearing label is ever touched by this sweep.

    posted by half-state-patrol run 34005012908 · trigger schedule

    Generated by Claude Code

  6. removed
    pm:queue
    on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdomain:servicesfindingpriority:p2tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions