Repository navigation
fix(octop): guard rglob with OSError in plugin manager fingerprint and skill upload - #2662
Closed
TrueFurina wants to merge 1 commit into
Closed
TrueFurina wants to merge 1 commit into
TrueFurina wants to merge 1 commit into
Conversation
…d upload Two Path.rglob() calls on plugin/skill directories that may pass is_dir() checks yet fail on Windows due to ACL restrictions, antivirus locks, or transient handles. 1. _channel_fingerprint(): recursively walks a plugin directory to compute a content hash. On OSError return a deterministic empty fingerprint (hash of nothing = e3b0c442...), so the plugin is treated as unchanged rather than crashing the plugin manager. 2. Plugin install skill upload loop: iterates skill_dir.rglob(*) to pack all skill files into the workspace upload pairs list. On OSError fall back to an empty list (no skill files to upload). Continues the Path.glob()/rglob() defensive sweep started in round 73.
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
Wrap two Path.rglob() calls in infra/agents/plugins/manager.py with try/except OSError. One file, one commit.
Changes
_channel_fingerprint() - rglob(*) on a plugin directory
Computes a SHA-256 hash of every file under the plugin dir to detect changes. Previously crashed if the plugin dir passed is_dir() but raised OSError during recursive traversal. Now returns the hash of an empty input (e3b0c442...) on failure, which means the plugin is treated as unchanged - a safe degradation.
Plugin install skill upload - rglob(*) on a skill directory
Iterates all files under a skill_dir to build the workspace upload pairs list (SKILL.md, references/, scripts/, etc.). Previously crashed during plugin install if a skill dir was unreadable. Now degrades to an empty pairs list on OSError; the skill install proceeds with whatever other data was already collected.
Pattern
Extends the round 73 glob/rglob sweep. Next targets: system_archive.py (backup pack + extract rglob), ollama_manager.py manifest rglob, setup.py chromium cache glob, and the harness fastmcp scaffold glob.