Skip to content

refactor: Simplify the native query for listing threads - #6080

Closed
markstuart-oai wants to merge 1 commit into
feat/codex-harnessfrom
codex/simplify-native-session-listing
Closed

markstuart-oai wants to merge 1 commit into
feat/codex-harnessfrom
codex/simplify-native-session-listing

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

Why: A section list that includes child threads has been choosing between two copies of the same relation filter. This PR has been moving that choice into one helper and passing the preview flag straight to the SQL query.

The change has also been removing a private wrapper used only by search. Search has still been hiding threads with no preview by default. Both list paths have still been preserving the requested parent ID and the order of results.

Test plan

  • All 29 existing SQLite thread tests have been passing before and after the change. They cover empty previews and paging when several threads share a timestamp.
  • A separate Rust caller has been checking eight cases through the public thread store with real SQLite rows. The old and new code have both been returning the same child and descendant IDs on pages of size one.
  • Replaying the whole patch series has been yielding exactly the three intended source-file changes and no test changes.
  • Building the full thread-store test binary against cached dependencies has been failing on the same six unrelated fixture errors in both versions. The public caller above has still been working.

Issue number

No linked issue.

Checks

  • I've added new tests, if relevant
  • I've run the applicable checks in AGENTS.md, including .agents/skills/code-change-verification/scripts/run.sh when required
  • I've confirmed all required checks pass
  • I've completed the review required by AGENTS.md

@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners November 19, 2026 02:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T02:15:48.019775Z 4e0abfa PR opened
🔒 Security Review ✅ Completed 2026-11-19T02:16:47.333699Z 4e0abfa 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.

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.

1 participant