Skip to content

fix: serialize Memory writes and provider recovery probes - #497

Merged
possiblyneal merged 2 commits into
mainfrom
fix/474-memory-write-locks
Nov 21, 2026
Merged

possiblyneal merged 2 commits into
mainfrom
fix/474-memory-write-locks

Conversation

@possiblyneal

Copy link
Copy Markdown
Owner

Intent

Closes #474

Serialize competing Memory mutations and allow only one in-flight recovery probe per provider operation.

Read first

  • src/state/memory-utils.ts — shared write lock.
  • src/functions/consolidate.ts — rechecks the predecessor after the provider call.
  • src/providers/circuit-breaker.ts and src/providers/resilient.ts — recovery probe ownership.

Decisions

  • The recovery interval controls when the first probe starts, not how long it may run. A pending probe retains ownership until its call settles.
  • Eviction logs image-release errors after deletion without dropping the count, audit, or graph cleanup.

Out of scope

Verified

  • Full local gate: build, generated hooks, skills, typecheck, tests, Recall, and pinned rules.

Not verified

  • No live provider or store was used.

Merge danger

Door: Two-way; no schema change or migration.

Blast radius: Memory write paths and provider recovery.

Recheck consolidation predecessors after provider calls and keep one\nprobe in flight until it settles. Preserve eviction bookkeeping after\na successful row deletion, even if image release fails.

Refs: #474
Generated-By: gpt-6.2-sol
@possiblyneal
possiblyneal merged commit c61897e into main Nov 21, 2026
3 checks passed
@possiblyneal
possiblyneal deleted the fix/474-memory-write-locks branch November 21, 2026 19:56
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.

Memory deletes, relate and evolve race remember, and a half-open breaker admits every caller

1 participant