Files
codex/codex-rs
jif 90894a780d Prevent memory imports from racing with consolidation (#56462)
## Why

Concurrent imports and consolidation can modify the same memory workspace, leaving a partial import across memory versions or interfering with consolidation snapshots and baselines.

## What changed

- Add a cross-process workspace lock shared by memory imports and consolidation.
- Acquire locks for every import destination before modifying any workspace. Return a retryable busy error if a destination is locked, and skip consolidation when its workspace is busy.
- Hold locks through import completion even if the caller drops the future, and through consolidation agent termination and baseline finalization.

## Testing

Add an app-server integration test that blocks an active consolidation, verifies import rejection without partial writes or snapshot changes, then retries successfully and confirms imported resources remain visible to the next consolidation.

GitOrigin-RevId: c4ce945f916dcb4d75a3190ea869751fac51de83
2026-10-23 12:23:10 +00:00
..
…
…
…