Skip to content

feat(spike): add per-endpoint audit log for /api/spike mutations - #853

Merged
greatest0fallt1me merged 2 commits into
CalloraOrg:mainfrom
Babigdk:feat/732-spike-audit-log
Jul 27, 2026
Merged

feat(spike): add per-endpoint audit log for /api/spike mutations#853
greatest0fallt1me merged 2 commits into
CalloraOrg:mainfrom
Babigdk:feat/732-spike-audit-log

Conversation

@Babigdk

@Babigdk Babigdk commented Jul 27, 2026

Copy link
Copy Markdown

Add CRUD mutation endpoints (POST, PUT, DELETE) to /api/spike with audit logging. Each state-changing call persists a row to audit_logs with (actor, event, before/after) snapshots and forensic context.

  • POST /api/spike - create spike record (SPIKE_CREATE)
  • PUT /api/spike/:id - update spike record (SPIKE_UPDATE)
  • DELETE /api/spike/:id - delete spike record (SPIKE_DELETE)
  • GET /api/spike/records - list records (read-only, no audit)
  • Input validation at boundary with standardized error envelope
  • Best-effort audit writes (failure is logged, request succeeds)
  • Dependency injection for AuditService (testable)
  • Added focused unit tests with mocked AuditService
  • Updated integration tests for mutation endpoints
  • Added API documentation in docs/spike-audit-endpoints.md

Closes #732

Babigdk added 2 commits July 26, 2026 22:06
Add CRUD mutation endpoints (POST, PUT, DELETE) to /api/spike with
audit logging. Each state-changing call persists a row to audit_logs
with (actor, event, before/after) snapshots and forensic context.

- POST /api/spike - create spike record (SPIKE_CREATE)
- PUT /api/spike/:id - update spike record (SPIKE_UPDATE)
- DELETE /api/spike/:id - delete spike record (SPIKE_DELETE)
- GET /api/spike/records - list records (read-only, no audit)
- Input validation at boundary with standardized error envelope
- Best-effort audit writes (failure is logged, request succeeds)
- Dependency injection for AuditService (testable)
- Added focused unit tests with mocked AuditService
- Updated integration tests for mutation endpoints
- Added API documentation in docs/spike-audit-endpoints.md

Closes CalloraOrg#732
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@Babigdk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit 9f53c06 into CalloraOrg:main Jul 27, 2026
1 check failed
@Babigdk
Babigdk deleted the feat/732-spike-audit-log branch July 27, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add per-endpoint audit log for /api/spike mutations

2 participants