Skip to content

feat(audit): link config-change audit entries to their revision diff, with rollback from the log #18484

Open

Description

@mrveiss

Problem

Config history and the audit log are two unconnected stores. An audit entry for a settings change does not point at the ConfigRevision holding its before/after diff, so "who changed this and what exactly changed" needs two lookups joined by timestamp.

Method (from the reference work)

Each logged action carries the diff of every file it changed. The action-log viewer shows the diff inline and offers rollback from that entry, gated by its own permission.

Location

  • Revisions: autobot-backend/models/config_revision.py, services/config_revision_service.py. Writers: api/settings.py, api/settings_config.py, api/agent_config.py
  • Audit: autobot-backend/services/audit_logger.py AuditEntry.details. Viewer: autobot-frontend/src/views/AuditLogsView.vue

Change

  • Where a revision is created, the matching audit entry records revision_id in details.
  • The audit viewer renders the diff for such entries and offers rollback, which calls the fixed rollback path under the admin gate.

Acceptance criteria

  • Every config-changing route writes an audit entry whose details.revision_id resolves
  • Audit viewer shows the diff for those entries
  • Rollback from the audit view restores live config (depends on the rollback-apply fix)

Audited against origin/main @ df211d3ba6. Part of the server-admin patterns umbrella.


Research: docs/research/RES_server-admin-panel-patterns.md

Activity

  1. added
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 3, 2026
  2. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    needs-structure: this issue is missing:

    • a goal milestone M<n> - ...: none is set
    • a phase:M<n>.<k> label whose <n> matches the goal milestone: found none

    The label clears on the next issue event once all three are present (#19522).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: config-ssotWave 0 · cluster R — Config, paths & SSOTbackendenhancementNew feature or requestneeds-structureMissing goal milestone, matching phase label or native parent (#19522)priority: medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions