feat!: Urutau 2.0.0, ultralight probes and a single analysis hub
CI / Format and vet (pull_request) Failing after 53s
CI / Dependency audit (pull_request) Successful in 33s
CI / Tests (Linux, race detector) (pull_request) Successful in 2m1s
CI / Docker images (build and smoke test) (pull_request) Failing after 47s

Each server runs an ultralight probe (scratch image, ~7 MiB RSS) that
tails the logs, ships raw lines to the hub over HTTPS with an on-disk
spool, and applies enforce decisions locally. The hub keeps one node per
probe (primary node = the 1.x data dir, unchanged), does all analysis and
serves the UI. Peer federation is removed. 'urutau import' brings 1.x
data dirs in with hash and count verification. UI: probes page, host
qualified incidents, IPs never wrap, egress heatmap labels, live and
replay globes no longer auto-rotate, replay repeat, live traffic metrics.

BREAKING CHANGE: URUTAU_PEERS, URUTAU_PEER_* and /api/v1/peer/* are gone;
log path variables move from the hub to the probe. See docs/migration-2.0.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5.5 committed 2026-11-15 22:14:50 -03:00
1 parent 23a7a5963a
commit 8546d14cef
130 files changed
+9396 -3311

No files matched your search

+4 -7
View File
@@ -23,7 +23,7 @@ func incRig(t *testing.T) http.Handler {
if err != nil {
t.Fatal(err)
}
return New(Options{Token: userTok, PeerTokens: []string{peerTok}, Version: "t", Store: st, Incidents: inc})
return New(Options{Token: userTok, Version: "t", Store: st, Incidents: inc})
}
func TestIncidentsEgressSuppression(t *testing.T) {
@@ -50,11 +50,11 @@ func TestIncidentsEgressSuppression(t *testing.T) {
f = m
}
}
if f == nil || f["ticket_id"] != "INC-1" || f["ticket_status"] != "open" || f["suppressed"] != false || d["suppressed_count"].(float64) != 0 {
if f == nil || f["ticket_id"] != "oracle/INC-1" || f["ticket_status"] != "open" || f["suppressed"] != false || d["suppressed_count"].(float64) != 0 {
t.Fatalf("annotated: %v", d)
}
// suppression needs false_positive/benign
if w := do(h, "GET", "/api/v1/incidents", cloneHdr(auth), nil); w.Code != 200 || !strings.Contains(w.Body.String(), `"INC-1"`) || strings.Contains(w.Body.String(), `"history"`) || !strings.Contains(w.Body.String(), `"comment_count"`) {
if w := do(h, "GET", "/api/v1/incidents", cloneHdr(auth), nil); w.Code != 200 || !strings.Contains(w.Body.String(), `"oracle/INC-1"`) || strings.Contains(w.Body.String(), `"history"`) || !strings.Contains(w.Body.String(), `"comment_count"`) {
t.Fatalf("list: %d %s", w.Code, w.Body)
}
if w := req(h, "PATCH", "/api/v1/incidents/INC-1", `{"suppress":true}`, auth); w.Code != 409 {
@@ -99,9 +99,6 @@ func TestIncidentsAPI(t *testing.T) {
if w := req(h, p[0], p[1], `{}`, nil); w.Code != 401 {
t.Errorf("%v no auth: %d", p, w.Code)
}
if w := req(h, p[0], p[1], `{}`, map[string]string{"Authorization": "Bearer " + peerTok}); w.Code != 403 {
t.Errorf("%v peer token: %d", p, w.Code)
}
}
cross := map[string]string{"Authorization": "Bearer " + userTok, "Sec-Fetch-Site": "cross-site"}
for _, p := range paths[2:5] {
@@ -115,7 +112,7 @@ func TestIncidentsAPI(t *testing.T) {
}
var tk map[string]any
json.Unmarshal(w.Body.Bytes(), &tk)
if tk["id"] != "INC-1" || tk["source"] != "manual" || tk["status"] != "open" {
if tk["id"] != "oracle/INC-1" || tk["source"] != "manual" || tk["status"] != "open" {
t.Fatalf("ticket: %v", tk)
}
bad := []struct{ m, p, b string }{