brd.md 1.08 KB

The graphlemon-node planner workflow completed. It produced a BRD for supervisor/deploy_stage.py's concurrent-deployment mutex.

Key finding: the gap-analysis doc's claim ("no mutex check") doesn't hold against current code — src/schema.py already has a ux_deployment_active partial unique index (from U-034) that atomically blocks concurrent non-terminal deployments, with INSERT happening before any destructive side effects. So the Planner narrowed scope to two real remaining gaps:

  1. G1 — stage_deployment() leaks a raw sqlite3.IntegrityError on conflict instead of a named, diagnostic exception (blocking deployment_id/status), inconsistent with the module's <Xxx>Error convention.
  2. G2 — tests only cover the finalized terminal-state allow-path; rolled_back and blocked_pending_human allow-paths lack explicit regression tests.

Plus G3: both unittest discover suites (src and supervisor) must stay green.

This was Planner-stage only (BRD artifact) — no code was changed. Awaiting direction on whether to continue the pipeline (PRD/SDD/Coder) or stop here.