feat: Add duo_session_resumed audit event for DAP sessions

Relates to issue #585213 (closed)

Changes

This MR implements the missing duo_session_resumed audit event for Duo Agent Platform (DAP) sessions, providing full parity with other session lifecycle audit events.

Key Changes:

  1. Created Audit Event Type Definition (ee/config/audit_events/types/duo_session_resumed.yml)

    • New audit event type following the pattern from duo_session_started.yml
    • Configured with name duo_session_resumed and description "Duo session is resumed"
    • Set to save to database, stream events, and scope to Project
    • Referenced MR !216689 (merged) and milestone 18.8
  2. Updated Service Configuration (ee/app/services/ai/duo_workflows/update_workflow_status_service.rb)

    • Added 'resume' entry to AUDIT_EVENT_CONFIG hash
    • Configuration: 'resume' => { name: 'duo_session_resumed', message: 'Resumed Duo session' }
    • Audit event triggers automatically via existing audit_event_for_status_change method
  3. Updated Documentation (doc/user/compliance/audit_event_types.md)

    • Added new table row for duo_session_resumed in the Duo agent platform section
    • Includes link to MR !216689 (merged), description, database save status, GitLab version 18.8, and Project scope
    • Maintains alphabetical ordering within the section
  4. Added Comprehensive Test Coverage (ee/spec/services/ai/duo_workflows/update_workflow_status_service_spec.rb)

    • Test case for audit event creation when resuming a workflow
    • Verifies correct parameters: name, author, scope, target, and message
    • Error handling test to ensure workflow updates continue even when audit logging fails
    • Validates workflow status transitions correctly despite audit errors

The implementation maintains consistency with existing codebase patterns and provides the same level of audit tracking for resume events as other DAP session lifecycle events (start, finish, drop, stop).

Edited by Duo Developer

Merge request reports

Loading