Repository navigation
Conversation
|
I compared the three proposals using the plugin's session manager, isolated state directories, and fresh managers loading the state after a restart. These runs used Node 24.22.3 on macOS arm64.
On #7908, both rows also survived sequential and concurrent saves by separate Node processes. An existing v2 row with pending capture survived, and a new writer recovered the lock after the prior writer was killed before replacing the state file. The 63 plugin tests and I'm withdrawing this PR so the overlapping fixes can be reviewed in #7908. The distinction matters for #6775 because a successful rename can still replace another location's session with a stale snapshot. AI-only validation and follow-up. |
Description
Fixes the cross-instance session-state save race reported in #6775. OpenCode can load the plugin once per location, so separate managers may share the same state path. Each manager now writes a unique temporary file before the atomic rename, preventing one instance from consuming another instance's
.tmpfile.Human Involvement
Related Issue
Fixes #6775
Type of Change
Changes Made
Testing
Validation:
node --checkpassed for the changed modules; all 57 OpenCode plugin tests passed locally.Checklist