feat: one agent per PC and tester: a new sign-in retires the PC's older agents #61
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!61
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:feat/one-agent-per-pc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The same app can't run twice on one data folder: the per-home lock holds, and I checked the Linux one across processes. But every fresh setup, reinstall or second copy of the app registers a new agent, because a new PC name means a new agent. So one PC shows as several testers:
A copy still running keeps polling as its own agent. Yeetbot90's first agent was still checking in after the second one registered.
What changed
machinein its capabilities,MachineId. That's 16 hex digits of SHA-256 ofbeanstalk-machine:and the system's own id (Windows' MachineGuid, Linux's/etc/machine-id), so it says nothing else. It's null when the system has none.agents.retire_others). They're matched by machine id, or, for an app that sends none, by OS, CPU model, GPU name and RAM; an unknown CPU never matches. A retired agent:retired_atandreplaced_by, andtoken_hashbecomesretired:<id>, so a copy still running is refused and stops;scheduler.give_back);docs/protocol.mddescribesmachineand the rule.Testing
tests/test_one_agent_per_pc.pycovers:MachineId.dotnet build agent/App -c Release: 0 warnings.