`ce-polish` refuses a concurrent `start` with a context-free error, dropping the holder PID and the `EEXIST` cause
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Read skills/ce-polish/scripts/live-endpoint.js around acquireStartLock lines 903–918 and the error handling in main() around line 2835. Reproduce the refusal with a live PID in state/start.lock, then update the error to include the holder PID and lock path and preserve the caught EEXIST as its cause. Done when the CLI identifies the holder and the error retains its cause.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 25.6k
- Forks
- 2.1k
- Avg merge
- 3h 57m
- Merged PRs (30d)
- 170
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EveryInc/compound-engineering-plugin
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
EveryInc/compound-engineering-plugin#795 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 80/100
EveryInc/compound-engineering-plugin#2084 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
EveryInc/compound-engineering-plugin#2083 ·
Maintainers usually reply within 1 day
-
Host support: DeepSeek Harness (dsh)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
EveryInc/compound-engineering-plugin#2072 ·
Maintainers usually reply within 1 day
-
Respect a user policy of working on the default branch (ce-commit, ce-debug, ce-worktree, ce-test-browser, ce-dogfood)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 5/5 Over a week Newbie friendliness 22/100
EveryInc/compound-engineering-plugin#2071 ·
Maintainers usually reply within 1 day
All issues in EveryInc/compound-engineering-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
hurttlocker/o8#6535 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
area: backend bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
snapotter-hq/SnapOtter#4856 ·
Maintainers usually reply within 1 day
-
bug follow-up
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spellshift/realm#2509 ·
Maintainers usually reply within 1 day