Repository navigation
Description
The audit-skill-visibility script cannot read managed policy on the windows-2025 CI runner: its bash call to lib/managed-scope.sh exits 1, so the script reports managed scope as unreadable on every Windows host it runs on. This was found while adding Windows evidence for #3683 and has no owner or tracker yet. It comes from the 2026-09-29 audit follow-up of the Cursor agent run.
Evidence
test-windows dispatch on PR #5316's branch, run 36528002813, step "Test the skill-visibility audit on Windows" (bash plugins/claude-ops/skills/audit-skill-visibility/scripts/audit_skill_visibility.test.sh). Two failures, both AssertionError: 'unreadable' != 'read':
test_audit_skill_visibility.BudgetArithmeticTest.test_managed_policy_outranks_local_through_the_vendored_libtest_audit_skill_visibility.ReachabilityTest.test_managed_policy_false_outranks_local_true
The returned record was {'status': 'unreadable', 'lib': 'D:\\a\\claude-code-plugins\\claude-code-plugins\\plugins\\claude-ops\\lib\\managed-scope.sh', 'reason': 'bash exited 1 sourcing the lib: no stderr'}. The same tests pass on Linux. PR #5316 dropped the step from .github/workflows/test-windows.yml because the cause is outside .github/; the workflow comment names it (test-windows.yml, the audit_skill_visibility line).
Where
enumerate_managed_scope in plugins/claude-ops/skills/audit-skill-visibility/scripts/audit_skill_visibility.py runs subprocess.run(["bash", "-c", MANAGED_SCOPE_SHIM, "managed-scope", lib_path, ...]) with the library path as a native Windows path. The exit status is 1, not the shim's exit 3 for a failed source, and stderr is empty.
Hypotheses (not verified; no Windows host was used)
bashresolves toC:\Windows\System32\bash.exe(the WSL relay) instead of Git Bash, as in the closed repo-hygiene: destructive-guard PreToolUse hook inert on Windows — bash resolves to WSL relay, fail-open #992. The exec-form launcher work in Adopt exec-form hook rows fleet-wide once upstream #90495 is ruled out on Windows #3686 and check-hook-exec-form: no gate-legal way to name Git Bash on Windows, which blocks every bash exec-form row #3708 deals with the same resolution problem.- The backslash lib path is handled differently by
sourceunder Git Bash than a POSIX path.
Suggested next step
Reproduce on a Windows host or in a dispatch of test-windows: print the resolved bash path (where bash, command -v bash) and the shim's exit status per command. Then fix the resolution in enumerate_managed_scope.
Acceptance
- The two tests above pass on
windows-2025, and the stepTest the skill-visibility audit on Windowsis restored intest-windows.yml, or - the tests print a counted SKIP line on hosts where the cause cannot be fixed, with the reason recorded in the test.
Related: #3683 (host-skip evidence), #5316 (dropped step). Separate from the claude-ops plan item that removes the cygpath whole-suite skip in audit_skill_visibility.test.sh, which concerns the --installed contract, not managed scope.
Activity
ci: re-pin gitleaks composite, extend the Windows lane, wire unwired …
ci(windows): run the skill-visibility audit suite on windows-2025