René's URL Explorer Experiment


Title: test(webapp): chat.agent durability regression suite by kathiekiwi · Pull Request #4550 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: test(webapp): chat.agent durability regression suite by kathiekiwi · Pull Request #4550 · triggerdotdev/trigger.dev

X Title: test(webapp): chat.agent durability regression suite by kathiekiwi · Pull Request #4550 · triggerdotdev/trigger.dev

Description: What & why Test-only hardening for chat.agent durability. chat.agent gets its durability from the primitive — object-store snapshot + S2 .in/.out replay + continuation boot — but several store-level mechanisms that replay lands on had no regression test, and two of them were criticals in the 2026-06-10 chat.agent audit: cross-tenant isolation and no duplicate mid-stream turn. This adds those cases against a real Postgres table (testcontainers, no mocks). TRI-11166. Stack Stacked on #4549 (query boundary). Merge that first. What's inside # Mechanism Test Coverage Control-broken 1 Cross-tenant isolation (audit critical) dashboardAgentTenantIsolation.test.ts Full at the store seam we own: getChatMessages / getSession / chatExists / listChats / countUserMessages / appendChatMessageOnce all refuse a foreign (org, user) — a foreign tenant reads not-found, never a transcript or the session's public access token Yes 2 No duplicate mid-stream turn (audit critical) dashboardAgentDurableResume.test.ts Full: a streamed-then-resumed turn finalises in place and appends nothing; row count and the position allocator both pinned Yes 3 Crash-resume reconstructs state dashboardAgentDurableResume.test.ts Full: replay keeps the mid-turn append, finalises the turn's own message, loses no messages, and rebuilds the session cursor read back via getSession — 4 Mid-stream refresh resumes in-flight turn (Last-Event-ID) dashboardAgentDurableResume.test.ts Seam-only: the cursor getSession hands a refreshed client, and a later turn advances (never appends) it. Client-side reconnect / Last-Event-ID replay is already covered in packages/trigger-sdk/src/v3/chat.test.ts — not duplicated — 5 Snapshot write-failure path dashboardAgentDurableResume.test.ts Full at this seam: a persistTurn that throws commits nothing (no rows, allocator untouched, cursor unchanged — the version-mismatch case), and the retry replays with no loss — 6 .out trimming / OOM retry restarts cleanly dashboardAgentDurableResume.test.ts Seam-only: a restarted turn that re-sends its snapshot loses no data and doubles nothing. .out trimming and the OOM restart itself are inside the closed primitive (not reachable) — The "Full" vs "Seam-only" column is the honest distinction: full means the whole mechanism is exercised from the repos we own; seam-only means we pin the store contract the primitive depends on, and the primitive-internal half lives where we can't reach it. Key decisions The two criticals were control-broken first. Isolation: removing the organizationId filter from getChatMessages leaks org A's transcript to the owner's user id under another org — the test fails at toBeNull(). No-duplicate: removing the stored-id drop in storeChatMessages makes a replayed persistTurn over-reserve positions (next free slot jumps 3 → 7) — the test fails on the allocator assertion. Both reverted. Real Postgres, no mocks. testcontainers against an actual table, so the store contract is proven, not asserted against a stub. Residual follow-ups These live inside the closed chat.agent primitive package and can't be unit-tested from the repos we own; the tests above are the store-level backstop they depend on: The snapshot URL's own auth gate (the audit's snapshot-URL auth gap) — enforced in the primitive; here we prove the webapp store never hands a foreign tenant the PAT it would boot from. Object-store snapshot write + S2 .in/.out replay at the transport level. .out trimming never dropping in-flight data, and the OOM restart mechanism itself. Testing pnpm run test --filter webapp — dashboardAgentTenantIsolation.test.ts and dashboardAgentDurableResume.test.ts.

Open Graph Description: What & why Test-only hardening for chat.agent durability. chat.agent gets its durability from the primitive — object-store snapshot + S2 .in/.out replay + continuation boot — but several store-...

X Description: What & why Test-only hardening for chat.agent durability. chat.agent gets its durability from the primitive — object-store snapshot + S2 .in/.out replay + continuation boot — but several st...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4550

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2a9a2dd9-2cd7-32d7-021b-c0f81ed05c3d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE0A4:3D538F:72E7E7:AA67EB:6AFAF6A5
html-safe-nonce4ea5c655edc2a56e53ea963c289a94132e4ecb3b4e65d86c3db4ee1094b632cc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEE0OjNENTM4Rjo3MkU3RTc6QUE2N0VCOjZBRkFGNkE1IiwidmlzaXRvcl9pZCI6Ijc5Mzk0MTQxMzg4MzIxMzQ3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac58a37095d5bb3bb27b54a8c357dd557de8c2eba5fa7ccc40f86df2b9adf8f48d
hovercard-subject-tagpull_request:4243904042
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4550/files
twitter:imagehttps://avatars.githubusercontent.com/u/4035897?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4035897?s=400&v=4
og:image:altWhat & why Test-only hardening for chat.agent durability. chat.agent gets its durability from the primitive — object-store snapshot + S2 .in/.out replay + continuation boot — but several store-...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea85e96a83bed7871993e6b1ffda24105928eee17
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4550/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4550%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4550%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4550/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4550/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4550/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
kathiekiwihttps://github.com/kathiekiwi
feat/query-safety-tri-11165https://github.com/triggerdotdev/trigger.dev/tree/feat/query-safety-tri-11165
test/chat-agent-durability-tri-11166https://github.com/triggerdotdev/trigger.dev/tree/test/chat-agent-durability-tri-11166
Conversation 13 https://github.com/triggerdotdev/trigger.dev/pull/4550
Commits 26 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits
Checks 32 https://github.com/triggerdotdev/trigger.dev/pull/4550/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4550/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4550/files
test(webapp): chat.agent durability regression suite https://github.com/triggerdotdev/trigger.dev/pull/4550/files#top
Show all changes 26 commits https://github.com/triggerdotdev/trigger.dev/pull/4550/files
4efe0d1 test(webapp): pin cross-tenant isolation for the chat store kathiekiwi Aug 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/4efe0d1ecf4f5b384f4ba1b10650b95fdff4da59
34996fd test(webapp): pin chat.agent turn durability across crash and resume kathiekiwi Aug 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/34996fd291145f68e94ee9503f383da461c60cef
c42002b Merge remote-tracking branch 'origin/feat/query-safety-tri-11165' int… kathiekiwi Aug 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/c42002bff907df84e573ce946f74f0f81f54ee3f
b9610f8 Merge remote-tracking branch 'origin/feat/query-safety-tri-11165' int… kathiekiwi Aug 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/b9610f867a8d446a0bf5ff46c164218a764aae06
b1463c2 merge: propagate review fixes from feat/query-safety-tri-11165 kathiekiwi Aug 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/b1463c23382ba6f0d5cdd6f0db16be631044f59d
6db1133 merge: propagate wave-2 review fixes from feat/query-safety-tri-11165 kathiekiwi Aug 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/6db11332e04e64a5d2bf242af583f80883279632
d7321e5 merge: propagate org-purge best-effort from feat/query-safety-tri-11165 kathiekiwi Aug 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/d7321e5ed495400fbc401d247507cd7d3497bb51
f06235c merge: propagate review-comment fixes from feat/query-safety-tri-11165 kathiekiwi Aug 10, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/f06235c4f83e44969c4840af8bee0c1f730a0750
074da82 merge: propagate second-pass fixes from feat/query-safety-tri-11165 kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/074da827c6e8e7cf2c0313af581fae72d10d7b9d
c93380e merge: propagate server-changes consolidation from feat/query-safety-… kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/c93380eafba2f4c53f0813e07fc3f697d444ed92
08ee567 merge: propagate changeset consolidation and note restoration from fe… kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/08ee567acc3dbf755f4a8a00ff2a4f52566be6b5
112b837 merge: propagate base UI relocation + drizzle attribution kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/112b837a4eb448c01af562b27284f46ded323215
a036345 merge: propagate the tsql linter test fix from feat/query-safety-tri-… kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/a036345eab4bfda3255d32409ddfc93e47cb31d4
873cebc merge: propagate card-test relocation kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/873cebc496f13fb44452fe3c6b821e3c4de15064
7428874 chore: merge feat/query-safety-tri-11165 (main sync) kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/74288749180fcbaf85724119e5610ec90f636f5c
bc3e5d0 chore: merge feat/query-safety-tri-11165 (review fixes) kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/bc3e5d08e21674f3ae2633c63dd2bbf06bbf7f64
06ca8d1 test(webapp): exercise a mid-write turn failure in the durable-resume… kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/06ca8d19124a45c57f5b86a2ee73b1548f4a509e
4dbb314 chore: merge feat/query-safety-tri-11165 (review fixes round 2) kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/4dbb314582db9b96da985b6e36170c23d8569eed
656d607 test(webapp): tear the durable-resume turn with an order-independent … kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/656d607c899e8b5b9930a3dc0ce38b98b2d93d2d
78bf74f chore: merge feat/query-safety-tri-11165 (review fixes round 3) kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/78bf74f5e1a9b153cd2742299386dffdf36a9bb7
8b40a62 chore: merge feat/query-safety-tri-11165 (review fixes round 3) kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/8b40a62eb9dfb7c9f7ea1868e1f5e805ace69124
037cd9f chore: merge feat/query-safety-tri-11165 (composer escape follow-up) kathiekiwi Aug 11, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/037cd9f386148ef65c5e9c1a4661fde75d40773a
cab27fd chore: merge feat/query-safety-tri-11165 (main sync post-#4529) kathiekiwi Aug 12, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/cab27fdd708704589acea2de82c0f99a279d08b4
d23718c chore: merge feat/query-safety-tri-11165 (review fixes) kathiekiwi Aug 12, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/d23718c5f577d819b430bcd655a990e0b20fb758
ce7b6e6 chore: merge feat/query-safety-tri-11165 (prompt re-send guard) kathiekiwi Aug 12, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/ce7b6e635886cf30b0f7e8b5e45386d86babdfcb
315c426 chore: merge feat/query-safety-tri-11165 (main sync post-#4525) kathiekiwi Aug 12, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4550/commits/315c426ea70a17606193f0c2be774cc2d889d554
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4550/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4550/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4550/files
dashboardAgentDurableResume.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4550/files#diff-3da8da6c40af02a995d01ccb7ba3c33fecd5bff94a66342f67637138c62694aa
dashboardAgentTenantIsolation.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4550/files#diff-a51b8dbe496ca9b68993cdf0d4d7b4d51d8e550e051dfcf1bc3872b1b3abf2d2
apps/webapp/test/dashboardAgentDurableResume.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4550/files#diff-3da8da6c40af02a995d01ccb7ba3c33fecd5bff94a66342f67637138c62694aa
View file https://github.com/triggerdotdev/trigger.dev/blob/315c426ea70a17606193f0c2be774cc2d889d554/apps/webapp/test/dashboardAgentDurableResume.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4550/{{ revealButtonHref }}
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4550/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4550/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.