`ce-polish` refuses a concurrent `start` with a context-free error, dropping the holder PID and the `EEXIST` cause
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
調査の方向性
skills/ce-polish/scripts/live-endpoint.js の acquireStartLock 周辺の903~918行と、2835行付近の main() におけるエラー処理を読む。state/start.lock に稼働中のPIDがある状態で拒否を再現し、エラーに保持者のPIDとロックパスを含めるよう更新して、捕捉した EEXIST を原因として保持する。CLIが保持者を特定し、エラーがその原因を保持していれば完了。
索引モデルが issue の本文から書いたものです。
説明
Environment
EveryInc/compound-engineering-pluginat commit122f9f90330df0b54da865e12cbecb81ffd0ae53skills/ce-polish/scripts/live-endpoint.js,acquireStartLocklines 903-918- Node.js 24, Windows/macOS/Linux
Summary
A second start for the same root is correctly refused while another live start holds state/start.lock, but the refusal is reported as the bare sentence Another \start` for this root is in progress. The catch block that detects the held lock throws a new Error: the EEXISTit caught (which carries the lock path) is not attached ascause, and the holder PID it has just read from the lock file is not included. main()prints onlyerror.message`, so nothing else reaches the operator.
The refusal itself is correct and documented. With several roots or agents running, the message does not say which process holds the lock, and stop --root does not clear state/start.lock.
Root cause
// skills/ce-polish/scripts/live-endpoint.js:903-918
function acquireStartLock(options) {
const lockPath = path.join(options.stateDir, "start.lock")
let lockFd
try {
lockFd = fs.openSync(lockPath, "wx", 0o600)
} catch (error) {
if (error.code !== "EEXIST") throw error
const holder = Number(fs.readFileSync(lockPath, "utf8")) || null
if (holder && processAlive(holder)) throw new Error("Another `start` for this root is in progress")
...
The replacement Error keeps neither error nor holder nor lockPath, although all three are available at the throw.
Affected code
skills/ce-polish/scripts/live-endpoint.js, line 911 (the throw inside acquireStartLock).
Reproduction
- Create a root with a
state/start.lockcontaining the PID of a live process (this is the state a runningstartleaves). - Run the documented command against that root:
node skills/ce-polish/scripts/live-endpoint.js start --root <root>
Observed on Node 24.21.0:
$ node skills/ce-polish/scripts/live-endpoint.js start --root <root>
Another `start` for this root is in progress
$ echo $?
1
The caught object is EEXIST: file already exists, open '<root>/state/start.lock' with code, syscall, errno and path; it is not reachable from the thrown error. The thrown error has only stack and message, and its own-property list is ["stack","message"] (no cause). The PID read at line 910 is discarded. A clean run without any instrumentation shows the same stderr and exit code.
A control that changes only line 911 to include the holder and the lock path and to pass { cause: error } prints Another \start` for this root is in progress (holder pid 28648, lock /state/start.lock)and exposes theEEXISTonerror.cause`.
Expected behavior
The refusal should keep its wording but also identify the blocking process, and the caught EEXIST should be chained as cause:
if (holder && processAlive(holder)) {
throw new Error(
`Another \`start\` for this root is in progress (holder pid ${holder}, lock ${lockPath})`,
{ cause: error },
)
}
Actual behavior
The thrown error contains only the generic sentence. The EEXIST details, the lock path and the holder PID are all dropped, and main() at line 2835 prints only error.message, so an operator cannot identify the process that holds the lock.
Suggested fix
Attach the holder and the cause as above. If terse CLI output is preferred, keep the short message but print error.cause (or error.stack) under a debug flag in main(), so the information remains available instead of being discarded at the boundary.
- 主要言語
- TypeScript
- スター
- 25.6k
- フォーク
- 2.1k
- 平均マージ
- 3時間 57分
- マージ済み PR(30日)
- 170
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
EveryInc/compound-engineering-plugin のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
EveryInc/compound-engineering-plugin#795 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 80/100
EveryInc/compound-engineering-plugin#2084 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
EveryInc/compound-engineering-plugin#2083 ·
メンテナーはふだん 1 日以内に返信
-
Host support: DeepSeek Harness (dsh)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
EveryInc/compound-engineering-plugin#2072 ·
メンテナーはふだん 1 日以内に返信
-
Respect a user policy of working on the default branch (ce-commit, ce-debug, ce-worktree, ce-test-browser, ce-dogfood)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 22/100
EveryInc/compound-engineering-plugin#2071 ·
メンテナーはふだん 1 日以内に返信
EveryInc/compound-engineering-plugin の issue をすべて見る
似ている issue
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
elastic/kibana#306401 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
agentes-chat/agentes-chat#927 ·
メンテナーはふだん 1 日以内に返信
-
comp/desktop P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#157702 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
redhat-developer/rhdh-plugin-export-overlays#4794 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信