Automattic / Automattic/wp-codebox
test: adaptive cancellation assertion races before partial transition
- 主要言語
- TypeScript
- スター
- 17
- フォーク
- 4
- 平均マージ
- 59分
- マージ済み PR(30日)
- 131
説明
## Problem
The full adaptive browser gate can deterministically fail the test `cancellation during a partially failed action retains bounded non-replayable evidence` because its fixed 250ms abort fires before any error transition is recorded.
## Reproduction
```bash
npm run test:browser-accessibility-oracles
```
Observed repeatedly on current `origin/main` plus PR #2099:
```text
✖ cancellation during a partially failed action retains bounded non-replayable evidence
AssertionError: assert(failed)
at tests/browser-adaptive-exploration.test.ts:444
```
The result is already `incomplete`/cancelled, but `result.transitions.find((transition) => transition.status === \"error\")` is undefined because cancellation wins the timing race before the intercepted repeat action reaches its expected partial failure.
## Expected
The test should synchronize cancellation to the intended in-flight action state instead of using a fixed wall delay, then assert bounded non-replayable evidence deterministically.
## Scope
Test synchronization only unless investigation shows runtime cancellation dropped an already-observed transition. Do not weaken the production evidence contract.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
tests/browser-adaptive-exploration.test.ts から始め、特に 444 行目付近の失敗している assertion を確認し、npm run test:browser-accessibility-oracles を実行して race を再現します。部分的に失敗したアクションとキャンセルのタイミングを追跡し、そのうえで、固定の 250ms の遅延ではなく、意図された実行中アクションの状態に合わせてキャンセルを同期します。bounded な non-replayable evidence assertion が本番の evidence contract を弱めることなく確実に成功すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 75/100