PH5.1 — Locks: every plan_lock type with checks, GET /locks, clear, expiry, E_LOCK_VIOLATED #33

Open
opened 2026-09-11 09:02:16 +00:00 by bart · 0 comments
Collaborator

Parent

Row PH5.1 in docs/12-implementation-plan.md (branch, owned paths and doc section are defined there).

What to build

All plan_lock types (pin, forbid, fix-time, rejection, …) are created through domain services with per-type validity checks, listed via GET /locks, cleared with a reason, expired by a worker job, and violations are reported by the validator (E_LOCK_VIOLATED).

Acceptance criteria

  • Each lock type has a creation check test (valid and invalid cases)
  • Expiry job clears expired locks with an audit row
  • Bad-plan fixture per lock type triggers E_LOCK_VIOLATED with the lock in params
  • /clear requires a reason and is audited

Blocked by

  • #20 — Plan orchestration: snapshot builder, result writer, solver_run/plan_version lifecycle, publish/supersede
  • #19 — Validator: one rule per E_/W_/I_ code over snapshot and result
## Parent Row **PH5.1** in `docs/12-implementation-plan.md` (branch, owned paths and doc section are defined there). ## What to build All `plan_lock` types (pin, forbid, fix-time, rejection, …) are created through domain services with per-type validity checks, listed via `GET /locks`, cleared with a reason, expired by a worker job, and violations are reported by the validator (`E_LOCK_VIOLATED`). ## Acceptance criteria - [ ] Each lock type has a creation check test (valid and invalid cases) - [ ] Expiry job clears expired locks with an audit row - [ ] Bad-plan fixture per lock type triggers `E_LOCK_VIOLATED` with the lock in params - [ ] `/clear` requires a reason and is audited ## Blocked by - #20 — Plan orchestration: snapshot builder, result writer, solver_run/plan_version lifecycle, publish/supersede - #19 — Validator: one rule per E_/W_/I_ code over snapshot and result
Sign in to join this conversation.
No labels
ready-for-agent
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
patrick/Polaris#33
No description provided.