mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-09-29 19:42:23 +02:00
Squash Odysseus development history
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Bounded automatic review queue for user-owned procedural memory."""
|
||||
import time
|
||||
|
||||
|
||||
def automatic_audit_candidates(skills, limit=8, now=None):
|
||||
"""Retry transient checks daily and failed repairs weekly, oldest first."""
|
||||
now = time.time() if now is None else now
|
||||
pending = []
|
||||
for skill in skills:
|
||||
if not skill.get("name") or skill.get("source") == "builtin" or skill.get("status") == "binned":
|
||||
continue
|
||||
verdict = skill.get("audit_verdict")
|
||||
if verdict in {"pass", "skipped"}:
|
||||
continue
|
||||
checked = float(skill.get("audited_at") or 0)
|
||||
delay = 7 * 86400 if verdict in {"fail", "needs_work"} else 86400
|
||||
if not verdict or now - checked >= delay:
|
||||
pending.append(skill)
|
||||
pending.sort(key=lambda skill: float(skill.get("audited_at") or 0))
|
||||
return pending[:max(1, limit)]
|
||||
Reference in New Issue
Block a user