Add adversarial L4 court chamber with Seer court_debate feed.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Prosecutor and Public Defender use real fleet telemetry only; Judge dispatches L4 commands and emits full transcripts via seer_events and emberwake_court_debate when ai_control_enabled.
This commit is contained in:
@@ -39,6 +39,27 @@ func wsDashboardToken(user, pass string) string {
|
||||
return base64.StdEncoding.EncodeToString([]byte(user + ":" + pass))
|
||||
}
|
||||
|
||||
func connectTestDashboard(t *testing.T, hub *WSHub) *websocket.Conn {
|
||||
t.Helper()
|
||||
resetWSAuthUsers(t, testAuthUser, testAuthPass)
|
||||
srv := httptest.NewServer(http.HandlerFunc(hub.HandleDashboardWS))
|
||||
t.Cleanup(srv.Close)
|
||||
wsURL := "ws" + strings.TrimPrefix(srv.URL, "http") + "?token=" + wsDashboardToken(testAuthUser, testAuthPass)
|
||||
conn, _, err := websocket.DefaultDialer.Dial(wsURL, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("dial dashboard: %v", err)
|
||||
}
|
||||
t.Cleanup(func() { _ = conn.Close() })
|
||||
var init Message
|
||||
if err := conn.ReadJSON(&init); err != nil {
|
||||
t.Fatalf("read init: %v", err)
|
||||
}
|
||||
if init.Type != "init" {
|
||||
t.Fatalf("expected init, got %q", init.Type)
|
||||
}
|
||||
return conn
|
||||
}
|
||||
|
||||
func dialAgentWS(t *testing.T, hub *WSHub) (*websocket.Conn, string) {
|
||||
t.Helper()
|
||||
srv := httptest.NewServer(http.HandlerFunc(hub.HandleAgentWS))
|
||||
|
||||
Reference in New Issue
Block a user