Windows: msys path-conversion mangles leading-slash SSM param names #156

Open
opened 2026-05-29 15:16:17 +00:00 by coilysiren · 0 comments
Owner

Problem

On the Windows tower, running Windows-native coily.exe from an msys/git-bash shell, any argument that looks like a POSIX absolute path gets rewritten by msys path-conversion before it reaches coily/AWS. This silently mangles leading-slash SSM parameter names.

Observed:

  • coily ops aws ssm get-parameter --name /coilysiren/netlify/token -> ParameterNotFound (the leading slash is stripped/rewritten, so AWS looks up a slash-less name that doesn't exist).
  • coily ops aws ssm get-parameters-by-path --path /coilysiren --recursive -> ValidationException: The parameter name must begin with a forward slash "/" (single-segment /coilysiren gets rewritten to a Windows path like C:/Program Files/Git/coilysiren, which no longer starts with /).

Both resolve correctly when path-conversion is disabled:

MSYS_NO_PATHCONV=1 coily ops aws ssm get-parameter --name /coilysiren/netlify/token --query Parameter.Type --output text
# -> SecureString

This is a real footgun: the failure mode looks like a missing param or a wrong AWS account, when the param is present and the account is correct. It will bite every leading-slash arg on Windows (SSM names, any /-rooted value), not just Netlify.

Asks

  1. Guard inside coily.exe on Windows so callers don't have to think about it. Options:
    • Detect msys/cygwin (MSYSTEM set, or running under git-bash) and set MSYS_NO_PATHCONV=1 / MSYS2_ARG_CONV_EXCL='*' for child aws invocations, or
    • Pass SSM names in a conversion-safe form to the child process.
  2. Detect-and-warn fallback: if a leading-slash arg arrives already rewritten to a drive-letter path (C:/...coilysiren...), emit a clear operator notice naming msys path-conversion as the cause, rather than surfacing a raw ParameterNotFound / ValidationException.

Workaround (in place now)

export MSYS_NO_PATHCONV=1 added to the tower shell rc so interactive + agent calls stop mangling. Issue tracks the durable in-binary fix.

Origin

Surfaced while wiring a Netlify PAT into SSM for the coily ops netlify work (agentic-os-kai#518) on kai-desktop-tower. The token put had actually succeeded; the reads only appeared to fail because of msys path-conversion.

## Problem On the Windows tower, running Windows-native `coily.exe` from an msys/git-bash shell, any argument that looks like a POSIX absolute path gets rewritten by msys path-conversion *before* it reaches coily/AWS. This silently mangles leading-slash SSM parameter names. Observed: - `coily ops aws ssm get-parameter --name /coilysiren/netlify/token` -> `ParameterNotFound` (the leading slash is stripped/rewritten, so AWS looks up a slash-less name that doesn't exist). - `coily ops aws ssm get-parameters-by-path --path /coilysiren --recursive` -> `ValidationException: The parameter name must begin with a forward slash "/"` (single-segment `/coilysiren` gets rewritten to a Windows path like `C:/Program Files/Git/coilysiren`, which no longer starts with `/`). Both resolve correctly when path-conversion is disabled: ``` MSYS_NO_PATHCONV=1 coily ops aws ssm get-parameter --name /coilysiren/netlify/token --query Parameter.Type --output text # -> SecureString ``` This is a real footgun: the failure mode looks like a missing param or a wrong AWS account, when the param is present and the account is correct. It will bite every leading-slash arg on Windows (SSM names, any `/`-rooted value), not just Netlify. ## Asks 1. **Guard inside `coily.exe` on Windows** so callers don't have to think about it. Options: - Detect msys/cygwin (`MSYSTEM` set, or running under git-bash) and set `MSYS_NO_PATHCONV=1` / `MSYS2_ARG_CONV_EXCL='*'` for child `aws` invocations, or - Pass SSM names in a conversion-safe form to the child process. 2. **Detect-and-warn fallback:** if a leading-slash arg arrives already rewritten to a drive-letter path (`C:/...coilysiren...`), emit a clear operator notice naming msys path-conversion as the cause, rather than surfacing a raw `ParameterNotFound` / `ValidationException`. ## Workaround (in place now) `export MSYS_NO_PATHCONV=1` added to the tower shell rc so interactive + agent calls stop mangling. Issue tracks the durable in-binary fix. ## Origin Surfaced while wiring a Netlify PAT into SSM for the `coily ops netlify` work (agentic-os-kai#518) on kai-desktop-tower. The token put had actually succeeded; the reads only appeared to fail because of msys path-conversion.
coilysiren added
P3
and removed
P2
labels 2026-05-31 06:59:39 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-bridge/coily#156
No description provided.