You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2][cli] CLI lock ownership with pid/host/nonce and safe --force #33
CLI advisory lock (src/cli/lock.ts) writes only a static sentinel. release() deletes any lock file regardless of owner. Two --force writers can both acquire; neither owns the lock exclusively.
Audit ID: Section 2 Med — Wave 2 Related: Kernel exclusive open lock (B4 issue)
Root cause
release(){rmSync(lockPath,{force: true});}
No pid/host/nonce in lock file; no verify on release.
release() — read and verify nonce matches; only then delete.
--force — check prior lock holder liveness (pid signal 0 / stale detection) before dropOwnLock; refuse if alive holder unless explicit force semantics documented.
Align format with kernel-level lock (B4) if shared constant extracted.
Tests
Acquire + release own lock → ok.
Simulate foreign lock content → release must not delete (or force path only).
--force on stale pid → succeeds.
Acceptance criteria
Lock ownership verified on release.
--force cannot leave two live writers thinking they hold lock.
Implemented and shipped in PR #43 (merge commit 69f7161), released as v0.2.0. The PR description's comma-separated Closes list only auto-closed the first reference — closing manually. For #39/#28-style partials: the shipped scope is done; the real-browser verification half of #39 continues under #10, and the typed-error contract (#28) shipped as LibreDbError with stable codes across kernel, adapters, lenses, and CLI.
Activity
feat: pre-announcement hardening across kernel, adapters, lenses, CLI…
cevheri commentedon Jul 3, 2026
Implemented and shipped in PR #43 (merge commit 69f7161), released as v0.2.0. The PR description's comma-separated Closes list only auto-closed the first reference — closing manually. For #39/#28-style partials: the shipped scope is done; the real-browser verification half of #39 continues under #10, and the typed-error contract (#28) shipped as LibreDbError with stable codes across kernel, adapters, lenses, and CLI.