docs: shared-checkout concurrency design spec#17
Merged
Conversation
Design for the Q1 gap left by the v1.0 Team Toolkit: make OpenWolf safe for multiple developers writing concurrently in one shared checkout. NDJSON buglog + propose-mode for shared markdown, sequenced as Phase 1 (lock the full read-modify-write + NDJSON buglog) and Phase 2 (propose-mode for cerebrum). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0dab657 to
cb32213
Compare
All 8 review points verified against the code and incorporated: - #1 nested lock: updateJSON now extracts _writeJSONUnsafe instead of calling writeJSON inside its own lock (avoids EEXIST retry + spurious unlocked warning). - #2 hooks boundary: NDJSON helper needs a self-contained copy in src/hooks/ (can't import src/buglog under tsconfig.hooks.json) plus the canonical CLI copy. - #3 stop.ts: added to the B4 table; nudge string match buglog.json -> buglog. - #4 _session.json RMW: post-write.ts and stop.ts session writes added to A2, with a documented semantic caveat for shared-checkout session conflation. - #5 logBug: noted as a 4th RMW site (CLI, unlocked); added B6 (lift withFileLock to a shared module if B3b locking is chosen). - #6 atomicity wording: single-write-syscall framing, not "POSIX atomic". - #7 testing: added concurrent append + read (torn final line) test. - #8 TOCTOU: documented the staleness-storm bound. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design spec for the next milestone — making OpenWolf safe for multiple developers writing concurrently in one shared checkout (the Q1 gap from the readiness audit). NDJSON buglog + propose-mode for shared markdown, sequenced as Phase 1 (lock the full read-modify-write + NDJSON) and Phase 2 (propose-mode for cerebrum). Design only; no code. Phase 1 implementation plan to follow.
🤖 Generated with Claude Code