Skip to content

docs: shared-checkout concurrency design spec#17

Merged
briansumma merged 2 commits into
developfrom
docs/concurrency-spec
Jun 23, 2026
Merged

docs: shared-checkout concurrency design spec#17
briansumma merged 2 commits into
developfrom
docs/concurrency-spec

Conversation

@briansumma

Copy link
Copy Markdown
Collaborator

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

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>
@briansumma briansumma force-pushed the docs/concurrency-spec branch from 0dab657 to cb32213 Compare June 23, 2026 18:37
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>
@briansumma briansumma merged commit bbbb61e into develop Jun 23, 2026
@briansumma briansumma deleted the docs/concurrency-spec branch June 23, 2026 23:12
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.

1 participant