Repository navigation
feat(plugin-catalog): add degeneracy-guard - #141341
Merged
teknium1 merged 2 commits intoOct 20, 2026
Merged
Conversation
simin-yuan
marked this pull request as draft
October 19, 2026 04:29
simin-yuan
force-pushed
the
feat/plugin-catalog-degeneracy-guard
branch
from
October 19, 2026 08:18
d3d7814 to
6071c23
Compare
simin-yuan
marked this pull request as ready for review
October 19, 2026 08:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
plugin-catalog/degeneracy-guard.yamlfor https://github.com/simin-yuan/hermes-degeneracy-guard atffc28d0ab9ac6b6c0cbb118ed5fb0c06909a3dc1(version 1.3.0). I own the plugin repository.Core's
RunawayStreamWatchtruncates runaway text, and by design lets a provider-confirmed tool call through even when its arguments are repetition-dominated (agent/chat_completion_helpers.py: "a provider-confirmed call may legitimately write repetitive data"). That case is where a looping model can write its loop into a file or a command. The plugin covers it without overriding the core decision: content alone cannot show whether a repeat is intended, so instead of refusing,pre_tool_callreturns{"action": "approve", "rule_key": "degeneracy-guard:<tool>"}and Hermes' own approval gate asks the user. Denied or unanswered calls are refused (fail-closed, including cron and other unattended runs); "always" stops prompts for that tool;DEGENERACY_GUARD_ALLOW_TOOLSexempts tools entirely.Payloads that parse as data (JSON, tables, matrices, CSV and similar) are not questioned. The README reports measured numbers on two hold-out sets, including the cases it misses and the legitimate payloads that would still prompt.
Related Issue
None. This is a catalog entry proposal, not a fix; the review thread for it is this PR.
Type of Change
Changes Made
plugin-catalog/degeneracy-guard.yaml— new community entry, pinned toffc28d0ab9ac6b6c0cbb118ed5fb0c06909a3dc1, version1.3.0,requires_hermes: ">=0.22.2".contributors/emails/[email protected]— contributor email mapping, which the contributor check requires.Hooks used
pre_tool_call: request confirmation (the only way it affects a tool call)on_stream_delta: score streamed text incrementally and record an incident; cannot abort a streamtransform_llm_output: replace a flagged turn's output with a short noticepost_llm_call: clear per-turn statepre_llm_call: a note once a session passes 500 messages, then every 50State goes through
plugins.plugin_storage.plugin_data_dir.Disclosure (rule 13)
<HERMES_HOME>/plugin-data/degeneracy-guard/(profile-scoped; kept byhermes plugins updateandremove), orDEGENERACY_GUARD_HOMEwhen set.How to Test
hermes plugins validate --install-depsat the pinned sha: passes; security scansafe.hermes plugins doctor degeneracy-guard --ci:OK: runtime discovery, manifest parsing, import, and registration passed,0 tool(s), 5 hook(s).scripts/validate_plugin_catalog.py plugin-catalog/: OK.requires_hermes: ">=0.22.2": the plugin's tests, validate and doctor pass at the v0.22.2 tag and at current main.Checklist
Code
feat(plugin-catalog):,chore:)pytest tests/ -qand all tests pass — not claimed here: this PR is data only, and the suite on this machine has failures that reproduce identically on unmodified main (missing optional dependencies in a local venv). The catalog lane is covered by the commands under "How to Test".python scripts/checkpasses (the blocking lint and code-health checks CI runs) —python scripts/check --commit HEAD --base upstream/main: 12 checks, okscripts/validate_plugin_catalog.pyand the catalog tests CI runs.Documentation & Housekeeping
docs/, docstrings) — or N/A (N/A: the entry and the plugin README are the documentation for this plugin)cli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Changes since this PR was opened
The pin moved from 1.1.0 to 1.3.0. 1.1.0 refused legitimate repetitive writes (tables, JSON arrays, matrices); 1.3.0 asks the user through the approval gate instead of refusing, does not question payloads that parse as data, scores streams in linear time, uses relative imports, and gives every incident file a unique name. The second commit maps my contributor email.