Skip to content

Add ENAMETOOLONG reproduction test for cache recursion bug#30

Merged
jrenaldi79 merged 2 commits intomainfrom
claude/debug-plugin-install-error-7o4LI
Mar 26, 2026
Merged

Add ENAMETOOLONG reproduction test for cache recursion bug#30
jrenaldi79 merged 2 commits intomainfrom
claude/debug-plugin-install-error-7o4LI

Conversation

@jrenaldi79
Copy link
Copy Markdown
Owner

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

claude added 2 commits March 26, 2026 09:49
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
@jrenaldi79 jrenaldi79 merged commit caf0f9b into main Mar 26, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants