Skip to content

Honor thread analytics opt-outs when using shared clients - #44646

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/547852909af1a6822b95c0bcd2336b0d6bc7aad1
Sep 10, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/547852909af1a6822b95c0bcd2336b0d6bc7aad1

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Honor thread analytics opt-outs when using shared clients

Why

An enabled shared analytics client could override a thread's explicit opt-out.
Delegated threads also emitted initialization events through the parent's client,
bypassing the child's analytics setting.

What changed

  • Use a disabled analytics client when config.analytics_enabled is Some(false),
    without disabling analytics for sibling threads or overriding a disabled host client.
  • Emit delegated thread initialization events through the child's analytics client.
  • Expose the effective analytics state through CodexThread::analytics_enabled().

Testing

Add regression tests for explicit and unset thread settings with enabled, disabled,
and absent shared clients, plus delegated child opt-outs with an enabled parent.
Update compaction and rollout-budget rollback tests to wait for thread idle after
turn completion and fail immediately on rollback errors.

## Why

An enabled shared analytics client could override a thread's explicit opt-out.
Delegated threads also emitted initialization events through the parent's client,
bypassing the child's analytics setting.

## What changed

- Use a disabled analytics client when `config.analytics_enabled` is `Some(false)`,
  without disabling analytics for sibling threads or overriding a disabled host client.
- Emit delegated thread initialization events through the child's analytics client.
- Expose the effective analytics state through `CodexThread::analytics_enabled()`.

## Testing

Add regression tests for explicit and unset thread settings with enabled, disabled,
and absent shared clients, plus delegated child opt-outs with an enabled parent.
Update compaction and rollout-budget rollback tests to wait for thread idle after
turn completion and fail immediately on rollback errors.

GitOrigin-RevId: 547852909af1a6822b95c0bcd2336b0d6bc7aad1
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/547852909af1a6822b95c0bcd2336b0d6bc7aad1 branch from 5d0e821 to 60825b4 Compare September 10, 2026 21:31
@copyberry
copyberry Bot merged commit 60825b4 into main Sep 10, 2026
13 of 18 checks passed
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/547852909af1a6822b95c0bcd2336b0d6bc7aad1 branch September 10, 2026 21:31
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 10, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 60825b49 Deployed Sep 10, 2026 by ddggvv via Translate non-English issue #12537
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.

4 participants