Skip to content

[codex-analytics] add extensible feature thread sources - #27063

Merged
marksteinbrick-oai merged 2 commits into
mainfrom
mark.steinbrick/thread-source-feature
Jun 9, 2026
Merged

[codex-analytics] add extensible feature thread sources#27063
marksteinbrick-oai merged 2 commits into
mainfrom
mark.steinbrick/thread-source-feature

Conversation

@marksteinbrick-oai

@marksteinbrick-oai marksteinbrick-oai commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Why

  • ThreadSource currently defines a closed set of core-owned values
  • Product features also create threads for background or scheduled work
  • Adding every product-specific value to the core enum would require repeated codex-rs protocol changes
  • Feature-backed values let product callers provide precise attribution while preserving the existing core classifications

What Changed

  • Adds ThreadSource::Feature(String) for app-owned thread source values
  • Represents all app-server v2 thread sources as scalar strings, so a feature source is supplied as "automation"
  • Persists and emits the feature's plain string label, so "automation" produces thread_source="automation" in analytics
  • Keeps user, subagent, and memory_consolidation as explicit core-owned values and regenerates the app-server schemas and TypeScript bindings

Verification

  • just write-app-server-schema
  • cargo check --workspace
  • just test -p codex-protocol feature_thread_source_serializes_as_its_app_owned_label
  • just test -p codex-app-server-protocol thread_sources_round_trip_as_scalar_labels
  • cargo test -p codex-analytics thread_initialized_event_serializes_expected_shape
  • just fmt

@marksteinbrick-oai
marksteinbrick-oai marked this pull request as ready for review June 9, 2026 02:30
@marksteinbrick-oai
marksteinbrick-oai requested a review from a team as a code owner June 9, 2026 02:30

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

Copy link
Copy Markdown
Contributor

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.

Reviewed commit: 1bf0639660

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/protocol/src/protocol.rs
Comment thread codex-rs/app-server-protocol/src/protocol/v2/thread_data.rs
@marksteinbrick-oai
marksteinbrick-oai force-pushed the mark.steinbrick/thread-source-feature branch from 1bf0639 to 41ac94d Compare June 9, 2026 16:14
@marksteinbrick-oai
marksteinbrick-oai merged commit a71e040 into main Jun 9, 2026
31 of 32 checks passed
@marksteinbrick-oai
marksteinbrick-oai deleted the mark.steinbrick/thread-source-feature branch June 9, 2026 19:27
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 9, 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.

2 participants