Skip to content

app-server: persist conversation modalities + backfill on entry#11340

Closed
ccy-oai wants to merge 1 commit intomainfrom
ccy/modality-db-backfill
Closed

app-server: persist conversation modalities + backfill on entry#11340
ccy-oai wants to merge 1 commit intomainfrom
ccy/modality-db-backfill

Conversation

@ccy-oai
Copy link
Collaborator

@ccy-oai ccy-oai commented Feb 10, 2026

Summary
  • Persist conversation modalities per thread in the state DB.
  • Backfill modalities on first entry (thread/start, thread/resume, thread/fork) when NULL.
  • Surface conversationModalities on v2 Thread responses.
Rationale
  • Clients need O(1) signal of whether a conversation ever used images.
  • Backfill is one-time and
    avoids repeated history scans.
Scope
  • App-server + state DB schema.
Testing
  • Not run (manual build OK on local)

Copy link
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: 817bf26c94

ℹ️ 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 on lines +1909 to +1911
match read_summary_from_rollout(rollout_path.as_path(), fallback_provider)
.await
{
Copy link
Contributor

Choose a reason for hiding this comment

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

P1 Badge Avoid hard-failing on deferred rollout during thread start

This new read_summary_from_rollout call makes thread/start fail when the rollout file has not been materialized yet, but new sessions intentionally defer file creation until an explicit persist (the core rollout recorder documents this behavior, and record_initial_history for InitialHistory::New only flushes). In that case this branch returns an internal error even though the thread was already spawned, so clients see a failed start while a live thread remains in memory; the same pattern is also used in resume paths. Please fall back to snapshot-derived thread metadata when the rollout is not yet present instead of treating it as a fatal error.

Useful? React with 👍 / 👎.

@ccy-oai ccy-oai force-pushed the ccy/modality-db-backfill branch 2 times, most recently from a6de311 to d58a4f8 Compare February 10, 2026 20:42
@ccy-oai ccy-oai force-pushed the ccy/modality-db-backfill branch from d58a4f8 to 8db0700 Compare February 10, 2026 21:04
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Feb 10, 2026
@ccy-oai ccy-oai closed this Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments