Repository navigation
fix(host): let a peer's current GitHub login replace a stale one without a restart - #611
Merged
Merged
Conversation
…out a restart Why: apps/host/src/gateway.ts#function people | the directory's hosts[].github is re-announced by each host every heartbeat, so it must override logins remembered from peers' hellos Why: apps/host/src/peers.ts#function greet | a hello without github leaves the peer in unnamed, and discover re-asks it even with a directory chosen, until a login arrives
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.
Fixes #610. A teammate's Mac kept its owner's old GitHub login until this Mac's helper restarted, so People, the share list and message authors credited Sam as iamnbutler.
people()in gateway.ts now lets the directory'shosts[].githuboverride logins remembered from peers' hellos. Each host re-announces itself to the directory every heartbeat; a hello is asked only on connect, so the directory is the fresher source.greet()in peers.ts records a peer whose hello came back withoutgithub(a restarted helper answers beforeghresolves).discover()re-asks those peers every 15 s pass, also with a directory chosen, until one answers with a login. It keeps the old name in the meantime, so a plain restart doesn't blank names.team-roster) names every member frompeople(), so the online peers get the same answer as message authors and share lists. Before, they read the raw hello cache.Smoke: isolated loopback host on port 4771 from this lane.
team-rosterand thepeopleframe still name this host's owner (iamnbutler). I couldn't reproduce the two-peer case: loopback hosts don't find peers, and peers come only from Tailscale, one host per Mac. That path is reasoned from the code and not verified.Built in Ace
No. Built by Claude Code as a fix worker after the two-Mac pair study because the worker runs outside an Ace channel. Dogfooding gap tracked in #5.