Environment
- lh-harness 0.1.7 (stock), Python 3.12, Windows 11
- Every
lh run bootstraps the ControlBus (cli.py:371) → the failure is unconditional, with or without --no-dashboard
What happens
The supervisor's control bus (supervisor/control_bus.py) relies on primitives that do not exist in Windows Python:
os.O_NOFOLLOW, os.O_DIRECTORY → absent (getattr(os, …, 0) returns 0 → the code raises OSError("secure control-bus path opening is unavailable")). Verified: 'O_NOFOLLOW' in dir(os) → False.
fcntl.flock → module absent on Windows.
openat / dir_fd directory walk → not available.
- Empirically,
os.open(dir, O_RDONLY) on a directory raises PermissionError on Windows (needs FILE_FLAG_BACKUP_SEMANTICS).
Result: lh-harness is entirely unusable on Windows — no run can start. The dependency spans 4 files (control_bus, service, state, manager), so a per-site patch is too risky; a centralized Windows shim is the correct shape.
Why it matters
Windows is a first-class dev/ops platform; as shipped, the harness has zero Windows support. We maintain a locally-pinned fork to work around this (see below), which means we cannot track upstream releases.
Local mitigation (workaround, not a fix)
A pinned venv ("venv-pr66") built from fork xing-kj PR #66 @ 53982af (owner-approved after full diff review) provides:
- A centralized shim intercepting
os.open + providing fcntl/flags/open-directory equivalents (file-locking layer).
- Job Object-based process-group management replacing
SIGTERM/SIGKILL/killpg/start_new_session (process/signal layer, in service.py/local.py/process_group.py).
All our green runs used this venv. It is a fork + local patch: any upstream upgrade requires re-doing both layers.
Ask
Port the Windows support upstream so stock releases run on Windows:
- Centralized shim for the file-locking layer (intercept
os.open, provide fcntl/O_NOFOLLOW/O_DIRECTORY/open-dir equivalents, handle FILE_FLAG_BACKUP_SEMANTICS for directory handles).
- Job Object–based process-group kill as the Windows backend for the signal/process layer (instead of
SIGTERM/SIGKILL/killpg/start_new_session).
- Document the supported-OS matrix and add a Windows CI job so this cannot silently regress.
Happy to share the pinned-venv diff (PR #66 @53982af) as a starting point if useful.
Environment
lh runbootstraps the ControlBus (cli.py:371) → the failure is unconditional, with or without--no-dashboardWhat happens
The supervisor's control bus (
supervisor/control_bus.py) relies on primitives that do not exist in Windows Python:os.O_NOFOLLOW,os.O_DIRECTORY→ absent (getattr(os, …, 0)returns 0 → the code raisesOSError("secure control-bus path opening is unavailable")). Verified:'O_NOFOLLOW' in dir(os)→False.fcntl.flock→ module absent on Windows.openat/dir_fddirectory walk → not available.os.open(dir, O_RDONLY)on a directory raisesPermissionErroron Windows (needsFILE_FLAG_BACKUP_SEMANTICS).Result: lh-harness is entirely unusable on Windows — no run can start. The dependency spans 4 files (
control_bus,service,state,manager), so a per-site patch is too risky; a centralized Windows shim is the correct shape.Why it matters
Windows is a first-class dev/ops platform; as shipped, the harness has zero Windows support. We maintain a locally-pinned fork to work around this (see below), which means we cannot track upstream releases.
Local mitigation (workaround, not a fix)
A pinned venv ("venv-pr66") built from fork
xing-kjPR #66 @53982af(owner-approved after full diff review) provides:os.open+ providingfcntl/flags/open-directory equivalents (file-locking layer).SIGTERM/SIGKILL/killpg/start_new_session(process/signal layer, inservice.py/local.py/process_group.py).All our green runs used this venv. It is a fork + local patch: any upstream upgrade requires re-doing both layers.
Ask
Port the Windows support upstream so stock releases run on Windows:
os.open, providefcntl/O_NOFOLLOW/O_DIRECTORY/open-dir equivalents, handleFILE_FLAG_BACKUP_SEMANTICSfor directory handles).SIGTERM/SIGKILL/killpg/start_new_session).Happy to share the pinned-venv diff (PR #66 @53982af) as a starting point if useful.