Skip to content

[BUG] Undone actions are never persisted, allowing previously undone actions to reappear after restart #268

@Ridanshi

Description

@Ridanshi

Summary

The undo workflow tracks undone actions only in memory.

The SQLite undone column is never updated.

After restart, previously undone actions become undoable again.

Affected File

core/hybrid/action_logger.py

Root Cause

undo_last() updates only the in-memory _undone_ids set.

The SQLite record remains unchanged.

Server restarts therefore lose all knowledge of prior undo operations.

Reproduction

  1. Create several undoable actions.
  2. Undo one of them.
  3. Restart the server.
  4. Trigger undo again.
  5. Observe that the previously undone action becomes available again.

Expected Behavior

Undo state should survive restart.

Actual Behavior

Undo state exists only in memory.

Why This Is Difficult To Detect

Tests rarely simulate restart scenarios.

The issue only appears across process lifetimes.

Production Impact

  • Replay inconsistencies
  • Invalid undo history
  • State restoration failures
  • Persistence integrity issues

Severity

High

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions