Skip to content

Roll back skill links when sync activation fails partway #41

Description

@lemarier

sync-engineering.py activate replaces cache/current and then relinks skills without removing obsolete skill links first, and it can't roll back a partial failure. If a link creation or the pointer replacement fails partway, the consumer is left with a mix of old and new links and no restored state.

Found by an automated review of a vendored copy in lemarier/kitchen (PR #55, which ships the script byte-identical to this repository at c394158).

Expected: remove obsolete skill links before replacing the current pointer, tracking each removed link and its target. If a link creation or the pointer replacement fails, remove the links this attempt created and restore the removed ones before propagating the error. Add a test that injects a failure after the first link.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions