Skip to content

fix: roll back failed skill activation - #17

Merged
lemarier merged 1 commit into
mainfrom
david/fix-skills-refresh
Sep 10, 2026
Merged

lemarier merged 1 commit into
mainfrom
david/fix-skills-refresh

Conversation

@lemarier

Copy link
Copy Markdown
Contributor

Change

A filesystem error during skills activation could leave dangling links in .agents/skills or .claude/skills. Remove links created by the failed attempt, keep the previous snapshot, and allow a clean retry. This adopts the fix from engineering #1.

Validation

All 29 bootstrap tests passed against this consumer script. Six injected failure cases cover discovery-link creation and snapshot switching during first install and update, including preservation of local skills and successful retry. just check passed 316 application tests, lint, type checks, record validation, site build, and two matching 35-file dataset builds.

Copilot AI lite review requested due to automatic review settings September 10, 2026 21:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T21:47:08.290429Z c2a9efa PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Rollback must also handle failures during stale-link cleanup.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Rolls back failed skill activation to remove partial links and preserve the previous snapshot.

Changes:

  • Tracks and removes links created during activation failures.
  • Preserves the previous cache pointer for clean retries.
File summaries
File Summary Review
.origin89/sync-engineering.py Adds activation rollback handling. Moderate issue: stale-link cleanup can fail after switching snapshots, leaving a dangling link and blocking retry.
Review details

Suppressed comments (1)

.origin89/sync-engineering.py:176

  • If rollback of one path raises, this loop exits and never attempts the remaining created entries, so a failure while removing one link can leave other newly created links (or next) dangling and mask the original activation error. Catch cleanup errors per entry, continue through the full list, and surface the original or combined failure only after all rollback attempts.
        for link in reversed(created):
            link.unlink()
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

created.append(link)
next_pointer.symlink_to(f"versions/{state['revision']}", target_is_directory=True)
created.append(next_pointer)
os.replace(next_pointer, cache / "current")
@lemarier
lemarier merged commit 03d7d8d into main Sep 10, 2026
3 checks passed
@lemarier
lemarier deleted the david/fix-skills-refresh branch September 10, 2026 21:50
@claude

claude Bot commented Sep 10, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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.

2 participants