feat(orchestrator): show token and commit rates in the header
rates.py folds the token, commit and score journals into per-hour and per-day rates for the header chips and the rates page; /api/rates drops from about 1950 ms to 380-830 ms on a year of data. Tests run once on unify/skills-20261114 after the merge (operator order 2026-11-14). 🎯 Fix: 75 % 💥 Break: 10 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 95 % 🏆 Score: 64 🚦 Gate: ⛔ fix 75 % < 90, break 10 % > 5; security 95 % < 100: ask the operator before the commit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a2a03995cb
commit
652bc817c1
28 files changed
+1449
-102
No files matched your search
@@ -36,7 +36,7 @@ from .register import (
|
||||
stored_order,
|
||||
)
|
||||
from .reviewing import review_row
|
||||
from .settings import media_origins, station_origins, valid_settings
|
||||
from .settings import completed, media_origins, station_origins, valid_settings
|
||||
from .signed import signing
|
||||
from .skill_scripts import OUTPUT_LIMIT
|
||||
from .tasks import queue_chain, queue_line, task_edges, task_rows
|
||||
@@ -206,7 +206,8 @@ class View:
|
||||
return {**settings, "streams": streams}, problems
|
||||
|
||||
def sign_settings(self, body: bytes) -> dict:
|
||||
return self.challenge_for(self.signed_changes(valid_settings(decode(body)), self.settings.get()))
|
||||
saved = self.settings.get()
|
||||
return self.challenge_for(self.signed_changes(valid_settings(completed(decode(body), saved)), saved))
|
||||
|
||||
def save_settings(self, body: bytes) -> dict:
|
||||
"""Returns:
|
||||
@@ -216,8 +217,8 @@ class View:
|
||||
"""
|
||||
payload = decode(body)
|
||||
proof = payload.pop("proof", None)
|
||||
settings = valid_settings(payload)
|
||||
saved = self.settings.get()
|
||||
settings = valid_settings(completed(payload, saved))
|
||||
for change in self.signed_changes(settings, saved):
|
||||
self.operator_proven(proof, change)
|
||||
resolved, problems = self.resolved(settings, saved)
|
||||
|
||||
Reference in new issue
Block a user