Simplify codebase per audit of 0139564

This commit is contained in:
Ian Gulliver committed 2026-10-23 18:25:56 -07:00
1 parent 013956440d
commit 68ccff3f03
24 files changed
+122 -190

No files matched your search

+4 -5
View File
@@ -27,7 +27,6 @@ func (m *Manager) loadUsage() {
m.mu.Lock()
m.usageCommands = cmds
m.mu.Unlock()
go m.readCodexRateLimit()
for _, v := range []api.AgentSessionVendor{api.Claude, api.Codex, api.Antigravity} {
go m.readUsage(v)
}
@@ -67,9 +66,6 @@ func (m *Manager) SetUsageCommands(ctx context.Context, actor string, c api.Usag
m.store.Broadcast(api.Event{Kind: "admin.health", Actor: "byre", Payload: map[string]any{}})
for _, v := range changed {
if v == api.Codex && cmds[v] == "" {
go m.readCodexRateLimit()
}
go m.readUsage(v)
}
return nil
@@ -84,7 +80,10 @@ func (m *Manager) readUsage(vendor api.AgentSessionVendor) {
cmdline := m.usageCommands[vendor]
m.mu.Unlock()
if cmdline == "" {
if vendor == api.Antigravity {
switch vendor {
case api.Codex:
m.readCodexRateLimit()
case api.Antigravity:
m.readAgyRateLimit()
}
return