The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(curator): exclude disabled review candidates
KoNit-Ke5ea805363cc
diff --git a/agent/curator.py b/agent/curator.pyindex f46e16eed33..1b8d25bfdbc 100644--- a/agent/curator.py+++ b/agent/curator.py@@ -20,6 +20,7 @@ from pathlib import Pathfrom typing import Any, Callable, Dict, List, NamedTuple, Optional, Setfrom hermes_constants import get_hermes_home+from agent.skill_utils import get_disabled_skill_namesfrom tools import skill_usagefrom utils import atomic_json_write@@ -806,10 +807,16 @@ def _render_candidate_list() -> str:rewrite/umbrella pass. Listing them here invites ``skill_manage``writes that ``_background_review_write_guard`` unconditionallyrefuses, burning tool calls until the loop guard aborts the run.++ Skills in ``skills.disabled`` (global or platform list) are excluded for+ the same reason on the read side: ``skill_view`` — the pass's only read+ path — refuses them, so the fork retries the same refused read until+ the same-tool-failure halt ends the run with zero findings."""+ disabled = get_disabled_skill_names()rows = [r for r in skill_usage.curated_report()- if not skill_usage.is_bundled(r["name"])+ if not skill_usage.is_bundled(r["name"]) and r["name"] not in disabled]if not rows:return "No agent-created skills to review."diff --git a/tests/agent/test_curator.py b/tests/agent/test_curator.pyindex 3b008a5d11b..bb7b2efc002 100644--- a/tests/agent/test_curator.py+++ b/tests/agent/test_curator.py@@ -191,6 +191,43 @@ def test_candidate_list_marks_cron_referenced_skills(curator_env, monkeypatch):assert "cron=no" in plain_line+def test_candidate_list_excludes_disabled_skills(curator_env, monkeypatch):+ """The review fork must not be asked to inspect skills skill_view rejects."""+ c = curator_env["curator"]+ monkeypatch.setattr(c.skill_usage, "curated_report", lambda: [+ {"name": "global-disabled", "state": "active"},+ {"name": "platform-disabled", "state": "active"},+ {"name": "enabled", "state": "active"},+ ])+ monkeypatch.setattr(c, "_cron_referenced_skills", lambda: {"platform-disabled"})+ monkeypatch.setattr(+ c, "get_disabled_skill_names", lambda: {"global-disabled", "platform-disabled"},+ raising=False,+ )++ listing = c._render_candidate_list()++ assert "global-disabled" not in listing+ assert "platform-disabled" not in listing+ assert "enabled" in listing+++def test_candidate_list_keeps_candidates_when_disabled_resolution_fails(curator_env, monkeypatch):+ """Unreadable config must not make the curator silently skip all work."""+ c = curator_env["curator"]+ monkeypatch.setattr(c.skill_usage, "curated_report", lambda: [+ {"name": "enabled", "state": "active"},+ ])+ monkeypatch.setattr(c, "_cron_referenced_skills", lambda: set())++ def _broken_disabled_resolver():+ raise OSError("config unavailable")++ monkeypatch.setattr(c, "get_disabled_skill_names", _broken_disabled_resolver, raising=False)++ assert "enabled" in c._render_candidate_list()++def _write_cron_job(home: Path, skill_ref: str, monkeypatch):"""Write a real jobs.json referencing *skill_ref* and reload ``cron.jobs``.