Skip to content

fix(parser): dedupe Codex inferences with empty IDs - #26

Open
rune-oai wants to merge 3 commits into
loop-eng:mainfrom
rune-oai:fix/6-codex-empty-id-dedup
Open

rune-oai wants to merge 3 commits into
loop-eng:mainfrom
rune-oai:fix/6-codex-empty-id-dedup

Conversation

@rune-oai

Copy link
Copy Markdown

Summary

Codex inference_completed dedup only ran when entry.ID was non-empty, so empty-ID events double-counted tokens/cost.

Use a synthetic key (model|tokens|timestamp) when ID is empty so duplicates are skipped while distinct empty-ID events still count.

Fixes #6

Test plan

  • go test ./internal/parser/ -run 'DedupsEmpty|CountsDistinctEmpty' -count=1

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.

Codex inference dedup bypassed when entry.ID is empty

1 participant