Goal — REFACTOR_PLAN.md Step 10
Implement the access-request → approval → execution workflow. This is the heart of the Control Plane and the BRD's primary user-facing flow.
Scope
Domain
API
Audit
Secret-value entry
Acceptance criteria
- A developer can submit a request, an approver can approve it, and the resulting
sync_job is consumed by the agent and ends in succeeded
- DB scan after E2E: zero rows in any table contain the secret value
- Audit events show the full chain with a single
correlation_id
- Rejecting requires a comment
References
- BRD §12.2, §13 FR-01, FR-02, FR-10, §15, §17
- REFACTOR_PLAN §6 row 10
Dependencies
- Step 5 (storage), Step 7 (agents), Step 8 (job loop)
Goal — REFACTOR_PLAN.md Step 10
Implement the access-request → approval → execution workflow. This is the heart of the Control Plane and the BRD's primary user-facing flow.
Scope
Domain
pkg/workflow/state machine:Submitted → Pending → Approved | Rejected → Executed | Failedjustificationon every request (BRD §12.2)API
POST /api/v1/requests— developer submits update requestGET /api/v1/requests/GET /api/v1/requests/{id}— list/inspectPOST /api/v1/requests/{id}/approve/POST /.../reject— with commentsync_jobconsumed by the agent loop (Step 8)Audit
audit_eventsappend-only)correlation_idpropagated from request → approval → job → run → auditGET /api/v1/audit-eventswith filtering (resource, actor, action, since)Secret-value entry
Acceptance criteria
sync_jobis consumed by the agent and ends insucceededcorrelation_idReferences
Dependencies