Skip to content

Avoid panics after background compaction fails before a checkpoint - #55581

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1461bb403f4b0b8b7e171d1b3cba41411f2014b4
Oct 20, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1461bb403f4b0b8b7e171d1b3cba41411f2014b4

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Avoid panics after background compaction fails before a checkpoint

Why

Polling a failed background compaction consumes the closed oneshot receiver.
Keeping that receiver in session state can cause a later await to panic instead
of falling back to foreground compaction.

What changed

Remove the receiver from session state before polling it, restoring it only when
its result is still pending. Discard closed receivers so compaction can fall back
normally.

Testing

Add a regression scenario where background compaction fails before the next
checkpoint and automatic compaction falls back successfully.

…55581)

## Why

Polling a failed background compaction consumes the closed oneshot receiver.
Keeping that receiver in session state can cause a later await to panic instead
of falling back to foreground compaction.

## What changed

Remove the receiver from session state before polling it, restoring it only when
its result is still pending. Discard closed receivers so compaction can fall back
normally.

## Testing

Add a regression scenario where background compaction fails before the next
checkpoint and automatic compaction falls back successfully.

GitOrigin-RevId: 1461bb403f4b0b8b7e171d1b3cba41411f2014b4
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/1461bb403f4b0b8b7e171d1b3cba41411f2014b4 branch from 0b907a4 to e8aa7c1 Compare October 20, 2026 13:50
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-20T13:50:26.792720Z 0b907a4 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit e8aa7c1 into main Oct 20, 2026
26 of 43 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/1461bb403f4b0b8b7e171d1b3cba41411f2014b4 branch October 20, 2026 13:50
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 20, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — e8aa7c16 Deployed Oct 20, 2026 by kismet100-svg via Generate label suggestions #57256
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.

6 participants