Skip to content

test(plugin-approvals): boot the #38838 publish-refusal describe kernel once - #39002

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-38976-flow-route-shared-boot
Dec 1, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-38976-flow-route-shared-boot

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #38976
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:只改一份审批流程测试的启动方式,产品行为不变。
  • 为什么做:这份测试在繁忙的持续集成机器上偶尔超时,连累了好几个与它无关的合并请求排队失败。
  • 出错会怎样:最坏是这组测试之间互相影响而误报,只影响测试结果,可直接撤回。
  • 要你做什么:无。

What changes

packages/plugins/plugin-approvals/src/flow-route.integration.test.ts, the describe "[#38838] a fan-out to two approval steps is refused at publish" only: the kernel boot moves from inside each case (await boot() in cases 1, 2 and 4, afterEach shutdown) to one beforeAll(() => boot(), 30_000) with an afterAll shutdown. The now-unused afterEach import is dropped. The first case was paying a cold kernel.bootstrap() inside vitest's 5 s default and timed out on loaded CI shards (4,383 to 5,235 ms measured on CI). Asserted behaviour is unchanged.

Sharing is safe, checked by reading: each case saves under its own flow name (fan_out_active, fan_out_draft, fan_out_conditional) and reads back only that name; the two refusals write nothing; the engine case uses no kernel; the control's publish is the one write, and no other case reads that row.

The text of this describe is byte-identical to the same describe on PR #38970's branch (git diff origin/claude/issue-38875-conditioned-edge-pause-drop shows no hunk inside it), so merging main into #38970 after this lands is trivial.

Tests

Per-case timings, verbose reporter, shared box

Main (38ab473c3e), before:

  • active save refused: 964 ms
  • draft save refused: 71 ms
  • engine refuses to register: 3 ms
  • CONTROL conditional fan-out publishes: 167 ms

This branch, after (the boot now lands in beforeAll, outside every case's 5 s budget):

  • active save refused: 18 ms
  • draft save refused: 6 ms
  • engine refuses to register: 4 ms
  • CONTROL conditional fan-out publishes: 119 ms

Whole file: 24/24 passed before and after.

Package suite and typecheck
  • pnpm --filter @objectstack/plugin-approvals test: Test Files 144 passed (144), Tests 2275 passed (2275)
  • pnpm --filter @objectstack/plugin-approvals typecheck: check:test-typecheck: OK

Acceptance notes

  • Changeset: none. The test file is not in the package's files[] output. Built JS dist: 0 hits for the test's own strings, positive control ApprovalsServicePlugin 2 hits. Label skip-changeset.
  • The local plugin-approvals build's DTS step failed on @objectstack/spec/contracts declarations (a spec dist state on this shared box). It does not touch this diff and the JS emit used for the grep above succeeded.

Verification

Read first: the describe's beforeAll/afterAll block (the only hunk that carries risk).

Two-minute check: pnpm --filter @objectstack/plugin-approvals exec vitest run --reporter=verbose src/flow-route.integration.test.ts shows 24 passed, and the first #38838 case finishes in tens of milliseconds instead of about a second.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2

…rnel once

The first case paid a cold kernel.bootstrap() inside vitest's 5 s default
and timed out on loaded CI shards. One beforeAll(boot, 30_000) with an
afterAll shutdown; the cases share it safely (own flow names, refusals
write nothing, the control's row is read by no other case). Same shape as
this describe in PR #38970.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 50642891406cb88715b4ffa0c3626a4a3f14c80e → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

L1 ACCEPT · PR #39002 (#38976) · head ec2df9eac320e94be4e3701f7fe149872ecce384 · read 2026-12-01T21:07Z

席位核对 · ACCEPT

ACCEPT · repo:objectstack@os-justin · head ec2df9eac320e94be4e3701f7fe149872ecce384

  1. Shape. Draft, base main, Fixes #38976 first; branch matches the claim (7320000712, amended in place for this split at the filer's request 7323909818). One file, test only; skip-changeset (the built dist carries none of the test's strings).
  2. Premise measured. The "[approvals: a node fanning out to two approval steps opens two pending requests in one run, and the second has no suspension, so deciding it never moves the run #38838] … refused at publish" describe paid a cold kernel.bootstrap() inside each case; the first case timed out at vitest's 5 s default on loaded shards (4.4–4.8 s on CI today; it reddened or dequeued feat(data): one record lock read owned by the data layer (ADR-0162 D9) #38913, fix(metadata-protocol): the bare doc read of the environment's own entry carries the environment's envelope #38947, fix(formula)!: a flow condition's mixed bare / record. date arithmetic and record['FIELD'] index reads take the date-text verdicts #38949, feat(spec,rest): the record page payload answers the data lock read, so a record page learns a closed record in its one request #38999). Seat's own reading of the diff (+8/−5): one beforeAll(() => boot(), 30_000) and an afterAll shutdown replace per-case boot() and the afterEach; the unused import is dropped. Sharing is safe: each case saves and reads only its own flow name, the refusals write nothing, the one write (the control's publish) is read by no other case. Per-case timings: 964 → 18 ms (active refusal), 71 → 6, 3 → 4, 167 → 119. The describe's text is byte-identical to PR fix(spec)!: refuse a flow node that takes a branch which parks the run before its other out-edges #38970's branch, so that PR's later merge of main is clean there.
  3. Gates (check-runs at this head). 39 success · 25 expected skip · 0 failed; Lint & Repo Gates, TypeScript Type Check and Test Core (11/12) success. Dev's local: the file 24/24, plugin-approvals 144 files / 2,275 tests, typecheck OK. L2: none owed (test file only); the seat's own review — PASS.
  4. Accepted deviations. None.
  5. Out of scope. None.
  6. Landing. Not governed (check-governed-merges --pr 39002: 0 of 1 path, +8/−5); no narrowing. git merge-tree against current main clean. Ready + auto-merge now.

Clause-②: no · Metadata-protocol: none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin-approvals flow-route test: the first #38838 case times out at 5 s on loaded CI shards (cold kernel boot)

2 participants