feat: implement I.2 dynamic name assignment algorithm - #11
Merged
Conversation
- Downloaded 24,000+ names from the SSA dataset, selecting exactly 500 male and 500 female names for each letter of the alphabet. - Added names.GenerateForIndex(index) to generate names alphabetically based on peer index (e.g. 'A' for peer 0, 'B' for peer 1). - Updated agent initialization to pull /_internal/peers prior to joining to assign an appropriate dynamic name. - Enforced short name uniqueness in Paxos Membership Proposals. If duplicate, agent automatically attempts to rejoin with a new name. This commit has been created by an automated coding assistant, with human supervision. Prompt: reread @ai/synod.spec.md and implement I.2
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 of Changes
third_party/names/names.txt. Addednames.GenerateForIndex(index int)so names can follow the alphabetical naming scheme based on the joining peer's index.ProposeMembershipto return an explicit error and reject any agent membership proposals where the proposedShortNameis already taken by a differentagentIDin the cluster.--peer, the agent now connects and downloads the size of_internal/peers, generating its short name beginning with the letter matching its calculated peer index. Features automatic retry logic if the cluster rejects the chosen name.This pull request has been created by an automated coding assistant,
with human supervision.
Prompt:
reread @ai/synod.spec.md and implement I.2