Skip to content

Add lifecycle-managed Guardian housekeeping - #61795

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/519b539c0613c964bac7b18eb84e684f5e105640
Nov 16, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Add lifecycle-managed Guardian housekeeping

What changed

  • Add an install entry point that registers thread and turn lifecycle hooks for Guardian housekeeping. Coalesce user-message and turn-end wakes into one worker per eligible root thread, flushing history before routing durable evidence in order.
  • Run the housekeeper in an isolated, ephemeral model thread with no tools. Cancel and join its tracked tasks on root shutdown, waiting for accepted evidence appends to finish.
  • Give each routing batch a 90-second deadline, make channel listing and updates cancellable, and redact model response content from JSON parsing errors.

Testing

Extend housekeeping tests to cover stalled channel creation, redacted model errors, and shutdown waiting for an accepted evidence append without leaving a persisted housekeeper rollout.

## What changed

- Add an `install` entry point that registers thread and turn lifecycle hooks for Guardian housekeeping. Coalesce user-message and turn-end wakes into one worker per eligible root thread, flushing history before routing durable evidence in order.
- Run the housekeeper in an isolated, ephemeral model thread with no tools. Cancel and join its tracked tasks on root shutdown, waiting for accepted evidence appends to finish.
- Give each routing batch a 90-second deadline, make channel listing and updates cancellable, and redact model response content from JSON parsing errors.

## Testing

Extend housekeeping tests to cover stalled channel creation, redacted model errors, and shutdown waiting for an accepted evidence append without leaving a persisted housekeeper rollout.

GitOrigin-RevId: 519b539c0613c964bac7b18eb84e684f5e105640
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/519b539c0613c964bac7b18eb84e684f5e105640 branch from 0de7ba8 to cd18053 Compare November 16, 2026 11:51
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-16T11:51:23.155221Z 0de7ba8 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.

@copyberry
copyberry Bot merged commit cd18053 into main Nov 16, 2026
11 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/519b539c0613c964bac7b18eb84e684f5e105640 branch November 16, 2026 11:51
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch was previously deployed

1 inactive 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.

2 participants