Skip to content
edgesync Check-in [0577a01d66]
Login

Check-in [0577a01d66]

Overview
Comment:fix(leaf/notify): lock s.subs append/clear in Subscriber (#106)

Concurrent Subscribe/SubscribeThread callers raced on the unsynchronized append in subscribeReturn (and the iterate/clear in Unsubscribe), which the race detector flagged in downstream bones tests under -race -short.

Subscriber already had s.mu for dedup state — extending it to cover the subs slice is the cleanest fix. Unsubscribe snapshots the slice under the lock and iterates outside it so we never hold s.mu across NATS calls (the dispatch callback path takes s.mu via isDuplicate).

Adds a concurrent-Subscribe stress test that fires the race reliably under -race without the fix.

Closes #95

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0577a01d668b15136cb3a71b1805f807768737067639ecce945ab3ab9dfbd456
User & Date: [email protected] on 2026-05-04 16:44:33.000
Other Links: manifest | tags
Context
2026-05-04
16:50
chore(agents): scaffold ## Agent skills section + docs/agents/ (#107)

Adds the per-repo configuration that the engineering skills (triage, to-issues, to-prd, diagnose, tdd, improve-codebase-architecture) assume:

- Issue tracker mapping → docs/agents/issue-tracker.md (GitHub via gh CLI) - Triage label vocabulary → docs/agents/triage-labels.md (canonical names; needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix) - Domain doc layout → docs/agents/domain.md (single-context; ADRs live in docs/architecture/, no CONTEXT.md so skills fall back to CLAUDE.md + MEMORY.md)

CLAUDE.md gets an ## Agent skills block pointing at the three docs.

The four missing triage labels (needs-triage, needs-info, ready-for-agent, ready-for-human) were created on the GitHub repo at the same time. check-in: f894e896c1 user: [email protected] tags: trunk

16:44
fix(leaf/notify): lock s.subs append/clear in Subscriber (#106)

Concurrent Subscribe/SubscribeThread callers raced on the unsynchronized append in subscribeReturn (and the iterate/clear in Unsubscribe), which the race detector flagged in downstream bones tests under -race -short.

Subscriber already had s.mu for dedup state — extending it to cover the subs slice is the cleanest fix. Unsubscribe snapshots the slice under the lock and iterates outside it so we never hold s.mu across NATS calls (the dispatch callback path takes s.mu via isDuplicate).

Adds a concurrent-Subscribe stress test that fires the race reliably under -race without the fix.

Closes #95 check-in: 0577a01d66 user: [email protected] tags: trunk

2026-05-01
22:47
fix(leaf/notify): mutex-gate Watch teardown to prevent send-on-closed-channel panic (#101) check-in: 1fe42a59e7 user: [email protected] tags: trunk, leaf/v0.0.6
Changes