Description — what to implement and the why/impact.
Implement a nest interceptor that automatically records an immutable audit log entry for all sensitive administrative and financial state-changing endpoints in the API.
Context & Requirements — background, constraints, design references, edge cases;
As a Financial Operating System for autonomous agents, every privileged action (such as policy updates, key rotation, and fund transfers) must be traceable. The audit log must record the actor ID, IP address, user agent, timestamp, endpoint path, request payload hash, and response status.
Acceptance Criteria — a checklist of specific, testable conditions that define "done".
Implementation Guidance — likely files/modules to touch and a suggested approach.
- Likely files:
src/common/interceptors/audit.interceptor.ts, src/modules/audit/, prisma/schema.prisma.
- Ensure logging runs asynchronously so it does not block request completion.
Testing & Validation — how the contributor should prove it works.
- Run
npm test and verify audit interceptor tests.
- Confirm no sensitive secrets appear in simulated audit log outputs.
Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting.
Wave complexity: Medium
Description — what to implement and the why/impact.
Implement a nest interceptor that automatically records an immutable audit log entry for all sensitive administrative and financial state-changing endpoints in the API.
Context & Requirements — background, constraints, design references, edge cases;
As a Financial Operating System for autonomous agents, every privileged action (such as policy updates, key rotation, and fund transfers) must be traceable. The audit log must record the actor ID, IP address, user agent, timestamp, endpoint path, request payload hash, and response status.
Acceptance Criteria — a checklist of specific, testable conditions that define "done".
prisma/schema.prisma.@AuditLog()implemented and applied to sensitive controllers.Implementation Guidance — likely files/modules to touch and a suggested approach.
src/common/interceptors/audit.interceptor.ts,src/modules/audit/,prisma/schema.prisma.Testing & Validation — how the contributor should prove it works.
npm testand verify audit interceptor tests.Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting.
Wave complexity: Medium