René's URL Explorer Experiment


Title: fix(memory): read note access from an unlocked snapshot and defer unavailable cleanup by waleedlatif1 · Pull Request #9102 · simstudioai/sim · GitHub

Open Graph Title: fix(memory): read note access from an unlocked snapshot and defer unavailable cleanup by waleedlatif1 · Pull Request #9102 · simstudioai/sim

X Title: fix(memory): read note access from an unlocked snapshot and defer unavailable cleanup by waleedlatif1 · Pull Request #9102 · simstudioai/sim

Description: Summary Memory note access (POST /api/mothership/memories/access and the memory_notes_access checkpoint control) now resolves in a read-only repeatable-read transaction with no row or advisory locks. It previously took FOR SHARE on the user, chat, workspace, member and permission rows plus the Project and permission-group locks, so every check committed as a write transaction and blocked writers on those rows (including account deletion's user FOR UPDATE NOWAIT). Allow/deny decisions, permission bits and error codes are unchanged. loadProjectAccess, requireCurrentCopilotProjectInvocation, requireProjectFileOwnerRole and requireCurrentFileSubject gain a snapshot mode; every existing caller keeps its locking reads. Workspace access resolves once per check and derives shared mutation from the resolved role (requireCurrentHumanRole now returns it) instead of a second role lookup. The projects flag is read before the transaction. Memory cleanup events defer hourly without spending attempts when the worker does not serve the cleanup route yet (401 to a customer key, 404/405/501) or when the processor lacks the key or the destination, instead of dead-lettering after ~17 minutes. Cleanup drops the credential-fingerprint and source-env equality checks, which failed whenever the outbox processor's environment differed from the enqueuing app's or the key rotated. It replays the enqueuing deployment's source env, sends the key only to destinations the processor configures, and still parses rows queued with the old fields. Account deletion enqueues cleanup events in one bulk insert instead of one insert per destination and target. Type of Change Bug fix Testing resolve-access.integration.ts: new case resolves workspace-target access for workspace and organization chats while another transaction holds the user row FOR UPDATE and the Project exclusively (blocks on the previous code). cleanup.integration.ts: 404 and an unconfigured destination stay pending with attempts unchanged and an hour's backoff; a row carrying the retired fingerprint field completes (both dead-lettered on the previous code). cleanup-outbox.test.ts, workspace-authorization.test.ts; Biome on changed files. Type-check, audits and integration suites run in CI. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Memory note access (POST /api/mothership/memories/access and the memory_notes_access checkpoint control) now resolves in a read-only repeatable-read transaction with no row or advisory loc...

X Description: Summary Memory note access (POST /api/mothership/memories/access and the memory_notes_access checkpoint control) now resolves in a read-only repeatable-read transaction with no row or advisory loc...

Opengraph URL: https://github.com/simstudioai/sim/pull/9102

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:502fdacd-8719-3bdb-39e1-68dc92821c88
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC9E2:2833F1:A9B0FC:E8F590:6AFB5032
html-safe-nonce1873b49268737121616d4f86a50de530da69f365f52ac6e5d2ecb5df7f47ae6c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUUyOjI4MzNGMTpBOUIwRkM6RThGNTkwOjZBRkI1MDMyIiwidmlzaXRvcl9pZCI6IjE4NjIyMTY5MjEzMzY0Njc1MDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac730c6e15994bec131fbd7d47162141d84719ad5ac02884f11464c842af14ce98
hovercard-subject-tagpull_request:4882677920
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/simstudioai/sim/pull/9102/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Memory note access (POST /api/mothership/memories/access and the memory_notes_access checkpoint control) now resolves in a read-only repeatable-read transaction with no row or advisory loc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
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
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/9102/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9102%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%2Fsimstudioai%2Fsim%2Fpull%2F9102%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=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/9102/files
Reloadhttps://github.com/simstudioai/sim/pull/9102/files
Reloadhttps://github.com/simstudioai/sim/pull/9102/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/memory-access-snapshot-readshttps://github.com/simstudioai/sim/tree/fix/memory-access-snapshot-reads
Conversation 5 https://github.com/simstudioai/sim/pull/9102
Commits 5 https://github.com/simstudioai/sim/pull/9102/commits
Checks 52 https://github.com/simstudioai/sim/pull/9102/checks
Files changed https://github.com/simstudioai/sim/pull/9102/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9102/files
fix(memory): read note access from an unlocked snapshot and defer unavailable cleanup https://github.com/simstudioai/sim/pull/9102/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/9102/files
3aa898d fix(memory): read note access from an unlocked snapshot and defer una… waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9102/commits/3aa898d3a0994d3b8964d35142cc2255e0884626
afcce9a fix(memory): keep the Projects-off refusal after the chat checks and … waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9102/commits/afcce9a2e263a4a09e3313ec8be759501e8bae69
d973889 refactor(memory): reuse the shared role check and one cleanup wait path waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9102/commits/d9738891bf8e7be7f6b8a0c1ec9576e2bbd05d53
b0c85a2 test(memory): use plain latches the app TypeScript lib supports waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9102/commits/b0c85a26b9b7605755bd521f0cfc4849389d18d5
586fe1b fix(memory): accept additive fields in note access and cleanup answers waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9102/commits/586fe1b3ad5b3a58d00818f907108ffcb40fddc9
Clear filters https://github.com/simstudioai/sim/pull/9102/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9102/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9102/files
workspace-authorization.ts https://github.com/simstudioai/sim/pull/9102/files#diff-2b4e149b3b521774f2b4633161c35fda329616f502a23d1bacd8a46e67850f14
memory-notes-access.ts https://github.com/simstudioai/sim/pull/9102/files#diff-9faeeb4d8b64dfc617d4ceb5b108b6ad2354e7ef7e97654b778bab90a9fa82b8
resolve-access.integration.ts https://github.com/simstudioai/sim/pull/9102/files#diff-4d7132b799c5e0656d426f03bb19179ec44031d9baf11d36e3f3f53edf2eb824
resolve-access.ts https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
cleanup-outbox.test.ts https://github.com/simstudioai/sim/pull/9102/files#diff-d4fa6f640c6a5253fd4afa8ebe6c698da03ed38d3320a7bc9224dce8d4ab95cb
cleanup-outbox.ts https://github.com/simstudioai/sim/pull/9102/files#diff-36679b2904ac7e80ca8168f1be00e482c84f94ede467d79bf69b0dea2670a426
cleanup.integration.ts https://github.com/simstudioai/sim/pull/9102/files#diff-f96e1403a06b8a3e7e93ca705c14007cc95093144ac386c74569cd7bcbe6b64b
authorization.ts https://github.com/simstudioai/sim/pull/9102/files#diff-10279ef63d708a13527b7674d2806878002151ff446084d5249aaa3a5d21448f
authorization.ts https://github.com/simstudioai/sim/pull/9102/files#diff-7c9fdf9a64376da0dab5c3130e6de2feb458d48778c6d845c1af61d86d6aedc9
subject.ts https://github.com/simstudioai/sim/pull/9102/files#diff-aa5964aacecb6602a04ee824ec366041696d1497d13685b06fcbf831c9b678e3
apps/sim/lib/core/application/workspace-authorization.tshttps://github.com/simstudioai/sim/pull/9102/files#diff-2b4e149b3b521774f2b4633161c35fda329616f502a23d1bacd8a46e67850f14
View file https://github.com/simstudioai/sim/blob/586fe1b3ad5b3a58d00818f907108ffcb40fddc9/apps/sim/lib/core/application/workspace-authorization.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9102/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9102/files#diff-2b4e149b3b521774f2b4633161c35fda329616f502a23d1bacd8a46e67850f14
https://github.com/simstudioai/sim/pull/9102/files#diff-2b4e149b3b521774f2b4633161c35fda329616f502a23d1bacd8a46e67850f14
https://github.com/simstudioai/sim/pull/9102/files#diff-2b4e149b3b521774f2b4633161c35fda329616f502a23d1bacd8a46e67850f14
https://github.com/simstudioai/sim/pull/9102/files#diff-2b4e149b3b521774f2b4633161c35fda329616f502a23d1bacd8a46e67850f14
https://github.com/simstudioai/sim/pull/9102/files#diff-2b4e149b3b521774f2b4633161c35fda329616f502a23d1bacd8a46e67850f14
apps/sim/lib/mothership/generated/memory-notes-access.tshttps://github.com/simstudioai/sim/pull/9102/files#diff-9faeeb4d8b64dfc617d4ceb5b108b6ad2354e7ef7e97654b778bab90a9fa82b8
View file https://github.com/simstudioai/sim/blob/586fe1b3ad5b3a58d00818f907108ffcb40fddc9/apps/sim/lib/mothership/generated/memory-notes-access.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9102/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9102/files#diff-9faeeb4d8b64dfc617d4ceb5b108b6ad2354e7ef7e97654b778bab90a9fa82b8
https://github.com/simstudioai/sim/pull/9102/files#diff-9faeeb4d8b64dfc617d4ceb5b108b6ad2354e7ef7e97654b778bab90a9fa82b8
https://github.com/simstudioai/sim/pull/9102/files#diff-9faeeb4d8b64dfc617d4ceb5b108b6ad2354e7ef7e97654b778bab90a9fa82b8
apps/sim/lib/mothership/memories/application/resolve-access.integration.tshttps://github.com/simstudioai/sim/pull/9102/files#diff-4d7132b799c5e0656d426f03bb19179ec44031d9baf11d36e3f3f53edf2eb824
View file https://github.com/simstudioai/sim/blob/586fe1b3ad5b3a58d00818f907108ffcb40fddc9/apps/sim/lib/mothership/memories/application/resolve-access.integration.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9102/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9102/files#diff-4d7132b799c5e0656d426f03bb19179ec44031d9baf11d36e3f3f53edf2eb824
https://github.com/simstudioai/sim/pull/9102/files#diff-4d7132b799c5e0656d426f03bb19179ec44031d9baf11d36e3f3f53edf2eb824
https://github.com/simstudioai/sim/pull/9102/files#diff-4d7132b799c5e0656d426f03bb19179ec44031d9baf11d36e3f3f53edf2eb824
https://github.com/simstudioai/sim/pull/9102/files#diff-4d7132b799c5e0656d426f03bb19179ec44031d9baf11d36e3f3f53edf2eb824
https://github.com/simstudioai/sim/pull/9102/files#diff-4d7132b799c5e0656d426f03bb19179ec44031d9baf11d36e3f3f53edf2eb824
apps/sim/lib/mothership/memories/application/resolve-access.tshttps://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
View file https://github.com/simstudioai/sim/blob/586fe1b3ad5b3a58d00818f907108ffcb40fddc9/apps/sim/lib/mothership/memories/application/resolve-access.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9102/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
https://github.com/simstudioai/sim/pull/9102/files#diff-2084001238853603257049033967cc77203ec494abcc70aad83692477658b0bf
apps/sim/lib/mothership/memories/cleanup-outbox.test.tshttps://github.com/simstudioai/sim/pull/9102/files#diff-d4fa6f640c6a5253fd4afa8ebe6c698da03ed38d3320a7bc9224dce8d4ab95cb
View file https://github.com/simstudioai/sim/blob/586fe1b3ad5b3a58d00818f907108ffcb40fddc9/apps/sim/lib/mothership/memories/cleanup-outbox.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9102/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9102/files#diff-d4fa6f640c6a5253fd4afa8ebe6c698da03ed38d3320a7bc9224dce8d4ab95cb
https://github.com/simstudioai/sim/pull/9102/files#diff-d4fa6f640c6a5253fd4afa8ebe6c698da03ed38d3320a7bc9224dce8d4ab95cb
Please reload this pagehttps://github.com/simstudioai/sim/pull/9102/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9102/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.