Skip to content

Enforce writer ownership for thread archive and deletion - #35031

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

Enforce writer ownership for thread archive and deletion#35031
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f62a3e0c1ee2631cea48dd9145b588a1486e2425

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 23, 2026

Copy link
Copy Markdown

Enforce writer ownership for thread archive and deletion

Why

Paginated threads allow only one app-server process to write at a time. Archive and delete operations must not mutate a thread or its spawned descendants while another process owns any of them.

What changed

  • Acquire paginated writer locks for the full archive or deletion set before changing rollout files, including descendants whose rollout has not materialized yet.
  • Add a batch archive store operation so ownership conflicts are detected before any thread in the subtree is archived.
  • Return ownership conflicts as JSON-RPC invalid-request errors and document the behavior.

Testing

  • Cover archive and deletion conflicts for owned threads and descendants, including unmaterialized rollouts.
  • Verify deletion still removes rollouts with unreadable metadata.

## Why

Paginated threads allow only one app-server process to write at a time. Archive and delete operations must not mutate a thread or its spawned descendants while another process owns any of them.

## What changed

- Acquire paginated writer locks for the full archive or deletion set before changing rollout files, including descendants whose rollout has not materialized yet.
- Add a batch archive store operation so ownership conflicts are detected before any thread in the subtree is archived.
- Return ownership conflicts as JSON-RPC invalid-request errors and document the behavior.

## Testing

- Cover archive and deletion conflicts for owned threads and descendants, including unmaterialized rollouts.
- Verify deletion still removes rollouts with unreadable metadata.

GitOrigin-RevId: f62a3e0c1ee2631cea48dd9145b588a1486e2425
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f62a3e0c1ee2631cea48dd9145b588a1486e2425 branch from c8d6112 to 9633165 Compare July 23, 2026 23:18
@copyberry
copyberry Bot merged commit 9633165 into main Jul 23, 2026
30 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f62a3e0c1ee2631cea48dd9145b588a1486e2425 branch July 23, 2026 23:19
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 2026
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.

2 participants