lightcraft/docs
Brandon Thomas ee4b78f646 Issue #99: Library: exclusive lock so two processes can't open one library
Two processes on one library each kept their own catalog and seq counter;
the last snapshot silently dropped the other's edits.

- lightcraft_catalog:🔒 LibraryLock holds an exclusive OS lock
  (std File::try_lock: flock / LockFileEx) on <library>/catalog.lock for
  the session; who holds it goes to catalog.lock.owner (separate file: a
  Windows lock also blocks reads). Released on drop and by the OS when the
  process dies, so leftover files from a crash never lock anyone out. File
  systems without lock support open unprotected with a warning.
- Session::open_library takes the lock before reading anything and fails
  with EngineError::LibraryInUse ("this library is already open in
  LightCraft 0.x (process N on host)"); reopening the session's own
  library hands its lock over.
- lightcraft-cli (mcp/run/snapshot --library) adds how to drive the
  running app instead (--control + mcp --connect).
- Tests: in-process, leftover files, a killed child process, two engine
  sessions, CLI e2e (mcp --library holds it, run --library is refused).
  Existing tests that reopened a library while it was open now drop the
  first session.
- docs: parity row LRC-LIB-CATALOG-LOCK, mcp.md, web.md (no guard across
  browser tabs yet), whats-new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:48:34 -04:00
..
brand Licensing: MIT OR Apache-2.0 files, NOTICE, ArtCraft brand terms 2026-10-04 10:05:02 -04:00
images docs: README (MCP, CLI, export, status, contributing), AGENTS.md (asset enforcement, crash recovery, testing/perf), screenshots re-captured with Inter 2026-09-30 23:52:34 -04:00
showcase M1.4: crash-safe catalog persistence (op log + snapshot) 2026-09-30 23:40:40 -04:00
control-protocol.md Issue #78: GPU export: respect device limits, fall back to CPU on GPU errors 2026-10-05 05:06:24 -04:00
gpu-pipeline.md Issue #78: GPU export: respect device limits, fall back to CPU on GPU errors 2026-10-05 05:06:24 -04:00
mcp.md Issue #99: Library: exclusive lock so two processes can't open one library 2026-10-05 17:48:34 -04:00
merge.md Merge main (Photo Merge); M1.14b: stack merge results with their sources 2026-10-01 11:00:51 -04:00
parity.md Issue #99: Library: exclusive lock so two processes can't open one library 2026-10-05 17:48:34 -04:00
web.md Issue #99: Library: exclusive lock so two processes can't open one library 2026-10-05 17:48:34 -04:00
whats-new.md Issue #99: Library: exclusive lock so two processes can't open one library 2026-10-05 17:48:34 -04:00
xmp-interop.md Merge main into feat/copyright-status 2026-10-04 15:26:53 -04:00