Skip to content

[codex] Merge event aggregation performance baseline and Codex parser optimization#42

Merged
Miss-you merged 3 commits into
mainfrom
codex/eap-001-baseline
Apr 17, 2026
Merged

[codex] Merge event aggregation performance baseline and Codex parser optimization#42
Miss-you merged 3 commits into
mainfrom
codex/eap-001-baseline

Conversation

@Miss-you

Copy link
Copy Markdown
Owner

Summary

  • Adds EAP-001 baseline fixtures and benchmark coverage for event aggregation performance work.
  • Includes EAP-005 Codex parser JSON churn reduction merged into the baseline branch.
  • Updates the performance optimization task board with completed EAP-001 and EAP-005 status.

Validation

  • make fmt
  • go clean -testcache && make test
  • make vet
  • make build
  • make lint

Notes

This PR merges the completed codex/eap-001-baseline stack into main.

- replace generic model-map extraction with targeted JSON field scanning
- preserve Codex model fallback precedence and skipped-token model propagation
- add parser hot-path allocation guards and synthetic Codex benchmark
Copilot AI review requested due to automatic review settings April 17, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR merges the Codex event aggregation performance baseline work and the Codex parser optimization stack into main, adding correctness/performance guardrails while reducing Codex JSON parsing churn on hot paths.

Changes:

  • Optimize Codex model extraction by replacing generic JSON unmarshalling/path-walking with typed fields plus a lightweight JSON field scanner.
  • Expand Codex parser test coverage for model propagation/fallback scenarios and add allocation/benchmark guardrails.
  • Update the event aggregation performance task board to reflect completion of EAP-005.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
provider/codex/parser.go Refactors Codex model extraction and model propagation logic to reduce allocations/CPU.
provider/codex/parser_test.go Adds additional model-fallback correctness tests plus allocation budgets and a synthetic benchmark.
docs/plans/2026-04-17-event-aggregation-performance-optimization-task.md Marks EAP-005 as done and records change log entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread provider/codex/parser.go
Comment thread provider/codex/parser.go Outdated

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

Copy link
Copy Markdown

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: 6059ff8eb6

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

Comment thread provider/codex/parser.go
# Conflicts:
#	docs/plans/2026-04-17-event-aggregation-performance-optimization-task.md
#	provider/codex/parser_test.go

Copy link
Copy Markdown
Owner Author

Addressed the AI review threads in f36c8f3:

  • eventMsgPayload now embeds codexNamedModelFields, leaving Model as the single json:"model" source for event_msg payloads while preserving top-level aliases like model_name.
  • extractModelFromObject is capped at the previous one-level context/info/payload model-path behavior.
  • Escaped JSON strings and escaped JSON keys now use encoding/json decoding instead of Go string literal unquoting.

Verification run after the fix:

  • go test ./provider/codex -run 'TestParseCodexUsageEvents_UsesTopLevelEventMsgModelName|TestExtractModelFromRawJSON_ModelPathParity|TestParseCodexUsageEvents_UsesModelFromNonUsageEventMessage' -count=1
  • make fmt && go clean -testcache && make test
  • make vet && make build && make lint

@Miss-you
Miss-you merged commit 9d76eb0 into main Apr 17, 2026
7 checks passed
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