Approval-policy authoring UI — make the t-138 4-eye system reachable #13
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The 4-eye approval pipeline (t-paliad-138) is shipped on the backend but dormant in production:
paliad.approval_policieshas 0 rows DB-wide because there is no UI to author policies. As a result, every Frist/Termin lifecycle event (create/edit/done/delete) bypasses the approval gate and the /approvals page is permanently empty. m hit this 2026-05-07 22:55: created a deadline expecting an approval request, got nothing.Backend that already exists
internal/services/approval_service.go— full lifecycle wiring (Request, Approve, Reject, Revoke, hard-delete on approved-delete).GET /api/projects/{id}/approval-policies— listPUT /api/projects/{id}/approval-policies/{entity_type}/{lifecycle}— setDELETE /api/projects/{id}/approval-policies/{entity_type}/{lifecycle}— clearpaliad.approval_policiestable:(id, project_id, entity_type, lifecycle_event, required_role, created_at, updated_at, created_by).docs/design-approvals-2026-05-06.md).What's missing
A frontend surface to author/edit/clear policies. Today an admin would have to
curlthe API. That's why no policy exists.Open design questions for the inventor pass
/admin/approval-policiesadmin page, or a Settings tab on each/projects/{id}page (so each project's lead can author its own policies), or both?paliad.partner_unit_eventsorproject_eventsrow so the change is auditable in /verlauf?DOGMA (paliad memory
paliad/dogma): surface open questions to m viaAskUserQuestionor PWA form per-question, sequentially — NOT as a markdown §X.Y dump. m's call on each is what locks the design.Locked constraints (m, 2026-05-07)
Deliverable:
docs/design-approval-policy-ui-2026-05-07.md. Inventor STOPs after design.NOT cronus per memory directive (paliad). NOT noether (parked on t-151). NOT godel (just fired). Pick a fresh inventor name.
t-paliad-154 implementation merged into main as
f820aa8, bundling 8 commits frommai/hilbert/inventor-approval-policy:bb03555— design doc (docs/design-approval-policy-ui-2026-05-07.md, 912 lines, 13 m-locked decisions)f7908f0— migration 062:paliad.approval_policiesunit-defaults schema +'none'sentinel + tree-walking resolver SQL function + 88-row unit-default seede92c56b— migration 062 extension:paliad.policy_audit_logtablee6067c7—ApprovalServicerewire: resolver delegation + scope-split CRUD + audit emission0f87d73— HTTP handlers: admin APIs + form-hint endpoint + audit-log union028423b—/admin/approval-policiesadmin page + admin-index card + CSS + i18n5df4285—/inboxempty-state nudge for admins + form-time hints on deadline/appointment new pagesHead-side review checks all green:
--color-*and--status-*(paliad's standard token system, no dark-mode contrast leaks).RAISE EXCEPTION, idempotent on re-run, validated viaBEGIN..ROLLBACKagainst live DB (88 unit seeds + 1 preserved project policy from earlier SQL hotfix).Production behavior on next deploy: migration 062 seeds 88 unit-default rows (one per
(partner_unit, entity_type, lifecycle_event)combination per design §1). The 4-eye gate flips from dormant to firm-wide-on. The hotfix policy I inserted earlier on Siemens AG (1530281c-60da-4415-a79d-c74e29c00cef— deadline.create requires partner) is preserved.Closing the loop on m's original frustration ("I add a deadline, /approvals shows nothing"): on the next paliad redeploy, every Frist creation will fire an approval request gated by the seeded unit defaults.