Skip to content

[codex-analytics] report compaction analytics details#26680

Merged
rhan-oai merged 1 commit into
mainfrom
rhan/compaction-analytics-details
Jun 8, 2026
Merged

[codex-analytics] report compaction analytics details#26680
rhan-oai merged 1 commit into
mainfrom
rhan/compaction-analytics-details

Conversation

@rhan-oai

@rhan-oai rhan-oai commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Why

Compaction analytics adds retained image count and compaction summary output tokens for v1.5 specifically.

What changed

  • Add nullable retained_image_count and compaction_summary_tokens fields to codex_compaction_event.
  • Populate them only for responses_compaction_v2: retained images come from the retained v2 compacted history, and summary tokens come from response.completed.token_usage.output_tokens.
  • Leave local and legacy remote compaction events as null for these detail fields.

Verification

  • just fmt
  • just fix -p codex-core
  • just test -p codex-core build_v2_compacted_history_counts_retained_input_images
  • git diff --check

@rhan-oai rhan-oai force-pushed the rhan/compaction-analytics-details branch 2 times, most recently from cb660fd to 43bb18f Compare June 5, 2026 22:21
@rhan-oai

rhan-oai commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 🎉

ℹ️ 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".

@rhan-oai rhan-oai marked this pull request as ready for review June 6, 2026 00:09
@rhan-oai rhan-oai requested a review from a team as a code owner June 6, 2026 00:09
@rhan-oai rhan-oai merged commit f1c18df into main Jun 8, 2026
31 checks passed
@rhan-oai rhan-oai deleted the rhan/compaction-analytics-details branch June 8, 2026 17:52
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 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