Repository navigation
docs: agent concurrency audit — 8 findings (snapshot races, pod lifecycle, supervisor hardening) - #108
Merged
Conversation
…ifecycle) Eight findings from a code-inspection audit after the 12k-request zero-drop multi-restart e2e: snapshot lost-update race (R1) and aliased proto mutation (R2) as the high-severity items, plus pod-lifecycle and supervisor hardening notes. No fixes applied; suggested order of work included. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This was referenced Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Code-inspection concurrency audit of the agent, done after the extended hot-restart e2e (12,000/12,000 mesh requests, zero drops, across two surge rolls + one in-place ConfigMap restart; all nodes ended LIVE epoch 8 / generation 9). None of these fired during the e2e — all are inferred from code reading. Findings doc:
docs/proposals/002_agent-concurrency-audit.md.generateSnapshotlost-update: concurrent callers can publish a stale snapshot after a newer one (version order ≠ content order) — dropped listener removals / missing rotated SVIDs until the next trigger. Fix: serialize version+read+SetSnapshot under one mutex.RemoveEndpointmutatesloadAssignmentin place while the same proto is aliased into live snapshots being marshaled — torn reads,-raceviolation. Fix: rebuild/clone.LoadListenersFromStoragewholesale-replaceslocalWorkloads, wiping a concurrently added pod's netns→SPIFFE mapping (startup window) → pod presents node cert instead of its SVID. Fix: merge.RemovePod's unregister and storage removal → permanent ghost endpoint in the registry. Fix: storage-remove first.Bridge.client/ctxread/written unsynchronized;Started()already provides the happens-before — use it.hotRestart()on current epoch LIVE.Also documents the paths checked and found sound (supervisor channel discipline, refresher debounce, unsubscribe refcounting, etc.).
No code changes — findings only, with a suggested order of work (R1+R2 first, one small PR).
🤖 Generated with Claude Code