You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two small input-handling defects at the edges of scripts/mcp_swap.py. Filed together because both are one-line fixes in argument/decode handling; split if you would rather track them apart.
A UTF-8 BOM makes a config unswappable. Configs are read with a plain .decode(), so a byte-order mark — which editors on Windows still add — fails the parse for every CLI. It fails closed with a readable message, so this is an annoyance rather than a risk, but utf-8-sig would decode it.
[cursor] Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)
--pr accepts values that are not the number the user typed. The value goes through bare int(), which accepts underscore separators, a leading +, surrounding whitespace, and non-ASCII digits. --pr 1_0 silently swaps to PR 10:
--pr '٥' (Arabic-Indic five) is accepted the same way.
Expected
A BOM decodes rather than failing the parse. --pr rejects anything that is not a plain run of ASCII digits, so a typo is an error instead of a different pull request.
Activity