Skip to content

[codex] Preserve failed goal accounting flushes#23717

Merged
jif-oai merged 1 commit into
mainfrom
codex/preserve-goal-accounting-errors
May 20, 2026
Merged

[codex] Preserve failed goal accounting flushes#23717
jif-oai merged 1 commit into
mainfrom
codex/preserve-goal-accounting-errors

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented May 20, 2026

What

  • Preserve database accounting failures from the goal extension instead of collapsing them into None
  • Warn with turn/tool context when a flush fails
  • Keep stop/abort accounting snapshots alive when the final flush did not persist

Why

PR #23696 can finish and discard a turn snapshot after account_thread_goal_usage fails. That loses the final accumulated accounting state silently. This follow-up keeps that failure explicit and avoids deleting the local snapshot in the failing path.

Testing

  • just fmt
  • cargo test -p codex-goal-extension

@jif-oai jif-oai marked this pull request as ready for review May 20, 2026 16:50
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 20, 2026

@codex review

Copy link
Copy Markdown
Contributor

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

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: af1340e8e0

ℹ️ 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 codex-rs/ext/goal/src/extension.rs
Comment thread codex-rs/ext/goal/src/extension.rs
@jif-oai jif-oai merged commit d84b824 into main May 20, 2026
31 checks passed
@jif-oai jif-oai deleted the codex/preserve-goal-accounting-errors branch May 20, 2026 18:37
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 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.

1 participant