Skip to content

Add dirty target safety checks for root instruction shadows#31

Merged
sjquant merged 2 commits into
mainfrom
sjquant/root-instruction-shadow-ris-02
May 1, 2026
Merged

Add dirty target safety checks for root instruction shadows#31
sjquant merged 2 commits into
mainfrom
sjquant/root-instruction-shadow-ris-02

Conversation

@sjquant

@sjquant sjquant commented May 1, 2026

Copy link
Copy Markdown
Owner

Why

  • tracked root instruction shadows need safety checks before Skul creates or refreshes them
  • aborted refreshes must not advance the cached source or delete existing managed files before the safety guard runs

Changes

  • add git-index inspection for staged, unstaged, unmerged, missing-HEAD, and incompatible-flag target states
  • preflight root-instruction write targets before destructive refresh paths and keep a write-time guard as a backstop
  • preview materialization targets so update/apply/add can reject dirty tracked root instruction files before removals
  • rollback cached source updates when update aborts after a refresh attempt
  • add CLI and git-index regression coverage for refusal paths and update rollback behavior

@sjquant sjquant changed the base branch from sjquant/root-instruction-shadow-ris-01 to main May 1, 2026 07:48
@sjquant sjquant self-assigned this May 1, 2026
@sjquant sjquant force-pushed the sjquant/root-instruction-shadow-ris-02 branch from 2e44417 to 9c39d5d Compare May 1, 2026 08:17
@sjquant sjquant merged commit 49184ad into main May 1, 2026
@sjquant sjquant deleted the sjquant/root-instruction-shadow-ris-02 branch May 3, 2026 08:10
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.

1 participant