Add ENAMETOOLONG reproduction test for cache recursion bug#30
Merged
jrenaldi79 merged 2 commits intomainfrom Mar 26, 2026
Merged
Add ENAMETOOLONG reproduction test for cache recursion bug#30jrenaldi79 merged 2 commits intomainfrom
jrenaldi79 merged 2 commits intomainfrom
Conversation
The marketplace.json plugin source used {"source": "github", "repo":
"jrenaldi79/harness-engineering"} which points back to the same repo that
hosts the marketplace. This caused Claude Code to recursively clone the repo
into its own cache directory (harness-engineering/1.0.0/harness-engineering/
1.0.0/...) until the path exceeded filesystem limits.
Fix: change the source to a relative path ("./") since the plugin lives at
the marketplace root. Also add self-referential source detection to the
marketplace schema test and a cache recursion check to the E2E install test.
https://claude.ai/code/session_01JQrEpoK2PjaQ55CTFkHxy6
Simulates Claude Code's plugin caching behavior to prove: 1. OLD config (self-referential GitHub source) creates recursive nesting that exceeds PATH_MAX and triggers ENAMETOOLONG on fs operations 2. NEW config (relative path "./") caches at a single level, well within filesystem limits https://claude.ai/code/session_01JQrEpoK2PjaQ55CTFkHxy6
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\n\n- Adds reproduction test (
plugin-cache-recursion.test.js) that simulates Claude Code's plugin caching to verify both the bug and the fix\n- OLD config (self-referential GitHub source): proves recursive nesting exceeds PATH_MAX and triggers ENAMETOOLONG on actual filesystem operations\n- NEW config (relative path\"./\"): proves single-level cache stays well within limits\n\n## Test plan\n\n- [x] 3 OLD-config tests reproduce the exact recursive nesting pattern users reported\n- [x] 4 NEW-config tests validate the fix prevents recursion\n- [x] Full suite: 234/234 tests pass\n\nhttps://claude.ai/code/session_01JQrEpoK2PjaQ55CTFkHxy6