feat(orchestrator): hub requirements 066 to 082 and 084
Radio footer, rules page, schedules editor (System timers and Claude tasks through signed runner jobs), account usage bar, usage explorer with a streamed usage.jsonl, queue Controls tab and override, running tasks on the board, stale task prune with the generic dial, greyed card stamps, commit-tree diffs from the runner preview, VS Code path links, expired asks and decisions that stay as EXPIRED cards (asks keyed by a call digest; an async PostToolUse hook closes those answered in the terminal), the Match refresh hourglass, attachments by paste, drop and paperclip in every text field (page CSP gains img-src blob: for the thumbnails) and the limits board with profiles and a passkey to loosen. Fixes: one red accept on a red-gate commit and no release while a risk is open, the send bar footer segments share one height, the mic button survives a redraw, new Match cards queue before the release card. E2E specs were still running at commit time (operator order); their failures follow as separate fixes. 🎯 Fix: 88 % 💥 Break: 8 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 81 🚦 Gate: ⛔ fix 88 % < 90, break 8 % > 5 (committed on the operator's word) Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc0d578eca
commit
f356083a24
149 files changed
+10646
-963
No files matched your search
@@ -262,6 +262,11 @@ def consume(store: Path, key: str, expires: int, credential: str, count: int, no
|
||||
count: its signature counter; 0 when the authenticator keeps none.
|
||||
nonce: the payload nonce; one bulk signature carries one counter.
|
||||
now: the current time in epoch seconds.
|
||||
|
||||
An assertion the store accepted once (its nonce, credential and count
|
||||
under "seen" until expires) passes the counter check for its other
|
||||
items later too: a prune's apply job uses its approval at the deadline,
|
||||
after other signatures moved the counter on.
|
||||
"""
|
||||
store.parent.mkdir(mode=0o700, parents=True, exist_ok=True)
|
||||
descriptor = os.open(store.with_name(f"{store.name}.lock"), os.O_RDWR | os.O_CREAT, 0o600)
|
||||
@@ -271,14 +276,27 @@ def consume(store: Path, key: str, expires: int, credential: str, count: int, no
|
||||
used = {name: until for name, until in state["used"].items() if isinstance(until, int | float) and until > now}
|
||||
if key in used:
|
||||
raise Refused("this signature was already used for this item")
|
||||
seen, mark = live_seen(state.get("seen"), now), {"credential": credential, "count": count, "until": expires}
|
||||
last = state["counts"].get(credential)
|
||||
if last is not None and not (count > last["count"] or (count == last["count"] and (count == 0 or nonce == last["nonce"]))):
|
||||
fresh = last is None or count > last["count"] or (count == last["count"] and (count == 0 or nonce == last["nonce"]))
|
||||
if not fresh and seen.get(nonce) != mark:
|
||||
raise Refused("the signature counter did not grow: a cloned authenticator or a replay")
|
||||
write_private(store, {"used": {**used, key: expires}, "counts": {**state["counts"], credential: {"count": count, "nonce": nonce}}})
|
||||
counts = {**state["counts"], credential: {"count": count, "nonce": nonce}} if fresh else state["counts"]
|
||||
write_private(store, {"used": {**used, key: expires}, "counts": counts, "seen": {**seen, nonce: mark}})
|
||||
finally:
|
||||
os.close(descriptor)
|
||||
|
||||
|
||||
def live_seen(raw: object, now: float) -> dict[str, dict]:
|
||||
"""Returns:
|
||||
The "seen" entries of the replay store whose until lies after now;
|
||||
none for a store written before them.
|
||||
"""
|
||||
if not isinstance(raw, dict):
|
||||
return {}
|
||||
return {nonce: entry for nonce, entry in raw.items() if isinstance(entry, dict) and isinstance(entry.get("until"), int | float) and entry["until"] > now}
|
||||
|
||||
|
||||
def check(proof: object, item: dict, gate: str, trust: Trust, now: float) -> None:
|
||||
"""Args:
|
||||
proof: {"payload", "assertion"} the Agent Orchestrator relayed for the item.
|
||||
|
||||
Reference in new issue
Block a user