Repository navigation
ref(conversations): Extract conversation-only runtime - #1370
sentry-junior[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Policy review against the extract claim and the shared-runtime framing:
-
runConversationOnlyTurnsetspublishExternally: falseon agent routing, but the terminalsaveTurnCheckpoint({ mode: "completed" })call still omits the flag. The PR says this path always sets conversation-only publish. Please passpublishExternally: falseon the completed checkpoint write so the durable turn record matches the routing contract, not only the live run. -
recordActivitycurrently doessource.platform === "slack" ? "slack" : "local". That collapsesapi/internal/ other conversation sources intolocal, and the new integration test already calls this path withsurface: "api". For a pure local extract, keepsource: "local"like main. If this is meant to be shared, map from the real conversation source/surface instead of inventing a Slack-or-local ternary. Speculative wrong mapping fightspolicies/correctness-complexity.md.
Related honesty gap, not a hard blocker if you keep this PR as a local extract only: the body still frames this as preparing dashboard-authored turns, but the API still requires a Destination and does not set sessionSource. Destinationless private dashboard turns from #1200 will need those next. Either tighten the PR framing to “local extract” or leave a concrete follow-up for destinationless + sessionSource.
(Could not submit as REQUEST_CHANGES because this is Junior’s own PR.)
Pass publishExternally: false on the completed checkpoint write and map activity source from destination/surface with sessionSource, matching the turn-cursor contract without inventing a Slack-or-local ternary. Co-Authored-By: David Cramer <[email protected]>
There was a problem hiding this comment.
Addressed both durable-contract points without touching mailbox/lease/worker paths:
- completed
saveTurnCheckpointnow writespublishExternally: false recordActivitymaps like turn-cursor (localdestination →local, else surface) and storessessionSource
Also tightened the PR body to local extract framing; destinationless dashboard turns remain a follow-up.
Integration coverage now asserts both via getConversationStore().get + getTurnRecord.
Close the extract-only path from #1370 and land a real #1200 slice instead. Private dashboard/API root turns now enter the existing mailbox + worker path with `publishExternally: false`. Replies stay in the conversation log. Mailbox, lease, and checkpoint behavior stay the shared execution system. **What this adds** - `api-turns/`: enqueue + worker consumer for API root turns - `POST /api/conversations` and `POST /api/conversations/:id/messages` - junior/email actor identity so private API conversations keep participant access - integration coverage for enqueue, idempotency, worker run, transcript messages, and completed checkpoint `publishExternally: false` **Still out of scope** - continuing Slack-rooted conversations from the dashboard - destinationless agent routing without a local destination - dashboard composer UI Refs #1200 **Checks** - `pnpm --filter @sentry/junior exec tsc -p tsconfig.json --noEmit` - `pnpm --filter @sentry/junior exec vitest run tests/integration/api-turn-work.test.ts` <!-- junior-request-attribution:start --> Requested by **U039RR91S**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0B595QDZLL%3A1786336528.055359 --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0B595QDZLL%3A1786336528.055359) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0B595QDZLL%3A1786336528.055359/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
Closing without merge.
This PR only extracted the local CLI runner into
conversation-only.ts. It did not add a second consumer, make destination optional, or put non-Slack turns on the shared worker path.Next cut: dashboard/API input through the existing mailbox + worker with
publishExternally: falseand no provider delivery. Keep mailbox, lease, and checkpoint behavior unchanged.Refs #1200