ref(chat): Bound active thread scratch TTL - #1361
Closed
sentry-junior[bot] wants to merge 3 commits into
Closed
Conversation
Co-Authored-By: David Cramer <david@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: David Cramer <david@sentry.io>
dcramer
requested changes
Aug 9, 2026
dcramer
left a comment
Member
There was a problem hiding this comment.
theres some excessively complexity in this change that needs resolved
Keep one shared thread bag. Use a short TTL only while processing is active, leave sandbox with conversation state, and load runtime parts through one helper.
dcramer
marked this pull request as ready for review
August 10, 2026 01:35
dcramer
approved these changes
Aug 10, 2026
dcramer
reviewed
Aug 10, 2026
| export const JUNIOR_THREAD_STATE_TTL_MS = 7 * 24 * 60 * 60 * 1000; | ||
|
|
||
| /** Bound thread scratch while a turn is still active or paused. */ | ||
| export const JUNIOR_ACTIVE_THREAD_STATE_TTL_MS = 24 * 60 * 60 * 1000; |
Member
There was a problem hiding this comment.
thread state vs active thread state makes little sense...
Contributor
Author
|
Closing without merge. Adaptive TTL and split-key scratch retention do not match the intended model: Redis should hold short-lived active thread state only ( Salvaged as tracker design on #1267, not as code. Next real cut is artifacts durability, then vision, then short active-only scratch. Refs #1267 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep one shared thread scratch bag. Bound the whole bag to 24h while a turn is active or paused; otherwise keep the existing 7d cache TTL.
loadThreadRuntimeState()so callers get coerced runtime parts from one placeThis replaces the earlier split-key approach after review feedback about complexity.
Refs #1267
Checks:
pnpm --filter @sentry/junior exec tsc --noEmit; focused Vitest 80/80;pnpm --filter @sentry/junior lint.Requested by David Cramer.
--
View Junior Session [Sentry]