Skip to content

thread-store: store permission profiles#23165

Merged
bolinfest merged 1 commit into
mainfrom
pr23165
May 29, 2026
Merged

thread-store: store permission profiles#23165
bolinfest merged 1 commit into
mainfrom
pr23165

Conversation

@bolinfest

@bolinfest bolinfest commented May 17, 2026

Copy link
Copy Markdown
Collaborator

Why

SandboxPolicy is the legacy compatibility shape, but codex-thread-store still exposed it through StoredThread, ThreadMetadataPatch, and live metadata sync. That kept thread-store consumers tied to the legacy representation and meant richer permission profile data could not round-trip through thread metadata or cold rollout reconciliation.

What Changed

  • Replaced thread-store sandbox_policy API fields with canonical PermissionProfile fields.
  • Persist new permission-profile metadata as canonical JSON in the existing SQLite metadata slot while continuing to read older legacy sandbox policy values.
  • Updated local, in-memory, live metadata sync, and rollout extraction paths to propagate TurnContextItem::permission_profile().
  • Re-materialize legacy permission metadata against the final rollout cwd when rollout-derived metadata replaces stale SQLite summaries.
  • Updated affected app-server and core test constructors to build PermissionProfile values directly.

Test Plan

  • cargo test -p codex-state
  • cargo test -p codex-thread-store
  • cargo test -p codex-app-server summary_from_stored_thread_preserves_millisecond_precision --lib
  • cargo test -p codex-core realtime_context --lib

@bolinfest bolinfest requested a review from a team as a code owner May 17, 2026 15:41

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

Copy link
Copy Markdown
Contributor

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: 9ebf0b1f23

ℹ️ 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 codex-rs/thread-store/src/thread_metadata_sync.rs
Comment thread codex-rs/thread-store/src/local/read_thread.rs Outdated
@bolinfest bolinfest force-pushed the pr23165 branch 3 times, most recently from d87263f to 68956c7 Compare May 28, 2026 23:03
@bolinfest bolinfest merged commit a1ecf0c into main May 29, 2026
47 of 62 checks passed
@bolinfest bolinfest deleted the pr23165 branch May 29, 2026 18:55
@github-actions github-actions Bot locked and limited conversation to collaborators May 29, 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