Skip to content

feat(api): add administrative audit events endpoint - #156

Merged
Sam-24-dev merged 1 commit into
mainfrom
feat/api-audit-events
Sep 1, 2026
Merged

Sam-24-dev merged 1 commit into
mainfrom
feat/api-audit-events

Conversation

@Sam-24-dev

Copy link
Copy Markdown
Owner

Closes #155

Summary

  • Adds a read-only administrative Audit Events endpoint.
  • Scopes each response and cursor to the active, current administrative membership.
  • Keeps internal identifiers out of the public projection.

Changes

File Change
backend/api/audit_views.py Administrative audit-event list and signed pagination cursor
backend/api/urls.py Audit-events route
backend/api/tests.py Authorization, isolation, pagination, and privacy coverage

Test plan

  • manage.py check
  • manage.py makemigrations --check --dry-run
  • Full native MySQL suite: 334 main tests, 26 serial child tests, 14 expected skips
  • Confirmed temporary test database cleanup
  • git diff --check

Checklist

  • Linked approved issue
  • Exactly one type:feature label
  • Conventional commit
  • No Co-Authored-By trailer

Copilot AI lite review requested due to automatic review settings September 1, 2026 23:09
@Sam-24-dev Sam-24-dev added the type:feature New product feature label Sep 1, 2026
@Sam-24-dev
Sam-24-dev merged commit 3d2b666 into main Sep 1, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The endpoint, authorization semantics, session-bound pagination, and privacy projection align with the stated requirements and are backed by targeted tests.

Pull request overview

Adds a new read-only administrative API endpoint for listing durable workspace audit events, using session-bound signed cursors to support tenant-scoped, newest-first keyset pagination while keeping internal identifiers out of the public response.

Changes:

  • Introduces GET /api/v1/audit-events/ with administrative membership authorization and a session-bound signed cursor for pagination.
  • Adds the audit-events route to the v1 API URL configuration.
  • Adds comprehensive API tests covering authorization, tenant isolation, pagination/cursor binding, and projection/privacy constraints.
File summaries
File Description
backend/api/audit_views.py Implements the administrative audit-events list endpoint and session-bound signed cursor pagination.
backend/api/urls.py Registers the audit-events/ route in the API v1 URL patterns.
backend/api/tests.py Adds coverage for authz, isolation, pagination behavior, cursor binding/expiry, and response projection/privacy.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New product feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(api): add administrative audit events endpoint

2 participants