disclaw/tasks/DIS-007.md
Nick Tabeling 722d85c2a5
Some checks failed
CI / build-and-test (ubuntu-latest) (pull_request) Has been cancelled
CI / build-and-test (windows-latest) (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
chore: update task board — Phase 0 and Phase 1 marked done
All DIS-001 through DIS-110 set to status:done with merge dates.
BOARD.md reorganized with Done sections per phase.
Phase 1.5 Refinement epic added as planning placeholder.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 10:42:16 +02:00

1.3 KiB

id status phase priority labels branch assignee started pr merged
DIS-007 done 0 p1
phase:0
type:feat
priority:p1
phase-0/startup-lockfile claude-agent null null 2026-04-08

DIS-007: Lock-File gegen Doppelstart

Ziel

Zwei gleichzeitig laufende DisClaw-Instanzen auf derselben DB/Workspace-Root werden verhindert. Zweiter Start bricht mit klarer Fehlermeldung ab.

Kontext

docs/development-plan.md §7 (Risiko-Tabelle).

Scope

  • In: src/runtime/lockfile.ts: acquireLock(path) legt <workspaces_root>/.disclaw.lock mit PID + ISO-Timestamp an. Stale-Lock-Recovery via process.kill(pid, 0). · src/index.ts ruft acquireLock vor DB-Init auf · Graceful Shutdown löscht Lock
  • Out: Distributed Locking für Multi-Host

Definition of Done

  • Zweiter Startversuch bricht mit „DisClaw bereits aktiv (PID X)" ab
  • Stale-Lock (PID tot) wird automatisch übernommen
  • Unit-Test tests/unit/lockfile.test.ts mit tmp-Dir: Acquire, Doppel-Acquire, Stale-Recovery, Release
  • npm run build && npm test grün

Dateien (erwartet)

  • src/runtime/lockfile.ts
  • src/index.ts
  • tests/unit/lockfile.test.ts

Abhängigkeiten

Blockiert durch: DIS-001 (Lock liegt unter finalem workspaces_root).

Spec

docs/backlog.md #DIS-007