feat(api): approvals + ECO workflow API (Phase 5) #145
Reference in New Issue
Block a user
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?
Implement the approvals/ECO workflow tables and API endpoints as specified in KC_SERVER.md Sections 3.3 and 4.3.
Depends on: #140 (database migration)
Supports: SILO_VIEWPORT Phase 7 (Approvals Viewer widget)
Overview
Approvals are server-authoritative -- they are created and managed through the web UI and API, not from .kc files. On .kc checkout, the current approval state is serialized into
silo/approvals.jsonfor offline display in Create.API Endpoints (Section 4.3)
GET/api/items/{pn}/approvalsPOST/api/items/{pn}/approvalsPOST/api/items/{pn}/approvals/{id}/signData Model
item_approvals: item_id, eco_number, state (draft/pending/approved/rejected), updated_at, updated_byapproval_signatures: approval_id FK, username, role, status (pending/approved/rejected), signed_at, commentBehavior
Implementation scope
internal/db/approvals.go-- repository (create ECO, list, get, sign, state transitions)internal/api/approval_handlers.go-- HTTP handlersAcceptance criteria
forbes referenced this issue2026-02-19 01:38:38 +00:00