fix(skills): background review fork respects pinned skills - #53226
Merged
Conversation
The autonomous self-improvement review fork could still write to a pinned skill — only external/bundled/hub-installed/protected-builtin skills were guarded. The curator skips pinned skills from every auto-transition; the review fork is the same kind of no-user-present actor and must too. Adds a pin check to _background_review_write_guard so background-origin edit/patch/delete/write_file/remove_file on a pinned skill are refused. Stricter than the foreground _pinned_guard (delete-only) by design: with no user in the loop there is no one to consent to an edit. Fixes #25839
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-assignment |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
✅ Fixed issues (2):
| Rule | Count |
|---|---|
unresolved-attribute |
2 |
First entries
run_agent.py:3002: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
Unchanged: 6037 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
pai-scaffolde
pushed a commit
to pai-scaffolde/hermes-agent
that referenced
this pull request
Jun 28, 2026
…rch#53226) The autonomous self-improvement review fork could still write to a pinned skill — only external/bundled/hub-installed/protected-builtin skills were guarded. The curator skips pinned skills from every auto-transition; the review fork is the same kind of no-user-present actor and must too. Adds a pin check to _background_review_write_guard so background-origin edit/patch/delete/write_file/remove_file on a pinned skill are refused. Stricter than the foreground _pinned_guard (delete-only) by design: with no user in the loop there is no one to consent to an edit. Fixes NousResearch#25839
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…rch#53226) The autonomous self-improvement review fork could still write to a pinned skill — only external/bundled/hub-installed/protected-builtin skills were guarded. The curator skips pinned skills from every auto-transition; the review fork is the same kind of no-user-present actor and must too. Adds a pin check to _background_review_write_guard so background-origin edit/patch/delete/write_file/remove_file on a pinned skill are refused. Stricter than the foreground _pinned_guard (delete-only) by design: with no user in the loop there is no one to consent to an edit. Fixes NousResearch#25839
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
…rch#53226) The autonomous self-improvement review fork could still write to a pinned skill — only external/bundled/hub-installed/protected-builtin skills were guarded. The curator skips pinned skills from every auto-transition; the review fork is the same kind of no-user-present actor and must too. Adds a pin check to _background_review_write_guard so background-origin edit/patch/delete/write_file/remove_file on a pinned skill are refused. Stricter than the foreground _pinned_guard (delete-only) by design: with no user in the loop there is no one to consent to an edit. Fixes NousResearch#25839
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…rch#53226) The autonomous self-improvement review fork could still write to a pinned skill — only external/bundled/hub-installed/protected-builtin skills were guarded. The curator skips pinned skills from every auto-transition; the review fork is the same kind of no-user-present actor and must too. Adds a pin check to _background_review_write_guard so background-origin edit/patch/delete/write_file/remove_file on a pinned skill are refused. Stricter than the foreground _pinned_guard (delete-only) by design: with no user in the loop there is no one to consent to an edit. Fixes NousResearch#25839
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…rch#53226) The autonomous self-improvement review fork could still write to a pinned skill — only external/bundled/hub-installed/protected-builtin skills were guarded. The curator skips pinned skills from every auto-transition; the review fork is the same kind of no-user-present actor and must too. Adds a pin check to _background_review_write_guard so background-origin edit/patch/delete/write_file/remove_file on a pinned skill are refused. Stricter than the foreground _pinned_guard (delete-only) by design: with no user in the loop there is no one to consent to an edit. Fixes NousResearch#25839
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…rch#53226) The autonomous self-improvement review fork could still write to a pinned skill — only external/bundled/hub-installed/protected-builtin skills were guarded. The curator skips pinned skills from every auto-transition; the review fork is the same kind of no-user-present actor and must too. Adds a pin check to _background_review_write_guard so background-origin edit/patch/delete/write_file/remove_file on a pinned skill are refused. Stricter than the foreground _pinned_guard (delete-only) by design: with no user in the loop there is no one to consent to an edit. Fixes NousResearch#25839
This was referenced Aug 19, 2026
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.
Summary
The background self-improvement review fork now respects pinned skills, matching the curator. Previously a user-pinned skill could still be edited by the autonomous review fork — the guard only blocked external / bundled / hub-installed / protected-builtin skills, not pinned agent-owned ones.
Root cause:
_background_review_write_guardintools/skill_manager_tool.pychecked ownership classes but never the pin flag. The curator skips pinned skills from every auto-transition; the review fork is the same kind of no-user-present actor and should too. This was the second concrete ask in #25839 (the first — stop forgingrole: "user"for review prompts — was already addressed: the review prompt is the fork's own user turn, gated by a memory/skills-only tool whitelist plus write-origin provenance).Changes
tools/skill_manager_tool.py: add a pin check to_background_review_write_guard, so background-originedit/patch/delete/write_file/remove_fileon a pinned skill are refused. Deliberately stricter than the foreground_pinned_guard(which only blocks delete) — with no user in the loop there is no one to consent to an edit.tests/tools/test_skill_manager_tool.py: background-review patch on a pinned skill is refused; an unpinned skill is NOT over-blocked.Validation
scripts/run_tests.sh tests/tools/test_skill_manager_tool.py tests/tools/test_skill_provenance.py→ 103/103 passing.Scope note: this addresses the pin-respect gap. The broader "gate all background-review skill writes behind approval" lever already exists as opt-in (
skills.write_approval, default off) — left as-is since flipping that default is a separate product decision.Reported by @xlionjuan (via their agent Kuri) in #25839.
Fixes #25839
Infographic