fix: bound POSIX installer lock waits - #414
jamilahmadzai wants to merge 3 commits into
Conversation
Prevent a wedged concurrent installer from blocking every later launcher indefinitely. Keep the generated POSIX copies in sync and add kernel-lock regression coverage.\n\nFixes monk-io#413
|
Independent fork CI is green on the current head |
|
Refreshed this PR against current main, preserving the newly added CI cases alongside the lock-deadline regression. All five local POSIX regression scripts pass, and the three shipped installer copies match. The current-head fork Install E2E run passes on Ubuntu, macOS, and Windows: https://github.com/jamilahmadzai/monk-plugin/actions/runs/34205983157. Ready for review; upstream fork-workflow approval may still be required. |
|
Follow-up after checking v0.1.64 and current main: the configurable 60-second lock-deadline implementation is now present byte-for-byte in all three POSIX installer copies, introduced by release commit 3880b41. Thanks for shipping the fix for #413. There is one test follow-through item: current main Install E2E passes Ubuntu and Windows but fails macOS in the new lock test with Since the production fix has shipped and this repository is generated output, could you port the portable regression fixture into the source generator, confirm how #413/#414 will be credited for the contest, and advise whether you would like this PR closed or retained for the test follow-up? I have left it open rather than duplicating the shipped runtime fix. |
Summary
Fixes #413.
A live but wedged POSIX installer currently leaves every later bootstrap blocked in bare
flock 3forever. Sinceensure-monk-agent.shruns from the plugin startup path, this can make all subsequent coding-agent sessions on the host appear hung.This change:
flock -w;MONK_AGENT_INSTALL_LOCK_TIMEOUTas a validated non-negative integer, allowing deterministic tests and operator tuning;Verification
The new regression first failed on unmodified v0.1.58: its five-second watchdog had to terminate
scripts/ensure-monk-agent.sh. After the patch, all three copies exit on the configured one-second deadline and emit the expected diagnostic. A deterministic release-before-deadline case also proves the installer acquires the released lock and returns the managed binary without using the network.Locally passed:
Additional checks:
sh -non all changed shell scriptsgit diff --checkensure-monk-agent.shcopiesBounty/product-use context
I installed official plugin v0.1.58 through the Monk Codex marketplace, started
monk-agent, authenticated the MCP server with the same GitHub-linked Monk account, initialized this repository as a workspace, and successfully calledmonk.project.analyze. The linked report is therefore based on a live installed product run, with a deterministic concurrency reproduction—not code reading alone.