Add server subnet discovery store, API, and agent policy push.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 12:13:51 -07:00
parent 825bf81131
commit 1f63824199
13 changed files with 695 additions and 15 deletions

View File

@@ -93,6 +93,17 @@ func (f *FleetHandler) PostSpreadToHost(w http.ResponseWriter, r *http.Request)
lane.Lane,
)
_ = (&OathLedgerBridge{DB: f.db, Hub: f.ws}).Record(
AuthUsername(r), dbpkg.OathSpreadDiscoveredHost, seedID, "", dbpkg.OathOutcomeSuccess,
map[string]string{"host": req.Host, "finding": req.Finding, "join_lane": lane.Lane},
map[string]string{"host": req.Host, "finding": req.Finding},
)
if f.db != nil {
if row, err := f.db.MarkSubnetDiscoverySpreadAttempted(req.Host); err == nil && row != nil && f.ws != nil {
f.ws.BroadcastSubnetDiscoveryUpdate(*row)
}
}
writeJSON(w, map[string]interface{}{
"ok": true,
"host": req.Host,