test(testing): build test-scan suite payloads without MSYS path conversion
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bash, git, shell
- Domain
- developer-experience, testing, tooling
Research direction
Start in plugins/testing/hooks/test-scan.test.sh: prefix each jq --arg path builder (payload(), bash_payload(), diff_of(), and the inline calls around lines 516, 522, 548, 607) with per-call MSYS_NO_PATHCONV=1 MSYS2_ARG_CONV_EXCL='*' as PR #6356 did, without exporting those variables. Leave the 297a19f13bd5fbd8 session-key oracle unchanged. Run bash plugins/testing/hooks/test-scan.test.sh on Windows Git Bash with native jq; treat remaining .file/.repo mismatches at the listed assertions as a follow-up if they still fail.
Written by the indexing model from the issue text.
Description
Summary
On Windows Git Bash with a native jq.exe, plugins/testing/hooks/test-scan.test.sh builds its hook payloads by passing POSIX paths to jq through --arg, and MSYS rewrites those arguments to Windows form. The hook then hashes a converted transcript_path against an unconverted CLAUDE_PROJECT_DIR, so the project-key checks cannot match their literal. This is the same fixture defect #6266 fixed for the test-judge suites; PR #6356 added the per-call MSYS_NO_PATHCONV=1 MSYS2_ARG_CONV_EXCL='*' prefix there but did not touch test-scan.test.sh, which carries no such prefix anywhere.
This is a test-fixture defect. Live sessions are unaffected for the reasons #6266 gives: Claude Code supplies drive-letter paths, which MSYS leaves alone.
plugins/testing/skills/audit/scripts/cant-fail-scan.test.sh was checked and is not affected: its only jq call (:1734) reads a file operand, where conversion is wanted. A full local run on Windows Git Bash passed 1195 of 1195.
Steps to reproduce
- On Windows Git Bash where
jqresolves to a native Windows binary, runbash plugins/testing/hooks/test-scan.test.sh. - Look at the
pkey:checks.
Not run this pass (see Evidence); the failure is derived from the code.
Expected
The pkey: checks pass, as they do on Linux: the record lands under sessions/297a19f13bd5fbd8/.
Actual (derived)
payload() passes TPATH=/nonexistent/transcripts/-proj/a.jsonl through --arg tp. MSYS converts it to a path under the Git install root (for example C:/Program Files/Git/nonexistent/transcripts/-proj/a.jsonl), while CLAUDE_PROJECT_DIR=/nonexistent/proj reaches the hook unconverted through the environment. testing::pkey hashes the mixed pair, so the key is not 297a19f13bd5fbd8 and the checks at :437, :439, :441 and :446 fail. :446 also passes PCWD=$P through --arg c, which is converted too.
Evidence (file:line, origin/main 9680bdaa1)
plugins/testing/hooks/test-scan.test.sh:135-141:payload()runsjq -cn --arg t ... --arg f "$2" ... --arg tp "$TPATH" --arg c "$PCWD"with no MSYS prefix.test-scan.test.sh:434-446:P=/nonexistent/proj,TP=/nonexistent/transcripts/-proj;CLAUDE_PROJECT_DIR=$Pis set as an environment prefix (not converted),TPATHandPCWDgo throughpayload()(converted). Assertions expect/sessions/297a19f13bd5fbd8/.plugins/testing/hooks/test-scan.sh:55-63reads.cwdand.transcript_pathraw from the payload, and:90callstesting::pkey "${CLAUDE_PROJECT_DIR:-$pcwd}" "$tpath".plugins/testing/hooks/scanner-run.sh:37-44:testing::pkeyhashes$1and the directory of$2with no path-form normalization.- Other
--argpath builders in the same file with no prefix:bash_payload():474(--arg tp,--arg c),diff_of():481(--arg f), and inline builders at:516,:522,:548,:607. - Likely second failure, inferred:
:378-379asserts.file == "$REPO/src/mixed.test.ts" and .repo == "$REPO"with$REPOundermktemp -d(a/c/...or/tmp/...path). The recorded.filecomes from the converted payload path, and.repofrom the git toplevel, which Git for Windows reports inC:/...form. The per-call prefix alone may not fix this one, becausetest-scan.sh:94itself passes--arg file "$FILE"to native jq; PR #6356's Related section names the same hook-side follow-up for the judge hooks. - Precedent for the fix: PR #6356 (
judge-test-helpers.sh,test-judge.test.sh,test-judge-start.test.sh), andlib/hook-utils.test.sh:393-399. - Not run: this suite was not executed on Windows this pass, so no failure count is measured. The mechanism rests on the code above and on the native
jq.exeestablished in #6266.
Suggested fix
Prefix each jq call in test-scan.test.sh that passes a filesystem path through --arg into a payload (payload(), bash_payload(), diff_of(), and the inline builders at :516, :522, :548, :607) with MSYS_NO_PATHCONV=1 MSYS2_ARG_CONV_EXCL='*', per call, as PR #6356 did. Do not export either variable; the node exec-bash.mjs calls at :159 and :503 need conversion. Leave the 297a19f13bd5fbd8 literal as the independent oracle. Then run the suite on Windows Git Bash and handle any remaining .file/.repo path-form mismatches at :378-379, :544 and :610 separately.
Related: #6266, PR #6356, #6135.
- Dominant language
- Shell
- Stars
- 22
- Forks
- 2
- Avg merge
- 5h 15m
- Merged PRs (30d)
- 833
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from melodic-software/claude-code-plugins
-
good first issue needs-triage priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
melodic-software/claude-code-plugins#6631 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
melodic-software/claude-code-plugins#6547 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
melodic-software/claude-code-plugins#6535 ·
Maintainers usually reply within 1 day
-
test_comment_census.py: SccArgv flag-shaped-filename test errors on Windows (#!/bin/sh scc shim)Opengood first issue needs-triage priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
melodic-software/claude-code-plugins#6532 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue needs-triage priority: low
Difficulty 1/5 Under an hour Newbie friendliness 88/100
melodic-software/claude-code-plugins#6386 · 1 comment ·
Maintainers usually reply within 1 day
All issues in melodic-software/claude-code-plugins
Similar issues
-
good first issue need help packaging
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
phonology024/babelscribe#23 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
influxdata/openapi#660 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
tornadoweb/tornado#3781 ·
Maintainers usually reply within 1 day