go/docs
Snider 21c1a3e92b feat(rfc): Pass 4 Revisited — 4 deeper concurrency findings
Re-examined concurrency with full context from 13 passes.
Found races that P4 couldn't see:

P4-9:  status.json 51 read-modify-write sites with NO locking.
       spawnAgent goroutine vs status MCP tool vs drainOne vs shutdown
       — classic TOCTOU, status corruption in production.

P4-10: Fs.Write uses os.WriteFile (truncate+write, not atomic).
       Concurrent reader sees empty file during write window.
       Root cause of P4-9. Need WriteAtomic (temp+rename).

P4-11: Config map values shared by reference after Set.
       Goroutine mutates map retrieved from Config — unprotected.

P4-12: Global logger race — Default() may return nil before Core sets it.

P4-9 is likely causing real status corruption in production.
The 51 unprotected read-modify-write sites on status.json
explain workspace status inconsistencies.

108 findings total, 3,700+ lines.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-25 13:16:05 +00:00
..
pkg docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
plans docs: remove implemented plans, annotate partial ones 2026-03-14 08:09:20 +00:00
commands.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
configuration.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
errors.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
getting-started.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
index.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
lifecycle.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
messaging.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
primitives.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
RFC.md feat(rfc): Pass 4 Revisited — 4 deeper concurrency findings 2026-03-25 13:16:05 +00:00
services.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
subsystems.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
testing.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00