Ignore stale responses in loadStatus when status reads overlap
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- electron, javascript, react
- 領域
- frontend
調査の方向性
Start in src/renderer/hooks/use-site-status.jsx and read loadStatus to see where each response writes state, metaPatchRef and statusLoading. Then follow the callers: the focus reload in index.jsx, the build-end reload in use-site-scripts.jsx, and the site:status handler in main.js that reads meta before Git. Done means a counter in a ref lets only the latest call apply its result, and the setup chain in index.jsx no longer acts on a superseded response.
索引モデルが issue の本文から書いたものです。
説明
loadStatus in src/renderer/hooks/use-site-status.jsx applies every response it gets, in the order they come back. Two calls can overlap, for example the window-focus reload (index.jsx) and the reload a build's end triggers (use-site-scripts.jsx). If the older one finishes last, it puts back the state it read before the newer one.
What that can show:
buildFailed,installFailedorhasBuiltfrom before a build or install ended, so the setup checklist reads a failed build as complete, or the other way round.statusLoadingcleared by the older call while the newer one is still running.
site:status in main.js reads the site's meta before its Git reads, so an older call can read the meta before the outcome is written and still finish after the newer call.
Found by CodeRabbit on #716, which made buildFailed come from loadStatus like installFailed already does. It was deferred there because the race exists on trunk for the other fields too.
A likely fix: a request counter in a ref, applying the state, metaPatchRef and statusLoading only for the latest call. The callers that use the returned status (the setup chain in index.jsx) need checking too, so they don't act on a response that has been superseded.
- 主要言語
- JavaScript
- スター
- 66
- フォーク
- 20
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 22
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WordPress/contributor-toolkit のほかの issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
WordPress/contributor-toolkit#762 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
WordPress/contributor-toolkit#747 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
WordPress/contributor-toolkit#746 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
WordPress/contributor-toolkit#741 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
WordPress/contributor-toolkit#726 ·
メンテナーはふだん 1 日以内に返信
WordPress/contributor-toolkit の issue をすべて見る
似ている issue
-
from-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
andromarces/agent-loops#1928 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
laaielichter/AgentHaven#79 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/playwright#44109 ·
メンテナーはふだん 1 日以内に返信
-
Intl spec updatesオープンContent:JS goal: up-to-date needs BCD update
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信