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
Commit 4474a16
Browse filesBrowse the repository at this point in the historyBrowse files
[feat.dirac.sigma.D9+] turn Program jobs into a visible delivery plan
A unique Work Item was technically governed but visually buried. Program now plans dates and dependencies once, renders the five-stage flow and a real Gantt, supports revision and movement without changing identity, and rejects impossible schedules or dependency cycles at both domain and PostgreSQL boundaries.
raisefailures.DiracInvalidParameters("Work Item dependencies must belong to the same Program")
746
+
ifstr(work_row["id"]) independency_ids:
747
+
raisefailures.DiracInvalidParameters("A Work Item cannot depend on itself")
748
+
ifdependency_ids:
749
+
cur.execute("WITH RECURSIVE ancestors(id) AS (SELECT unnest(%s::uuid[]) UNION SELECT edge.depends_on_work_item_id FROM design.program_work_item_dependency edge JOIN ancestors ON edge.work_item_id=ancestors.id) SELECT 1 FROM ancestors WHERE id=%s LIMIT 1", (dependency_ids, work_row["id"]))
750
+
ifcur.fetchone():
751
+
raisefailures.DiracInvalidParameters("Work Item dependencies must remain acyclic")
752
+
cur.execute("DELETE FROM design.program_work_item_dependency WHERE work_item_id=%s", (work_row["id"],))
753
+
fordependencyinitem["depends_on_refs"]:
726
754
cur.execute("INSERT INTO design.program_work_item_dependency(work_item_id,depends_on_work_item_id) VALUES (%s,%s) ON CONFLICT DO NOTHING",
727
755
(work_row["id"], dependency["id"]))
728
756
cur.execute("UPDATE design.program_work_item SET title=%s,current_package_id=%s WHERE id=%s",
cur.execute("SELECT id,gate_key::text AS key,revision,stage::text,title,criteria,status,evidence_summary,decision_id,target_date,assessed_at,supersedes_id,created_at,created_by_kind::text AS actor_kind,created_by_id AS actor_id FROM design.program_stage_gate WHERE program_id=%s ORDER BY created_at DESC", (identifier,))
cur.execute("SELECT id,work_item_id,work_key::text AS key,revision,title,description,status,priority,owner_kind::text,owner_id,due_on,deliverable_refs,supersedes_id,created_at,created_by_kind::text AS actor_kind,created_by_id AS actor_id FROM design.program_work_package WHERE program_id=%s ORDER BY created_at DESC", (identifier,))
1444
+
cur.execute("SELECT id,work_item_id,work_key::text AS key,revision,title,description,status,priority,owner_kind::text,owner_id,start_on,due_on,deliverable_refs,supersedes_id,created_at,created_by_kind::text AS actor_kind,created_by_id AS actor_id FROM design.program_work_package WHERE program_id=%s ORDER BY created_at DESC", (identifier,))
cur.execute("SELECT item.id,item.work_key::text AS key,item.title,item.current_lane::text AS lane,item.current_package_id,item.created_at,item.created_by_kind::text AS actor_kind,item.created_by_id AS actor_id,package.status,package.priority,package.owner_kind::text,package.owner_id,package.due_on FROM design.program_work_item item LEFT JOIN design.program_work_package package ON package.id=item.current_package_id WHERE item.program_id=%s ORDER BY item.created_at,item.work_key", (identifier,))
1452
+
cur.execute("SELECT item.id,item.work_key::text AS key,item.title,item.current_lane::text AS lane,item.current_package_id,item.created_at,item.created_by_kind::text AS actor_kind,item.created_by_id AS actor_id,package.status,package.priority,package.owner_kind::text,package.owner_id,package.start_on,package.due_on FROM design.program_work_item item LEFT JOIN design.program_work_package package ON package.id=item.current_package_id WHERE item.program_id=%s ORDER BY item.created_at,item.work_key", (identifier,))
0 commit comments