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
* harden(plugin): preserve JSON config fidelity + honor UI opt-out over falsey env
Config/telemetry correctness fixes from the pre-release review.
JSON client-config writes (#528 / TC-2):
- Default JSON.stringify(sort_keys) is true, so every rewrite alphabetically
reordered the user's whole file (unrelated MCP entries and, for ~/.claude.json,
the entire CLI state). Pass sort_keys=false.
- Godot parses every JSON number as a float, so the same round-trip re-emitted
the user's integer fields as "8080.0" — rejected by strict consumers and
churning every number in their other entries. A _narrow_integral_numbers pass
re-narrows exactly-representable integral floats back to int before serializing
so ints stay ints. (Values above 2^53 already lost precision at parse and are
left as-is — byte-perfect preservation would mean not parsing the file, and
such magnitudes don't occur in client configs.)
Telemetry opt-out (#530 / TC-4):
- _inject_telemetry_env() skipped injection whenever GODOT_AI_DISABLE_TELEMETRY /
DISABLE_TELEMETRY was *present*, even set to a falsey "0". The Python server
parses those truthily (falsey => enabled), so a dock UI opt-out silently
shipped telemetry. Now only a *truthy* env var counts as "already disabled"
(matching McpSettings.telemetry_enabled / the server); a falsey/absent value
falls through so the opt-out reaches the spawn. The truthy guard is kept so
post-spawn cleanup doesn't strip a user's own var. Fixed the contradicting
telemetry.gd comment too.
Tests (live Godot 4.6.x): clients 94/94 incl. new integer-preservation case;
server_lifecycle 20/20 incl. new falsey-env opt-out case; parse clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* harden(plugin): address Copilot review on config/telemetry
- _narrow_integral_numbers: include exactly 2^53 in the narrow bound (< -> <=).
2^53 is exactly representable as a double, so it should serialize as an int;
the previous strict-less bound left it as "9007199254740992.0", contradicting
the comment that only values *above* 2^53 are kept as floats.
- Update the _inject_telemetry_env outer doc comment to match the implementation
(only a *truthy* disable env var counts as "already disabled"; a falsey "0"
falls through so the UI opt-out still reaches the spawn).
- Strengthen the array-int test to check each element regardless of trailing
comma, so a floatified last element ("3.0" with no comma) is also caught.
Live Godot 4.6.x: clients 94/94, server_lifecycle 20/20.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments