Skip to content

A deleted backup wedges its swap-state entry permanently #119

Description

@tony

Summary

If a backup file is removed after a swap — tmpreaper, a manual clean, a wiped /tmprevert fails on that entry and leaves it in the state file. Every later revert fails the same way, forever. There is no subcommand to forget an entry, so the state file has to be edited by hand.

Reproduction

run use-local --repo "$PWD" --cli cursor --no-preflight
rm -f "$SB/.cursor/"*.bak.mcp-swap-*
run revert --cli cursor
run revert --cli cursor

Expected

A missing backup is unrecoverable, so say so once and drop the entry — or offer a way to drop it. The config is already in whatever state the swap left it; keeping the entry does not help anyone.

Actual

Both runs print the same line and exit non-zero. The entry is never cleared:

[cursor] backup missing: <sandbox>/.cursor/mcp.json.bak.mcp-swap-20260809204121

References

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions