Skip to content

Add paginated reverse lookup for thread attachments - #50083

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/21f32eb0cb1845a82d740d67b374080b6e12eb03
Oct 1, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/21f32eb0cb1845a82d740d67b374080b6e12eb03

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Add paginated reverse lookup for thread attachments

What changed

Add StateRuntime::list_thread_attachment_threads to find threads by exact attachment_type and identity_key, including threads without previews. Return thread IDs and archive state, with filters for all, archived, or non-archived threads.

Order results by thread ID and bind pagination cursors to the attachment identity and archive filter. Add a database index on (attachment_type, identity_key, thread_id) to support the lookup.

Testing

Add coverage for exact identity matching, archive filters, pagination, rejection of cursors reused with different lookup parameters, and membership updates after attachment removal or thread deletion.

## What changed

Add `StateRuntime::list_thread_attachment_threads` to find threads by exact `attachment_type` and `identity_key`, including threads without previews. Return thread IDs and archive state, with filters for all, archived, or non-archived threads.

Order results by thread ID and bind pagination cursors to the attachment identity and archive filter. Add a database index on `(attachment_type, identity_key, thread_id)` to support the lookup.

## Testing

Add coverage for exact identity matching, archive filters, pagination, rejection of cursors reused with different lookup parameters, and membership updates after attachment removal or thread deletion.

GitOrigin-RevId: 21f32eb0cb1845a82d740d67b374080b6e12eb03
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/21f32eb0cb1845a82d740d67b374080b6e12eb03 branch from ddf82d0 to 26a49b3 Compare October 1, 2026 19:55
@copyberry
copyberry Bot merged commit 26a49b3 into main Oct 1, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/21f32eb0cb1845a82d740d67b374080b6e12eb03 branch October 1, 2026 19:55
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 1, 2026
@MrrHouse
MrrHouse deployed to issue-triage October 1, 2026 20:01 — with GitHub Actions Active
@MrrHouse
MrrHouse deployed to issue-triage October 1, 2026 20:01 — with GitHub Actions Active
@MrrHouse
MrrHouse deployed to issue-triage October 1, 2026 20:01 — with GitHub Actions Active
@kaimallea
kaimallea deployed to issue-triage October 1, 2026 20:05 — with GitHub Actions Active
@kaimallea
kaimallea deployed to issue-triage October 1, 2026 20:05 — with GitHub Actions Active
@kaimallea
kaimallea deployed to issue-triage October 1, 2026 20:05 — with GitHub Actions Active
@kaimallea
kaimallea deployed to issue-triage October 1, 2026 20:07 — with GitHub Actions Active
@akchumbley
akchumbley deployed to issue-triage October 1, 2026 20:10 — with GitHub Actions Active
@akchumbley
akchumbley deployed to issue-triage October 1, 2026 20:10 — with GitHub Actions Active
@akchumbley
akchumbley deployed to issue-triage October 1, 2026 20:10 — with GitHub Actions Active
@akchumbley
akchumbley deployed to issue-triage October 1, 2026 20:11 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
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.

4 participants