mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-24 16:54:43 +00:00
fix(P2-3): check [SKILL_PRUNED] marker directly in summary, not skill_view(name)
The P1 Skill Safety Rule only triggers on [SKILL_PRUNED]. Checking skill_view(name='...') in the LLM summary is insufficient — the LLM can mention a skill name without the canonical marker, causing the re-injection to be skipped while P1 remains inactive. Use the simpler and more correct check: '[SKILL_PRUNED]' not in summary. Fixes #32106.
This commit is contained in:
parent
57b0ac2b8d
commit
52341f6ca3
1 changed files with 4 additions and 4 deletions
|
|
@ -1691,10 +1691,10 @@ This compaction should PRIORITISE preserving all information related to the focu
|
|||
# Defensive: append canonical markers so the system Skill Safety Rule
|
||||
# can detect them. Fixes #32106 (Ghost Skill — summary loss).
|
||||
if _pruned_skill_names:
|
||||
_has_markers = all(
|
||||
f"skill_view(name='{sn}')" in summary for sn in _pruned_skill_names
|
||||
)
|
||||
if not _has_markers:
|
||||
# The P1 Skill Safety Rule only triggers on [SKILL_PRUNED].
|
||||
# Merely mentioning a skill name is not enough — the marker
|
||||
# must survive. Re-inject if the canonical marker is absent.
|
||||
if "[SKILL_PRUNED]" not in summary:
|
||||
_ps = []
|
||||
for sn in _pruned_skill_names:
|
||||
_ps.append(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue