Repository navigation
Commit 24351cf
test(app-shell): wait on the whole list in the report index suite's positive cases (#27128)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8SfRz7pGa2P99NAztqiusfy)_
Fixes #27116
Clause-②: no
Metadata-protocol: none
## 维护者速读
-
**改了什么**:只改一个测试文件:报表索引测试套件里所有「期望看到完整列表」的用例,改为等到整个列表出现再断言,而不是等到某一项出现就立即断言。
- **为什么改**:⌘K 面板里通过导航项出现的报表会先出现,导航外的报表要等报表列表返回后才出现;原用例等到 Gamma
就断言全部四项,CI 负载高时 Delta 还没到,导致合并队列里的 PR 被误踢出。
- **风险与回滚**:极低:只改测试,不改产品代码,不跳过、不重试、不调超时;回滚即还原本 PR 的一个提交。
- **先看**:`AppReportIndex.navGates-26892.test.tsx` 中「(f) CONTROL: offers
it, once, to a member granted that permission」一例,以及 `indexSettled`
上方的说明。
- **两分钟验证**:`pnpm --dir ui exec vitest run
packages/app-shell/src/views/__tests__/AppReportIndex.navGates-26892.test.tsx
--sequence.shuffle`,预期 18 个用例全绿。
- **需要你做的**:无,席位落地。
## What changes
Test-only, one file:
`ui/packages/app-shell/src/views/__tests__/AppReportIndex.navGates-26892.test.tsx`.
- **The race.** "(f) CONTROL: offers it, once, to a member granted that
permission" waited for Gamma, then asserted the full palette list
synchronously. The palette offers a nav-named report (Gamma) through its
navigation entry at once, and Delta (named by no entry) only once the
report list answers, so on a loaded shard the assertion ran with Delta
still missing (received Alpha, Beta, Gamma). It now waits on the full
list: `waitFor(() => expect(paletteReports()).toEqual(ALL))`.
- **Siblings audited.** Every case that expects a list now waits on that
list itself: the index's four positive controls (they waited for the
Gamma link, then read the list; safe today because the index renders its
list from one answer, changed so no case leans on that), and the
palette's "(e) CONTROL" (it waited for Delta through `paletteSettled`,
then read the list). The negative cases keep their settle-then-assert
shape: a negative is asserted after the lists have answered
(`indexSettled` / `paletteSettled` wait for Delta, which no gate hides),
and the permissions provider renders nothing before its answer, so no
later answer can add the hidden entry. A doc comment above
`indexSettled` says the settles serve the negatives only, and why.
- ⛔ No source change, no skip, no retry, no timeout change.
## Tests
The race was reproduced by a one-off mutation of the suite's adapter
double, through `scripts/ablation-replace.mjs`, which restores the file
and proves it matches HEAD each time:
- **Red, before the fix** (head `6817bf1e`): the report list answer
delayed 300 ms. Result: "(f) CONTROL: offers it, once, to a member
granted that permission" fails with Delta missing; the other 17 cases
pass.
- **Green, after the fix** (head `b24c61d8`): the same 300 ms delay
gives 18/18; report and dataset lists both delayed 600 ms gives 18/18;
plain run 18/18; `--sequence.shuffle` 18/18.
## Acceptance notes
- `origin/main` moved after the branch point (`6817bf1e` to `e6e41998`,
84 files), and none of them is this suite or the source it covers; the
branch is not merged with main for a test-only change, and CI runs the
PR's merge ref.
## Verification
Head `b24c61d8`, worktree from `origin/main` `6817bf1e`, after building
the `@object-ui/app-shell` dependency closure under the verify lock
(exit 0).
<details><summary>Type-check, lint</summary>
- `pnpm --filter @object-ui/app-shell type-check` (both `tsc --noEmit`
and `tsconfig.test.json`): exit 0.
- `pnpm --dir ui exec eslint` on the file: exit 0, no problems.
- `pnpm --dir ui run check:new-line-citations`: 0 new citations, exit 0.
</details>
<details><summary>Derived gates</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 24 commands; each ran with its exit
captured before any pipe (`pnpm --dir ui exec vitest run scripts/` under
the verify lock). `--ran` reconciliation: 24 derived, 24 run, 0
NOT-MEASURED, 0 UNRUN. Model tier: no path-derived mandate.
- `node scripts/check-closing-keyword-parity.mjs` exit 0
- `node scripts/check-closing-keyword-parity.mjs --self-test` exit 0
- `node scripts/check-comment-mask-corpus.mjs` exit 0
- `node scripts/check-sdui-manifest.mjs` exit 0
- `node scripts/check-sdui-manifest.mjs --self-test` exit 0
- `pnpm --filter @objectstack/spec run check:duration-unit-keys` exit 0
- `pnpm check:cross-package-test-inputs` exit 0
- `pnpm check:dispatcher-error-vocabulary` exit 0
- `pnpm check:driver-memory-census` exit 0
- `pnpm check:engine-double-contract` exit 0
- `pnpm check:gitlink-declared` exit 0
- `pnpm check:nul-bytes` exit 0
- `pnpm check:published-files` exit 0
- `pnpm check:query-options-erasure` exit 0
- `pnpm check:refd-timer-probe` exit 0
- `pnpm check:skill-identifier-liveness` exit 0
- `pnpm check:test-source-alias` exit 0
- `pnpm check:tier-file-adoption` exit 0
- `pnpm check:type-check-coverage` exit 0
- `pnpm check:type-check-debt` exit 0
- `pnpm check:undeclared-dep-imports` exit 0
- `pnpm check:watch-hint-literal` exit 0
- `pnpm check:where-matcher` exit 0
- `pnpm --dir ui exec vitest run scripts/` exit 0
</details>
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; eslint on the changed file: 0 problems.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. Nothing published changes (test-only, `@object-ui/app-shell` is
`private: true`): `skip-changeset`; both declaration lines are filled in
above.
- [x] 6. `packages/spec` not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01JQwxbZNdnTTr8WJsM98Mxh
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbZNdnTTr8WJsM98Mxh)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 753683a commit 24351cf
1 file changed
Lines changed: 14 additions & 13 deletions
File tree
- ui/packages/app-shell/src/views/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
211 | 218 | | |
212 | 219 | | |
213 | 220 | | |
| |||
237 | 244 | | |
238 | 245 | | |
239 | 246 | | |
240 | | - | |
241 | | - | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| |||
263 | 269 | | |
264 | 270 | | |
265 | 271 | | |
266 | | - | |
267 | | - | |
| 272 | + | |
268 | 273 | | |
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
272 | | - | |
273 | | - | |
| 277 | + | |
274 | 278 | | |
275 | 279 | | |
276 | 280 | | |
277 | 281 | | |
278 | 282 | | |
279 | | - | |
280 | | - | |
| 283 | + | |
281 | 284 | | |
282 | 285 | | |
283 | 286 | | |
| |||
299 | 302 | | |
300 | 303 | | |
301 | 304 | | |
302 | | - | |
303 | | - | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
358 | | - | |
359 | | - | |
| 360 | + | |
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| |||
0 commit comments