Skip to content

fix: serialize feature-flag config writes to prevent concurrent races#10244

Merged
noanflaherty merged 1 commit into
mainfrom
swarm/f415/task-6
Feb 27, 2026
Merged

fix: serialize feature-flag config writes to prevent concurrent races#10244
noanflaherty merged 1 commit into
mainfrom
swarm/f415/task-6

Conversation

@noanflaherty
Copy link
Copy Markdown
Contributor

@noanflaherty noanflaherty commented Feb 27, 2026

Addresses review feedback on #10183:

The PATCH handler for feature flags performs a read-modify-write of config.json. Without serialization, concurrent PATCH requests (e.g. toggling multiple skills quickly from UI) could race and cause last-writer-wins, silently dropping flag changes.

This adds a promise-chain serializer (configWriteChain) that ensures each write completes before the next one begins. Input validation still runs concurrently — only the critical section (read-modify-write) is serialized.

Other review items (P1 transport host, P2 token preservation, P2 local HTTP fallback, P2 dotted skill IDs) were already addressed in direct pushes to the feature branch before it merged.


Open with Devin

Co-Authored-By: Claude <noreply@anthropic.com>
@noanflaherty noanflaherty self-assigned this Feb 27, 2026
@noanflaherty noanflaherty merged commit 97cb13d into main Feb 27, 2026
@noanflaherty noanflaherty deleted the swarm/f415/task-6 branch February 27, 2026 03:15
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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