Repository navigation
Commit 202cc28
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
<details><summary>Per-case timings, verbose reporter, shared
box</summary>
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.
</details>
<details><summary>Package suite and typecheck</summary>
- `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`
</details>
## 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.com/claude-code)
https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 57657df commit 202cc28
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
792 | | - | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
793 | 799 | | |
794 | 800 | | |
795 | 801 | | |
| |||
815 | 821 | | |
816 | 822 | | |
817 | 823 | | |
818 | | - | |
819 | 824 | | |
820 | 825 | | |
821 | 826 | | |
| |||
829 | 834 | | |
830 | 835 | | |
831 | 836 | | |
832 | | - | |
833 | 837 | | |
834 | 838 | | |
835 | 839 | | |
| |||
846 | 850 | | |
847 | 851 | | |
848 | 852 | | |
849 | | - | |
850 | 853 | | |
851 | 854 | | |
852 | 855 | | |
| |||
0 commit comments