Skip to content

fix(cli): schema-decode telemetry config#5412

Merged
jgoux merged 2 commits into
developfrom
fix/telemetry-config-schema
Jun 1, 2026
Merged

fix(cli): schema-decode telemetry config#5412
jgoux merged 2 commits into
developfrom
fix/telemetry-config-schema

Conversation

@jgoux
Copy link
Copy Markdown
Contributor

@jgoux jgoux commented Jun 1, 2026

Summary

Telemetry config loading now uses an Effect Schema boundary instead of a raw JSON.parse cast. Invalid, unreadable, or malformed telemetry.json is treated as absent local telemetry state, so telemetry state cannot crash unrelated CLI commands.

The telemetry config type is now derived from the runtime schema, and internal absence is represented with Option rather than null. telemetry status still serializes missing persisted consent as null at the output boundary.

Context

PR #5405 fixed the immediate empty JSON crash by catching parse errors, but structurally invalid JSON could still be accepted as TelemetryConfig. This follows the existing repo pattern of Schema.fromJsonString(...) for local state files and keeps malformed telemetry state best-effort and silent.

@jgoux jgoux marked this pull request as ready for review June 1, 2026 12:28
@jgoux jgoux requested a review from a team as a code owner June 1, 2026 12:28
@jgoux jgoux self-assigned this Jun 1, 2026
@jgoux jgoux enabled auto-merge (squash) June 1, 2026 12:59
@jgoux jgoux merged commit 88be432 into develop Jun 1, 2026
8 checks passed
@jgoux jgoux deleted the fix/telemetry-config-schema branch June 1, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants