Skip to content

AGE-2755: report memory failures during chats to Sentry - #1341

Merged
hary73 merged 5 commits into
mainfrom
hary/memory-sentry
Nov 11, 2026
Merged

hary73 merged 5 commits into
mainfrom
hary/memory-sentry

Conversation

@hary73

@hary73 hary73 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Memory ingestion failures were already reported to Sentry, but failures during a chat only showed up in logs. This reports them too, so they raise alerts without anyone checking logs.

Fixes AGE-2755

Changes

All in packages/trueforge/src/memory/sessionMemory.ts, using the existing reportable_error log field (logged at error; the turn's log context already tags the events with tenant_id, session_id and turn_id):

  • Memory setup for a turn: reported instead of a warning; the turn still continues without memory.
  • Memory summary at the start of a chat: real failures are reported. Timeouts stay warnings so a slow provider doesn't flood Sentry. The session still starts without the summary.
  • Memory search and save tools: failures are reported with an operation field (search or add), then rethrown, so the model still gets the tool error as before.

Ingestion is unchanged; reporting sits in the chat path, not the provider, so ingestion failures aren't reported twice.

How was this tested?

  • Server unit suite (925 passing); the existing summary-failure test now expects the reported error
  • tsc for the server and unit tests; ESLint and Prettier on changed files

Checklist

  • I have read the contributing guidelines
  • Tests added/updated where it makes sense
  • No hand-edits to generated code
  • Docs / .env.example updated if configuration or behavior changed (no configuration change)

Made with Cursor


Note

Low Risk
Observability-only changes on the chat memory path; timeouts are deliberately excluded from Sentry to avoid noise.

Reviewed by Cursor Bugbot for commit 24f3723. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hary73
hary73 force-pushed the hary/memory-sentry branch from c985b1a to 7695a6c Compare November 11, 2026 11:55
@changeset-bot

changeset-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 24f3723

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hary73
hary73 marked this pull request as ready for review November 11, 2026 12:06
@veria-ai

veria-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

Reviews

@hary73
hary73 enabled auto-merge (squash) November 11, 2026 13:08
@hary73
hary73 merged commit 0abc518 into main Nov 11, 2026
16 checks passed
@hary73
hary73 deleted the hary/memory-sentry branch November 11, 2026 13:18
truefoundry-saas added a commit that referenced this pull request Nov 12, 2026
* AGE-2755: report memory failures during chats to Sentry (#1341)

* feat: turn memory on by default (#1340)

* Regenerate OpenAPI document and SDKs

---------

Co-authored-by: trueforge-dev-bot[bot] <trueforge-dev-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants