Skip to content

Conversation

@JaviSoto
Copy link
Contributor

No description provided.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@JaviSoto JaviSoto force-pushed the dev/javi/analytics-config branch from 7602905 to bc086d6 Compare December 20, 2025 00:57
@JaviSoto
Copy link
Contributor Author

@codex review

@JaviSoto JaviSoto force-pushed the dev/javi/analytics-config branch from bc086d6 to c35195c Compare December 20, 2025 00:57
@JaviSoto JaviSoto changed the title feat: add analytics config feat: add analytics config setting Dec 20, 2025
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jif-oai
Copy link
Collaborator

jif-oai commented Dec 22, 2025

Could we make this a bit more complex? I expect we will have multiple fields in there in the end so could we have something like:

[analytics]
enabled=true

And btw we are not allowed to enable it by default in some juridiction so we must check with legal (I already sent the request but no answer yet)

@JaviSoto
Copy link
Contributor Author

JaviSoto commented Jan 5, 2026

@jif-oai rebased and updated as per your suggestion! How does it look?

@JaviSoto JaviSoto force-pushed the dev/javi/analytics-config branch from ee05a22 to 40c82b9 Compare January 5, 2026 19:45
test(config): cover [analytics].enabled in fixture
@JaviSoto JaviSoto force-pushed the dev/javi/analytics-config branch from 40c82b9 to 03f7260 Compare January 5, 2026 20:05
@JaviSoto JaviSoto requested a review from jif-oai January 5, 2026 21:17
Copy link
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

.as_ref()
.and_then(|a| a.enabled)
.or(cfg.analytics.as_ref().and_then(|a| a.enabled))
.unwrap_or(true),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this has been validated with legal right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I'll ping you in Slack with more details

/// Analytics settings loaded from config.toml. Fields are optional so we can apply defaults.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
pub struct AnalyticsConfigToml {
/// When `false`, disables analytics across Codex product surfaces in this machine.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"in this profile" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// When `false`, disables analytics across Codex product surfaces in this machine.
/// When `false`, disables analytics across Codex product surfaces in this profile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

approval_policy = "on-failure"
[profiles.zdr.analytics]
enabled = false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test to make sure this work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's there! see test_precedence_fixture_with_zdr_profile below, it checks that analytics is false

@JaviSoto JaviSoto enabled auto-merge (squash) January 6, 2026 18:47
@JaviSoto JaviSoto merged commit 915352b into main Jan 6, 2026
26 checks passed
@JaviSoto JaviSoto deleted the dev/javi/analytics-config branch January 6, 2026 19:04
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants