fix(troubleshoot): shorten test fixture paths for Windows MAX_PATH#1845
fix(troubleshoot): shorten test fixture paths for Windows MAX_PATH#1845MarinRzv wants to merge 3 commits into
Conversation
The plugin installs by git-cloning the whole repo into ~/.claude/plugins/; on Windows the checkout fails when a file's absolute path exceeds 260 chars. The troubleshoot test fixtures were the offenders (worst repo-relative path 203 chars; 175 paths >180). Shorten the per-scenario mock layout: fixtures/mocks/responses/<verbose>.json -> data/m/r/<sha1[:10]>.json and move the shared shim _shared/mock_template/mocks/ -> .../m/. Fixture filenames are now a 10-hex content hash (manifest 'file:' refs updated in lockstep; 'match:' keeps the real command/GUID). Worst path is now 138 chars. Updates the shim (RESPONSES_DIR), all 184 task.yaml sandbox blocks (path: data, mock_path_dirs: [m]), the scenario generator (emits data/m/r + hashed names), coverage_report.py, verify_manifest_commands.py, and CLAUDE.md. Verified: shim resolves fixtures end-to-end; 184 manifests / 1774 file-refs all resolve (1 pre-existing dangling ref in rpa-preflight-failure left untouched).
…-failure Two rules shared match 'or folders list --output json'; the first (first-match wins) pointed at or-folders-list-current-user-output-json.json, which never existed, so the command errored at runtime and shadowed the working rule. Remove the dead rule; the surviving rule resolves to 59305d0a92.json — the current-user folder listing containing the Personal workspace.
…rther Eliminate the per-package subfolder (word-activities/, database-activities/, ...): move all 164 activity scenarios flat under activity-packages/ and encode the package as a short prefix on the scenario name (db-, cv-, excel-, gsuite-, mail-, o365-, py-, sys-, uia-, web-, word-, classic-). Drops ~20 chars of directory nesting per path; worst repo-relative path 138 -> 121. Fix the _shared template path (depth shifts ../../../ -> ../../) in all 164 activity task.yamls; products/ scenarios keep ../../../. Update the generator (--group activity-packages + token-prefixed scenario name) and CLAUDE.md grouping docs. Verified: sandbox assembles, all 184 manifests / file-refs resolve, 0 collisions.
PR Review: fix(troubleshoot): shorten test fixture paths for Windows MAX_PATH
|
|
Claude finished @MarinRzv's task in 3m 20s —— View job Coder-eval task lint (advisory)184 task YAMLs changed (20 modified, 164 renamed); 0 Critical, 0 High, 0 Medium, 0 Low, 184 OK. Rubric: .claude/commands/lint-task.md. This check is advisory and never blocks merge. Evidence of passing run✅ Author confirms passing run: "Reconstructed a sandbox and ran the shim end-to-end — resolves fixtures, exit 0, .calls.jsonl written. All 184 manifests / 1,773 file: refs resolve; 0 hash collisions; 0 leftover old-structure dirs." Per-task lintAll 184 changed task YAMLs are verdict: OK. The changes are purely mechanical path adjustments — no test logic was altered:
All tasks follow the mandated troubleshoot pattern:
Sampled 9 tasks across all groups (activity-packages, products/orchestrator, products/integration-service, products/maestro, runtime-exceptions, cross-system) — all structurally identical and conformant. Within-PR duplicatesNo duplicate clusters detected. The 164 renamed activity-packages tasks share a YAML scaffold but each exercises a materially distinct failure scenario (different activity, different error, different root cause). This is template reuse, not duplication. Conclusion✅ All 184 changed tasks pass the rubric. Evidence of passing run confirmed. Changes are mechanical path shortening with no test logic modifications. |

Problem
Installing the UiPath plugin on Windows fails during checkout: Claude Code
git-clones the whole repo into ~/.claude/plugins/, and Windows rejects any
file whose absolute path exceeds MAX_PATH (260) without long-paths enabled.
The uipath-troubleshoot test fixtures were the offenders - worst repo-relative
path was 203 chars (175 paths >180), so with a typical ~80-90 char install
prefix they blew past 260 and broke the install.
Note: excluding tests/ from the npm "files" list does not help - the
marketplace clone brings the whole repo and fails at checkout, before any
packaging filter applies. The only fix is shorter paths in the repo.
Changes
Three commits, each independently reviewable:
Content-hash the fixtures + collapse the mock dir names.
fixtures/mocks/responses/.json -> data/m/r/<sha1[:10]>.json,
and the shared shim _shared/mock_template/mocks/ -> .../m/. Manifest
"file" refs rewritten in lockstep; "match" keeps the real commands/GUIDs.
Identical-content fixtures dedupe to one hash. Worst path 203 -> 138.
Fix a pre-existing dead manifest rule in cross-system/rpa-preflight-failure:
two rules shared match "or folders list --output json"; the first
(first-match wins) pointed at a fixture that never existed, erroring at
runtime and shadowing the working rule. Removed the dead rule - the survivor
resolves to the current-user folder listing (contains the Personal workspace).
Flatten the activity-packages/ tree. Drop the per-package subfolder
(word-activities/, database-activities/, ...); all 164 activity scenarios
now sit flat under activity-packages/ with the package encoded as a short
name prefix (db-, cv-, excel-, gsuite-, mail-, o365-, py-, sys-, uia-, web-,
word-, classic-). Fixes the _shared template path (../../../ -> ../../) in
the 164 activity task.yaml files. Worst path 138 -> 121.
Also updated: the scenario generator (generate_scenario.py - emits data/m/r/
plus hashed names, --group activity-packages + token-prefixed scenario name),
coverage_report.py, verify_manifest_commands.py, and the
tests/tasks/uipath-troubleshoot/CLAUDE.md authoring docs.
Result
Worst repo-relative path 203 -> 121. With a ~100-char Windows install prefix
that lands at ~221, comfortably under 260.
Verification
exit 0, .calls.jsonl written.
old-structure dirs.
Note
The test tree no longer mirrors the skill's
references/activity-packages/-activities/ playbook folders. This is
organizational only - nothing functional references the test scenario paths
(decision-tree resolution_ref/context point at the skill references/ tree,
which is untouched).