feat(core): emit canonical review mode items - #31473
Conversation
fdb84d9 to
ec3e03c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdb84d94a4
ℹ️ 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".
ec3e03c to
089106f
Compare
089106f to
9aad937
Compare
6f6cfa5 to
42b1ebe
Compare
| }, | ||
| CoreTurnItem::EnteredReviewMode(review) => ThreadItem::EnteredReviewMode { | ||
| id: review.id, | ||
| review: review.user_facing_hint, |
There was a problem hiding this comment.
hmm to align the items... we need core to keep ReviewTarget / ReviewOutputEvent so we can map back to the legacy event for compatibility, so the only option is to make the app-server API thread item structured, but that's an API change which I'd like to keep out of scope for now. we can always do it later if we'd like
| tracing = { workspace = true, features = ["log"] } | ||
| url = { workspace = true } | ||
| uuid = { workspace = true, features = ["serde", "v4", "v5"] } | ||
| uuid = { workspace = true, features = ["serde", "v4", "v5", "v7"] } |
42b1ebe to
68f5cd2
Compare
cd0a43b to
22ef76e
Compare
22ef76e to
4b6e1d8
Compare
Description
This PR moves review-mode markers onto canonical
TurnItemlifecycle:TurnItem::EnteredReviewModeTurnItem::ExitedReviewModeCore now emits
ItemStarted/ItemCompletedfor both. The completed items map back into the existingEnteredReviewMode/ExitedReviewModeevents, so raw core event consumers and legacy rollout persistence keep seeing the old events.This is the compatibility layer needed before paginated rollouts persist review markers as
ItemCompleted(TurnItem).Why
Review markers were one of the remaining app-server thread items created directly from legacy events. Giving them canonical items lets paginated history persist stable turn/item IDs without changing legacy rollouts.
What changed
TurnItems and switched review flow to emit their lifecycle.ThreadHistoryBuilderto replay canonical review items even though review turns still do not emitTurnStarted.