Skip to content

Retire optional project operations before archive and deletion - #10633

Closed
PhilipJohnBasile wants to merge 4 commits into
unslothai:mainfrom
PhilipJohnBasile:codex/project-retirement-review-20260909
Closed

PhilipJohnBasile wants to merge 4 commits into
unslothai:mainfrom
PhilipJohnBasile:codex/project-retirement-review-20260909

Conversation

@PhilipJohnBasile

@PhilipJohnBasile PhilipJohnBasile commented Sep 9, 2026 •

Copy link
Copy Markdown

Project archive and deletion must wait for optional project operations to retire before removing their workspace or database record. Add one lifecycle entry point that drains tasks first, then chooses the installed Git retirement owner or verification retirement when Git is absent, releasing admission after success or failure.

With no optional feature installed, archive/delete behavior remains available. Retirement refusal alone maps to HTTP 409 and preserves the project. POST/PATCH storage failures retain their existing server-error behavior; unrelated RuntimeError/OSError exceptions from upsert/update are not converted to conflicts. The existing project-folder error handling is preserved. POST archive acquires retirement before its upsert, including newly created IDs, and holds it through the write.

This extracts the shared chat-history integration requested in #10594 and #10585. It adds no Git, task or verification execution. Optional task draining precedes Git's exclusive fence so active tasks can finish their current Git operations.

At head 10eec87e411ee03fed1999fd3df3971bf0c8d632, 63 standalone lifecycle/chat-route tests passed, including POST/PATCH storage failures for active and archived projects and fence release after failed writes. The updated head is also pinned in the full task/command native compositions (#10658 and #10672), which exercise active task/worktree retirement. Formatting and diff checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-09T15:40:24.737556Z 31327e5 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 31327e51f7

ℹ️ 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 thread studio/backend/routes/chat_history.py Resolved
@danielhanchen

Copy link
Copy Markdown
Member

The lifecycle entry point in studio/backend/core/project_retirement.py only ever resolves to the no-feature path here, since core/agent_workspace does not exist on main yet, and it also turns any RuntimeError or OSError from the project upsert into a 409. Could you land it together with the first consumer, or narrow the new except clause so unrelated write failures keep their current status?

@PhilipJohnBasile

PhilipJohnBasile commented Sep 10, 2026 via email

Copy link
Copy Markdown
Author

@PhilipJohnBasile
PhilipJohnBasile deleted the codex/project-retirement-review-20260909 branch September 12, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants