fix(orchestrator): Tasks badge counts only open operator work

A console whose operator row is already done stays under Waits on Operator for reading and dismissing, but it is marked settled and no longer counts in the Tasks badge or the tab title. Live hub: 41 done and 14 failed undismissed results kept the badge at 50 with nothing left to do.

🎯 Fix: 95 %
💥 Break: 3 %
💸 Tokens: 100 %
⏱️ Velocity: 100 %
🛡️ Security: 100 %
🏆 Score: 92
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-17 19:56:03 +00:00
1 parent 8db5ec4956
commit 4c4a3ab227
4 files changed
+7 -6

No files matched your search

+2 -2
View File
@@ -19,7 +19,7 @@ SNOOZE_LIMIT = 8 * 86400
class Inbox:
def inbox(self, now: float, tasks: dict[str, dict], directory: Directory) -> list[dict]:
claims = read_claims(self.council)
base = {"agent": "", "to": "", "detail": "", "green": False, "gate": "", "score": "", "warnings": [], "options": [], "recommended": "", "command": "", "directory": "", "sha256": "", "runnable": False, "deniable": False, "job": None, "rule": None, "dry_run": None, "diff": None}
base = {"agent": "", "to": "", "detail": "", "green": False, "gate": "", "score": "", "warnings": [], "options": [], "recommended": "", "command": "", "directory": "", "sha256": "", "runnable": False, "deniable": False, "job": None, "rule": None, "dry_run": None, "diff": None, "settled": False}
items = []
for review in self.reviews.pending():
created = iso_epoch(review["created"]) or now
@@ -46,7 +46,7 @@ class Inbox:
listed = {row["task"] for row in rows}
for task, job in consoles.items():
if task not in listed:
fields = {"title": job["command"], "command": job["command"], "directory": job["directory"], "job": console_of(job)}
fields = {"title": job["command"], "command": job["command"], "directory": job["directory"], "job": console_of(job), "settled": True}
items.append({**base, "kind": "operator", "id": task, "ts": job["created_ts"], **fields})
items += self.request_items(base, now, claims)
for item in items:
+1 -1
View File
@@ -58,7 +58,7 @@ ENCODER_CSP = (
def badges(inbox: list[dict], claims: list[dict], jobs: list[dict], now: float) -> dict[str, int]:
return {
"tasks": sum(1 for item in inbox if not item["until"]),
"tasks": sum(1 for item in inbox if not item["until"] and not item["settled"]),
"agents": len({claim["agent"] for claim in claims if claim["beat"] is not None and claim["beat"] >= now - ACTIVE}),
"artifacts": sum(1 for job in jobs if job["status"] in JOB_OPEN),
}