Skip to content

feat: implement I.2 dynamic name assignment algorithm - #11

Merged
filmil merged 2 commits into
mainfrom
ai-dev-20260328-names-i2
Mar 28, 2026
Merged

feat: implement I.2 dynamic name assignment algorithm#11
filmil merged 2 commits into
mainfrom
ai-dev-20260328-names-i2

Conversation

@filmil

@filmil filmil commented Mar 28, 2026

Copy link
Copy Markdown
Owner

Summary of Changes

  • internal/names: Re-implemented the names pool to contain exactly 500 male and 500 female names per letter of the alphabet, loaded from an expanded 24,000+ line third_party/names/names.txt. Added names.GenerateForIndex(index int) so names can follow the alphabetical naming scheme based on the joining peer's index.
  • internal/paxos/cell.go: Updated ProposeMembership to return an explicit error and reject any agent membership proposals where the proposed ShortName is already taken by a different agentID in the cluster.
  • cmd/agent/main.go: Updated agent initialization flow. Before joining an existing cluster via --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

filmil added 2 commits March 28, 2026 08:51
- 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
@filmil
filmil merged commit 6cf9ace into main Mar 28, 2026
1 check failed
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