get_vcs_added_files() in scripts/check_new_py_files.py builds absolute paths for the jj and hg backends with os.path.join, which inserts os.sep. On Windows that yields a mixed-separator path:
/workspace\src/google/adk/agents/_jj_agent.py
Every downstream comparison in the module uses forward slashes. The module already normalises at three other sites — lines 144, 151, 321 and 409 all call .replace(os.sep, '/'). The jj (line 215) and hg (line 225) branches are the two that missed it.
The git backend is unaffected because git emits forward slashes natively, which is why this is invisible in the common case.
Consequence: on Windows under jj or hg, newly added .py files are not matched, so the script reports nothing to check and silently passes.
Steps to Reproduce
Clone the repo on Windows and install dev dependencies.
Run the script's own test suite:
pytest tests/unittests/tools/... -k check_new_py_files
(the suite is test_check_new_py_files.py)
Observe the jj and hg cases fail on path-separator mismatch in the mock assertions.
Expected Behavior
Paths returned by get_vcs_added_files() use forward slashes for every VCS backend, so the downstream comparisons match — the same normalisation the module already applies elsewhere.
Observed Behavior
jj and hg return -separated paths on Windows, which never match, so added files go undetected.
test_check_new_py_files.py on Windows: 6 failed / 23 passed
Two of those six are this bug. The other four are separate problems and are not part of this report: one is symlink-privilege (WinError 1314) and two shell out to a POSIX sh forwarder.
Environment Details
ADK Library Version (pip show google-adk): N/A — the defect is in scripts/, not the
installed package; reproduced from a source checkout of main
Desktop OS: Windows 11 (Windows-11-10.0.26200-SP0)
Python Version (python -V): Python 3.13.15
Model Information
Are you using LiteLLM: N/A
Which model is being used: N/A
This is a repository tooling bug; no model is involved.
🟡 Optional Information
Regression
Unknown — the normalisation is present at the other four sites, so the jj/hg branches look like they were added later without it rather than having regressed.
Logs
Nothing is logged. The script exits successfully having found no added files, which is the failure mode: it does not error, it under-reports.
Additional Context
No workflow runs this suite on Windows, so nothing upstream could have caught it. This matches two Windows path bugs already fixed here — #6415 and #6419 (adk eval mis-handling Windows paths).
Minimal Reproduction Code
import os
what the jj branch does today, on Windows:
jj_root = "/workspace"
p = "src/google/adk/agents/_jj_agent.py"
print(os.path.join(jj_root, p))
-> /workspace\src/google/adk/agents/_jj_agent.py (mixed separators)
what every other site in the module does:
print(os.path.join(jj_root, p).replace(os.sep, "/"))
-> /workspace/src/google/adk/agents/_jj_agent.py
How often has this issue occurred?
Always (100%) — on Windows with jj or hg.
Suggested fix
Apply the module's existing normalisation to the two branches that lack it:
jj branch (line 215)
p = os.path.join(jj_root, p).replace(os.sep, '/')
hg branch (line 225)
os.path.join(hg_root, f.strip()).replace(os.sep, '/')
Five lines changed, two of them comments. Verified on Windows: 6 failed / 23 passed → 4 failed / 25 passed, with the remaining four being the unrelated problems noted above.
Patch: patches/adk-python/0001-fix-scripts-normalize-VCS-reported-paths-to-forward-.patch (applies cleanly to main as of 2026-09-06).
Happy to open a PR once the CLA is signed.
get_vcs_added_files() in scripts/check_new_py_files.py builds absolute paths for the jj and hg backends with os.path.join, which inserts os.sep. On Windows that yields a mixed-separator path:
/workspace\src/google/adk/agents/_jj_agent.py
Every downstream comparison in the module uses forward slashes. The module already normalises at three other sites — lines 144, 151, 321 and 409 all call .replace(os.sep, '/'). The jj (line 215) and hg (line 225) branches are the two that missed it.
The git backend is unaffected because git emits forward slashes natively, which is why this is invisible in the common case.
Consequence: on Windows under jj or hg, newly added .py files are not matched, so the script reports nothing to check and silently passes.
Steps to Reproduce
Clone the repo on Windows and install dev dependencies.
Run the script's own test suite:
pytest tests/unittests/tools/... -k check_new_py_files
(the suite is test_check_new_py_files.py)
Observe the jj and hg cases fail on path-separator mismatch in the mock assertions.
Expected Behavior
Paths returned by get_vcs_added_files() use forward slashes for every VCS backend, so the downstream comparisons match — the same normalisation the module already applies elsewhere.
Observed Behavior
jj and hg return -separated paths on Windows, which never match, so added files go undetected.
test_check_new_py_files.py on Windows: 6 failed / 23 passed
Two of those six are this bug. The other four are separate problems and are not part of this report: one is symlink-privilege (WinError 1314) and two shell out to a POSIX sh forwarder.
Environment Details
ADK Library Version (pip show google-adk): N/A — the defect is in scripts/, not the
installed package; reproduced from a source checkout of main
Desktop OS: Windows 11 (Windows-11-10.0.26200-SP0)
Python Version (python -V): Python 3.13.15
Model Information
Are you using LiteLLM: N/A
Which model is being used: N/A
This is a repository tooling bug; no model is involved.
🟡 Optional Information
Regression
Unknown — the normalisation is present at the other four sites, so the jj/hg branches look like they were added later without it rather than having regressed.
Logs
Nothing is logged. The script exits successfully having found no added files, which is the failure mode: it does not error, it under-reports.
Additional Context
No workflow runs this suite on Windows, so nothing upstream could have caught it. This matches two Windows path bugs already fixed here — #6415 and #6419 (adk eval mis-handling Windows paths).
Minimal Reproduction Code
import os
what the jj branch does today, on Windows:
jj_root = "/workspace"
p = "src/google/adk/agents/_jj_agent.py"
print(os.path.join(jj_root, p))
-> /workspace\src/google/adk/agents/_jj_agent.py (mixed separators)
what every other site in the module does:
print(os.path.join(jj_root, p).replace(os.sep, "/"))
-> /workspace/src/google/adk/agents/_jj_agent.py
How often has this issue occurred?
Always (100%) — on Windows with jj or hg.
Suggested fix
Apply the module's existing normalisation to the two branches that lack it:
jj branch (line 215)
p = os.path.join(jj_root, p).replace(os.sep, '/')
hg branch (line 225)
os.path.join(hg_root, f.strip()).replace(os.sep, '/')
Five lines changed, two of them comments. Verified on Windows: 6 failed / 23 passed → 4 failed / 25 passed, with the remaining four being the unrelated problems noted above.
Patch: patches/adk-python/0001-fix-scripts-normalize-VCS-reported-paths-to-forward-.patch (applies cleanly to main as of 2026-09-06).
Happy to open a PR once the CLA is signed.