Files
ai-memory/tests
mchlcs 96f26511a1 fix(hooks): url-encode bytes >= 0x80 on bash 3.2 (#877)
macOS /bin/sh is bash 3.2, which sign-extends bytes >= 0x80 in
printf "'c", so ai_memory_url_encode sent 0xC3 as %FFFFFFFFFFFFFFC3.
Any accented cwd, workspace or project name reached the server as a
different string.

Read the byte with %d and add 256 when it comes back negative. Adds a
test with an accented macOS path; with the existing UTF-8 test it fails
on macOS sh before the fix. All 254 non-NUL, non-newline single bytes
now match Python's urllib.parse.quote under dash and macOS sh.
2026-09-24 16:46:02 -04:00
..