Skip to content

security: jsonstore Phase 2 — notifications RMW lock in scheduler + heartbeat#156

Merged
AVADSA25 merged 1 commit into
mainfrom
reaudit-phase2
May 29, 2026
Merged

security: jsonstore Phase 2 — notifications RMW lock in scheduler + heartbeat#156
AVADSA25 merged 1 commit into
mainfrom
reaudit-phase2

Conversation

@AVADSA25
Copy link
Copy Markdown
Owner

Fix #9 Phase 2. The dashboard + ask_user notifications writers already hold codec_jsonstore.file_lock across their read-modify-write (Fix #5 / B-11), but the codec-scheduler and codec-heartbeat daemons wrote notifications.json directly with no lock — racing/clobbering concurrent writes. Both now hold file_lock(notif_path) across the load→insert→write + use atomic_write_json. Every notifications.json writer is now serialized.

Tested: codec_scheduler._notify spy-asserts the flock is held + persists atomically; notification/state suites green (19); ruff clean.

🤖 Generated with Claude Code

…rtbeat (Fix #9 Phase 2)

The dashboard / ask_user notifications writers hold codec_jsonstore.file_lock
across their read-modify-write (Fix #5 / B-11), but the codec-scheduler and
codec-heartbeat daemons wrote notifications.json directly (load→insert→json.dump)
with no lock — so a scheduled-task or heartbeat-alert notification could clobber
a concurrent dashboard write (and vice-versa). Both now hold
file_lock(notif_path) across the whole RMW + use atomic_write_json. Every
notifications.json writer is now serialized.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@AVADSA25 AVADSA25 merged commit 4609c9c into main May 29, 2026
1 check passed
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.

2 participants