Start simple-deploy mining immediately after C2 auth.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Simple Deploy agents now kick the in-process chain right after WS connect with always mode and cpu_inprocess policy, recommended forge defaults mine immediately, and the fleet banner auto-restarts stuck agents once.
This commit is contained in:
AetherForge
2026-06-07 21:34:50 -07:00
parent 456988caaa
commit 9b2eafd583
9 changed files with 135 additions and 16 deletions

View File

@@ -806,6 +806,7 @@ func TestAgentNameUpdatesFromHostnameWhenDefault(t *testing.T) {
// TestMiningStatusRelayCoalescedToStatsBatch verifies mining_status / mining_fallback
// from agents are batched into a single stats_batch frame for dashboards.
func TestMiningStatusRelayCoalescedToStatsBatch(t *testing.T) {
t.Parallel()
resetWSAuthUsers(t, testAuthUser, testAuthPass)
database, err := db.New(t.TempDir())
if err != nil {
@@ -829,7 +830,7 @@ func TestMiningStatusRelayCoalescedToStatsBatch(t *testing.T) {
}
batchCh := make(chan batchResult, 1)
go func() {
_ = dashConn.SetReadDeadline(time.Now().Add(5 * time.Second))
_ = dashConn.SetReadDeadline(time.Now().Add(15 * time.Second))
for {
var msg Message
if err := dashConn.ReadJSON(&msg); err != nil {
@@ -923,7 +924,7 @@ func TestMiningStatusRelayCoalescedToStatsBatch(t *testing.T) {
if byAgent[agentB]["active_method"] != "container" {
t.Errorf("agent B active_method = %v", byAgent[agentB]["active_method"])
}
case <-time.After(2 * time.Second):
case <-time.After(5 * time.Second):
t.Fatal("timed out waiting for stats_batch relay")
}
}