Skip to content

feat(observability): add uniform audit events for configuration mutations - #348

Merged
josephchimebuka merged 5 commits into
TevaLabs:mainfrom
Oyinkans0la12:feat/config-audit-events
Aug 5, 2026
Merged

feat(observability): add uniform audit events for configuration mutations#348
josephchimebuka merged 5 commits into
TevaLabs:mainfrom
Oyinkans0la12:feat/config-audit-events

Conversation

@Oyinkans0la12

Copy link
Copy Markdown
Contributor

Closes #291

Summary

Add standardized audit event emission for all configuration mutations, ensuring every admin setter and timelock operation produces a consistent, complete governance audit trail.

Problem

Configuration changes are not consistently observable across all mutation paths, making governance forensics and operational auditing more difficult. Some configuration updates may occur without emitting standardized events, resulting in incomplete historical records.

Solution

This PR introduces a uniform audit event schema and applies it across every configuration mutation path, including direct admin setters and timelock operations. Each configuration change now records both the previous and new values, ensuring every mutation is fully traceable.

Implementation Details

Configuration Audit Events

Added standardized audit event emission for all configuration mutators, including:

  • admin configuration setters
  • scheduled configuration updates
  • timelock execution/apply operations
  • timelock cancellation

Each mutation emits a consistent event describing the configuration change.

Event Schema

Standardized the event payload to include:

  • configuration key
  • previous value
  • new value
  • operation type
  • actor
  • ledger/transaction context (where available)

This provides a consistent event format across all configuration changes.

Timelock Coverage

Extended audit coverage to include the complete timelock lifecycle:

  • schedule
  • apply/execute
  • cancel

This ensures delayed governance actions are fully observable.

Testing

Added regression tests verifying:

  • every configuration mutator emits an audit event
  • previous and new values are correctly captured
  • timelock schedule/apply/cancel operations emit events
  • event schema remains consistent across all mutation paths

Documentation

Updated EVENT_SCHEMA to document:

  • audit event names
  • payload structure
  • emitted fields
  • lifecycle examples

Behavioral Changes

None.

This PR improves observability only and does not modify governance behavior or configuration semantics.

Benefits

  • Eliminates silent configuration changes.
  • Improves governance transparency.
  • Provides a complete audit trail for forensic analysis.
  • Establishes a consistent event contract for future configuration mutations.

Checklist

  • Audited all configuration mutation paths.
  • Added standardized audit events.
  • Covered timelock schedule/apply/cancel.
  • Added event coverage tests.
  • Updated EVENT_SCHEMA documentation.
  • No governance behavior changes.
  • Ready for review.

@josephchimebuka
josephchimebuka merged commit cad4242 into TevaLabs:main Aug 5, 2026
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.

Observability: old→new audit events for all config mutations

3 participants