Skip to content

Add atomic stack storage and migration primitives - #527

Draft
skarim wants to merge 2 commits into
skarim/worktrees-scoped-git-executionfrom
skarim/worktrees-atomic-storage
Draft

skarim wants to merge 2 commits into
skarim/worktrees-scoped-git-executionfrom
skarim/worktrees-atomic-storage

Conversation

@skarim

@skarim skarim commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Layer 2 of four extracted from #520, based on #526.

Adds atomic catalog publication with synced contents, permission preservation, staleness checks, and checksum refreshes. Short catalog locks remain distinct from operation-lock primitives for later coordination; current modify lock ownership is unchanged.

The conservative migration helper validates definitions and recovery records, journals original bytes, publishes the merged catalog, then backs up and archives originals. Interrupted attempts remain retryable. Migration is not activated: commands still use existing catalog locations. Only rebase/modify journal writers switch to stack.WriteAtomic; schemas and recovery paths are unchanged.

Windows replacement uses POSIX handle-rename semantics with a narrow unsupported-operation fallback. Deterministic held-reader and exclusive-collision tests supplement the unchanged visibility test.

Native vet, targeted/full race tests, and build pass. Windows stack tests cross-compile for 386/amd64/arm64; full 386 vet encounters a pre-existing unrelated test overflow. Windows runtime confirmation awaits native-stack CI; workflows remain unchanged.

@skarim
skarim added this pull request to stack #530 September 28, 2026 17:20

This branch has not been deployed

No deployments
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