• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

VolvoxLLC / volvox-bot / 22532716053

01 Mar 2026 12:55AM UTC coverage: 90.276% (-0.09%) from 90.365%
22532716053

push

github

web-flow
feat(audit): complete audit log system (#152)

* feat(audit): add audit_logs migration (015)

Create audit_logs table with columns for guild_id, user_id, action,
target_type, target_id, details (jsonb), ip_address, and created_at.
Add index on (guild_id, created_at DESC) for efficient querying.

Refs #123

* feat(audit): add audit log middleware

Non-blocking Express middleware that records all mutating requests
(POST/PUT/PATCH/DELETE) to audit_logs table. Captures user, action,
target, IP, and request body. Computes before/after config diffs for
config update operations. Fire-and-forget insert to avoid slowing
response times.

Refs #123

* feat(audit): add audit log API route

GET /api/v1/guilds/:id/audit-log with pagination (limit/offset) and
filters for action, userId, startDate, endDate. Rate-limited to 30
req/min. Requires guild admin auth.

Refs #123

* feat(audit): wire audit log into API router and config

Mount audit log route and middleware in the API router. Add 'auditLog'
to SAFE_CONFIG_KEYS for dashboard configurability. Add auditLog section
to config.json with enabled:true and retentionDays:90.

Refs #123

* feat(audit): add retention cleanup to scheduler

Purge audit log entries older than configured retentionDays every 6
hours (360th scheduler tick). Uses make_interval for safe parameterized
date arithmetic.

Refs #123

* feat(audit): add dashboard page, API proxy, and sidebar nav

Add audit log dashboard page with searchable table, action/user/date
filters, expandable detail rows, and pagination. Add Next.js API proxy
route. Add 'Audit Log' entry with ClipboardList icon to sidebar nav.

Refs #123

* test(audit): add audit log route and middleware tests

API route tests cover auth, pagination, filtering (action, userId,
date range), combined filters, 503 on missing DB, and 500 on DB error.
Middleware tests cover action derivation, config diff computation,
non-blocking behavior, response status gating, and enable/disable.

Refs #123

* ... (continued)

4439 of 5206 branches covered (85.27%)

Branch coverage included in aggregate %.

123 of 136 new or added lines in 4 files covered. (90.44%)

1 existing line in 1 file now uncovered.

7546 of 8070 relevant lines covered (93.51%)

50.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.02
/src/api/middleware/auditLog.js


Build SHA Not Found

The commit SHA "92e7a42f95379f717ce04ac04038beb0ef704bc0" was not found in your repository, so the file cannot be loaded. This may be because you posted from a local development environment, or your CI created an ephemeral commit.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc