Skip to content

Enforce single-writer ownership for all thread histories - #36389

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1be79b01966ad2634ed79eb96c0aa0db8eafe2fa
Jul 31, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Enforce single-writer ownership for all thread histories

Why

Legacy thread histories did not use the cross-process writer ownership guard already applied to paginated histories.

What changed

  • Acquire and retain a writer lock whenever a legacy or paginated thread is created or resumed.
  • Apply the same ownership checks when archiving or deleting either history mode.
  • Release ownership when initialization fails or the active thread shuts down, allowing another process to resume it.

Testing

  • Cover competing create and resume operations for both history modes.
  • Cover archive and deletion conflicts for legacy and paginated descendants.

## Why

Legacy thread histories did not use the cross-process writer ownership guard already applied to paginated histories.

## What changed

- Acquire and retain a writer lock whenever a legacy or paginated thread is created or resumed.
- Apply the same ownership checks when archiving or deleting either history mode.
- Release ownership when initialization fails or the active thread shuts down, allowing another process to resume it.

## Testing

- Cover competing create and resume operations for both history modes.
- Cover archive and deletion conflicts for legacy and paginated descendants.

GitOrigin-RevId: 1be79b01966ad2634ed79eb96c0aa0db8eafe2fa
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/1be79b01966ad2634ed79eb96c0aa0db8eafe2fa branch from b511217 to dc60dad Compare July 31, 2026 20:50
@copyberry
copyberry Bot merged commit dc60dad into main Jul 31, 2026
30 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/1be79b01966ad2634ed79eb96c0aa0db8eafe2fa branch July 31, 2026 20:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
@ghost
ghost temporarily deployed to issue-triage July 31, 2026 21:10 — with GitHub Actions Inactive
@ghost
ghost temporarily deployed to issue-triage July 31, 2026 21:10 — with GitHub Actions Inactive
@ghost
ghost temporarily deployed to issue-triage July 31, 2026 21:10 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
issue-triage — dc60dadc Deployed Jul 31, 2026 by ghost via Identify potential duplicates (all issues) #35446
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.

3 participants