Skip to content

fix(sdk): share memory locks across backend worktrees - #2383

Merged
bradygaster merged 1 commit into
github:devfrom
omercangumus:omercangumus/2379-memory-backend-lock
Nov 4, 2026
Merged

bradygaster merged 1 commit into
github:devfrom
omercangumus:omercangumus/2379-memory-backend-lock

Conversation

@omercangumus

Copy link
Copy Markdown
Contributor

Summary\n- Route memory index locks through the configured state backend so worktrees sharing an orphan or two-layer ref contend on the same machine-local lock.\n- Keep the existing resolved .squad lock behavior for filesystem storage.\n- Add coverage for adapter-backed memory writes and linked-worktree lock identity.\n\nCloses #2379

Use the configured state ref for memory index locks so parallel checkouts cannot overwrite each other's updates.

Closes github#2379

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #2383

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 5
Files added 1
Files modified 4
Files deleted 0
Modules touched 3
Critical files 1

🎯 Risk Factors

  • 5 files changed (≤5 → LOW)
  • 3 modules touched (2-4 → MEDIUM)
  • Critical files touched: packages/squad-sdk/src/memory/index.ts

📦 Modules Affected

root (1 file)
  • .changeset/quiet-locks-follow-state.md
squad-sdk (2 files)
  • packages/squad-sdk/src/memory/index.ts
  • packages/squad-sdk/src/state-backend.ts
tests (2 files)
  • test/backend.test.ts
  • test/state-backend.test.ts

⚠️ Critical Files

  • packages/squad-sdk/src/memory/index.ts

This report is generated automatically for every PR. See #733 for details.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 4013ce4

PR Scope: 📦🔧 Mixed (product + infrastructure)

⚠️ 1 item(s) to address before review

Status Check Details
✅ Single commit 1 commit — clean history
✅ Not in draft Ready for review
✅ Branch up to date Up to date with dev
❌ Copilot review No Copilot review yet — it may still be processing
✅ Changeset present Changeset file found
✅ Scope clean No .squad/ or docs/proposals/ files
✅ No merge conflicts No merge conflicts
✅ Copilot threads resolved No Copilot review threads
✅ CI passing All checks passing

Files Changed (5 files, +55 −10)

File +/−
.changeset/quiet-locks-follow-state.md +5 −0
packages/squad-sdk/src/memory/index.ts +18 −9
packages/squad-sdk/src/state-backend.ts +6 −0
test/backend.test.ts +6 −1
test/state-backend.test.ts +20 −0

Total: +55 −10


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

@omercangumus
omercangumus marked this pull request as ready for review November 1, 2026 19:30
@bradygaster
bradygaster merged commit be57a5b into github:dev Nov 4, 2026
24 checks passed
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