René's URL Explorer Experiment


Title: fix(project-files): requeue rendered-artifact search after commit and trim Project read transactions by waleedlatif1 · Pull Request #9063 · simstudioai/sim · GitHub

Open Graph Title: fix(project-files): requeue rendered-artifact search after commit and trim Project read transactions by waleedlatif1 · Pull Request #9063 · simstudioai/sim

X Title: fix(project-files): requeue rendered-artifact search after commit and trim Project read transactions by waleedlatif1 · Pull Request #9063 · simstudioai/sim

Description: Summary All changes are on flag-gated Project file paths (behind the projects rollout) plus small shared helpers whose workspace behavior is unchanged. Lock upgrade in Project artifact reads. readArtifact holds the Project lock and the source row shared, but its final transaction called markFileSearchArtifactReadyInTx, which takes the Project lock exclusively and file rows FOR UPDATE. Every compiled render did this (a cache hit still returns artifactKey), so concurrent generated-document reads in one Project could deadlock or wait out the 5 s Project lock timeout. The read now records the search completion and requeues after commit via requeueFileSearchForRenderedArtifact (lock-free current check, then its own transaction). That transaction now takes the owner lock under the 1 s artifact-ready bound instead of the 5 s Project lock bound; a timeout is caught and logged and never fails the read. Fewer authorized transactions. Artifact, inline, and CSV preview reads authorize from their own snapshots (prepareFromSnapshot) instead of a separate preflight. Artifact inputs are snapshotted and admitted only when the source references any; the final transaction still rechecks the source, every input, and provenance after storage reads. Artifact: 4 transactions / 3 admissions → 2 / 2 without inputs, 3 / 3 with. Inline and CSV: 3 → 2. Search: drops the nested listProjectFileFolders use case. Artifact inputs. Downloads run with bounded concurrency after checking declared sizes against the per-file and total budgets. Each read is capped at its declared size plus the unclaimed budget, and the first failure aborts the rest. The request signal now reaches render, downloads, and compile. Project inline delivery streams instead of buffering. It fences the file head after storage opens and serves workspaceFileCacheControl(contentAddressed) like workspace inline. It no longer lists every Project folder. Project search admits, withholds stale previews, and reports provenance after its snapshot commits. loadFileSearchDelivery returns an explicit current set, and provenance is classified only when a content gate or delivery observer needs it. Foreign page embeds. A Project page that embeds another owner's image now fails as a missing input (not_found) instead of a 500, through a typed ProjectPageForeignEmbedError. Cleanup. Page inline limits are exported from page-document.server.ts and reused. knip.jsonc narrows the project-files.ts entry to types. SearchProjectFileContentInput is un-exported. The CI isolate build step uses paths: ["."] and JOBS=4, matching docker/app.Dockerfile. Expected rebase conflicts in the open Project file stack: #9018: none expected. #9019 and #9034 (still based on pre-squash #9017): conflicts in artifacts.ts, previews.ts, search.ts, artifact-ready.ts, delivery.ts, and checks.yml; take staging's side. The #9034 inline route must present the new stream result (stream, contentLength, contentAddressed). readProjectFileArtifact keeps file.folderPath for its VFS paths. Type of Change Bug fix Testing Biome on all changed files; lib/workspace-files/page-compile.test.ts. New integration checks in content-rendered.integration.ts: A generated artifact read beside a concurrent shared Project holder completes and requeues search. On the previous code it times out on the exclusive Project lock. A contended requeue gives up within its short bound without failing the read. A Project page embedding another owner's image is not_found. 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 All changes are on flag-gated Project file paths (behind the projects rollout) plus small shared helpers whose workspace behavior is unchanged. Lock upgrade in Project artifact reads. read...

X Description: Summary All changes are on flag-gated Project file paths (behind the projects rollout) plus small shared helpers whose workspace behavior is unchanged. Lock upgrade in Project artifact reads. read...

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

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:8a6f22c6-7e12-7bdd-f0f5-3e4ed550a7dc
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC30C:2E7BAB:9EB60D:DAB5AA:6AFB4FC3
html-safe-nonce3909191b1098657911e37d15e171397496ef80c690beace53ea4e77f1a04088a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzBDOjJFN0JBQjo5RUI2MEQ6REFCNUFBOjZBRkI0RkMzIiwidmlzaXRvcl9pZCI6IjEwOTIxODA4NTQ4MzU5OTA0NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbc75aa1e025b78d11a284c003b04f3b550656ca6a2cfbd82a19861052164f0d9
hovercard-subject-tagpull_request:4866918240
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/9063/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 All changes are on flag-gated Project file paths (behind the projects rollout) plus small shared helpers whose workspace behavior is unchanged. Lock upgrade in Project artifact reads. read...
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/9063/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9063%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%2F9063%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/9063/files
Reloadhttps://github.com/simstudioai/sim/pull/9063/files
Reloadhttps://github.com/simstudioai/sim/pull/9063/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/project-file-artifact-lockinghttps://github.com/simstudioai/sim/tree/fix/project-file-artifact-locking
Conversation 8 https://github.com/simstudioai/sim/pull/9063
Commits 2 https://github.com/simstudioai/sim/pull/9063/commits
Checks 52 https://github.com/simstudioai/sim/pull/9063/checks
Files changed https://github.com/simstudioai/sim/pull/9063/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9063/files
fix(project-files): requeue rendered-artifact search after commit and trim Project read transactions https://github.com/simstudioai/sim/pull/9063/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/9063/files
a618053 fix(project-files): requeue rendered-artifact search after commit and… waleedlatif1 Oct 15, 2026 https://github.com/simstudioai/sim/pull/9063/commits/a61805346808d6aa9b886280c33da98873c3027e
2383eb9 test(project-files): start requeue checks from no search revision waleedlatif1 Oct 15, 2026 https://github.com/simstudioai/sim/pull/9063/commits/2383eb9ceae29ceca7fdf7229b4cf3f57aba2c56
Clear filters https://github.com/simstudioai/sim/pull/9063/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9063/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9063/files
checks.yml https://github.com/simstudioai/sim/pull/9063/files#diff-3ea54af4839eb75404d71b28252bead7e7ec8f676b1f815e1cde02629a75c165
route.ts https://github.com/simstudioai/sim/pull/9063/files#diff-7d07ca7f5a365944d739e4d40808d4b3e7ce7bc21867ab91d96a1f7215cd5f80
content-rendered.integration.ts https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
artifacts.ts https://github.com/simstudioai/sim/pull/9063/files#diff-ad8c4f2257ac98490421a2dc7a28eef90b13e7e979683ba82f812e9e1ba313c2
previews.ts https://github.com/simstudioai/sim/pull/9063/files#diff-32463245ad6250e98ee92d0f41ff8ace2da2e43776116327bbded1c3340ea782
search.ts https://github.com/simstudioai/sim/pull/9063/files#diff-d28f112d69b37edc69d13cfc60b06f4749b8f5f55bf0ee928d77cd56223a5603
membership.ts https://github.com/simstudioai/sim/pull/9063/files#diff-443e24fbedbb7e5945ae105a87806279c2388bacadc6437e04fd695630271195
page-compile.ts https://github.com/simstudioai/sim/pull/9063/files#diff-6dc3e4ac793ac0a780f35d4cc01cc6c8f38c2114e9e085593d37e10e17463fcb
page-document.server.ts https://github.com/simstudioai/sim/pull/9063/files#diff-ba66ed85dea541292838e2c5952739ddd10b04f2001fa4b7b248f71b9ccdfd17
artifact-ready.ts https://github.com/simstudioai/sim/pull/9063/files#diff-733f0be20894a7e9403d000d38a09d0a433dbc058b7d751620742f836db48c5d
delivery.ts https://github.com/simstudioai/sim/pull/9063/files#diff-197899a8234fefdea4d171551061f520899f7f58ffab57a601ecd97e2b0490be
owner-policy.ts https://github.com/simstudioai/sim/pull/9063/files#diff-e29523207861b0c6666dcfef5326906eef23d23cded06f07c8c84ffebee0198f
knip.jsonc https://github.com/simstudioai/sim/pull/9063/files#diff-48d5ba4681726b42e98dae10c08bd94f7f9836644c8f183c6475d10dcf67ebf1
.github/workflows/checks.ymlhttps://github.com/simstudioai/sim/pull/9063/files#diff-3ea54af4839eb75404d71b28252bead7e7ec8f676b1f815e1cde02629a75c165
View file https://github.com/simstudioai/sim/blob/2383eb9ceae29ceca7fdf7229b4cf3f57aba2c56/.github/workflows/checks.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9063/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9063/files#diff-3ea54af4839eb75404d71b28252bead7e7ec8f676b1f815e1cde02629a75c165
https://github.com/simstudioai/sim/pull/9063/files#diff-3ea54af4839eb75404d71b28252bead7e7ec8f676b1f815e1cde02629a75c165
apps/sim/app/api/projects/[id]/files/inline/route.tshttps://github.com/simstudioai/sim/pull/9063/files#diff-7d07ca7f5a365944d739e4d40808d4b3e7ce7bc21867ab91d96a1f7215cd5f80
View file https://github.com/simstudioai/sim/blob/2383eb9ceae29ceca7fdf7229b4cf3f57aba2c56/apps/sim/app/api/projects/%5Bid%5D/files/inline/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9063/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9063/files#diff-7d07ca7f5a365944d739e4d40808d4b3e7ce7bc21867ab91d96a1f7215cd5f80
https://github.com/simstudioai/sim/pull/9063/files#diff-7d07ca7f5a365944d739e4d40808d4b3e7ce7bc21867ab91d96a1f7215cd5f80
apps/sim/lib/projects/files/__integration__/content-rendered.integration.tshttps://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
View file https://github.com/simstudioai/sim/blob/2383eb9ceae29ceca7fdf7229b4cf3f57aba2c56/apps/sim/lib/projects/files/__integration__/content-rendered.integration.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9063/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
https://github.com/simstudioai/sim/pull/9063/files#diff-c7d68be381b8e655ef1f38227557103a222173137808bdc945e57088b95a89b9
Please reload this pagehttps://github.com/simstudioai/sim/pull/9063/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9063/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.