René's URL Explorer Experiment


Title: fix(consent): stop asking for consent from a policy we failed to fetch by waleedlatif1 · Pull Request #7766 · simstudioai/sim · GitHub

Open Graph Title: fix(consent): stop asking for consent from a policy we failed to fetch by waleedlatif1 · Pull Request #7766 · simstudioai/sim

X Title: fix(consent): stop asking for consent from a policy we failed to fetch by waleedlatif1 · Pull Request #7766 · simstudioai/sim

Description: Summary Emir reported the cookie banner coming back "every 1/15 times" on login, for an account that had already answered it. It isn't the banner updating — it's a failure mode, and each occurrence silently destroys his recorded consent. What happens The policy lookup is a cross-origin GET /init to the consent instance. That origin intermittently answers a bot challenge instead of the policy: HTTP/2 403 x-vercel-mitigated: challenge content-type: text/html ← Vercel Security Checkpoint page A browser fetch() can't solve a JS challenge, so it just gets the 403. The runtime then logs API request failed, falling back to offline mode for consent banner and substitutes policyDefaults.offlineOptInBanner() — a generic opt-in policy — and carries on as if the lookup had succeeded. Consent records the fingerprint of the policy it was given under. The substituted policy never matches, so updateStore treats it as a material policy change and does this: if (storedPolicyFingerprint && storedPolicyFingerprint !== currentPolicyFingerprint) { deleteConsentFromStorage(...) set({ consents: resetConsents, consentInfo: null }) } Stored consent is deleted, and with an opt-in policy and no record the banner returns — asking a question the visitor's jurisdiction may not even require. Reproduced against production: after consent -> banner gone : true c15t cookie : present after one challenged /init -> banner back : true c15t cookie : DELETED console: "API request failed, falling back to offline mode for consent banner" The challenge is sticky per IP for ~3 minutes, which is why it reads as occasional bursts rather than every load. The fix here The banner renders only when the policy was actually resolved (initDataSource !== 'offline-fallback'). A load that fell back asks nothing; the next load that reaches the real policy asks if it still needs to. Why not the documented same-origin proxy c15t documents a /api/c15t/:path* rewrite, which would also dodge the challenge. It would break geo detection for us, so I did not use it — and recorded why next to the constant so it isn't "optimized" in later. The instance resolves jurisdiction from the address the request arrives from. Measured against the live instance, every forwarding header we could send is ignored: Header sent Resolved (baseline) CCPA / US-CA x-forwarded-for: CCPA / US-CA x-real-ip, true-client-ip, cf-connecting-ip CCPA / US-CA x-vercel-ip-country: DE CCPA / US-CA x-c15t-country: DE GDPR / europe_opt_in Only c15t's own override is honored, and Sim has no edge that supplies a country header to map into it (no CloudFront/Cloudflare in front — checked). Behind a proxy every visitor would resolve to our region and no one in the EU would be asked for consent at all — a worse outcome than the bug. The SSR prefetch path has the same dependency via extractRelevantHeaders. I also checked offlinePolicy (only consulted for mode: 'offline', not the hosted fallback — resolveFallbackPolicy({}) is called with an empty object) and customFetch/retryConfig (destructured as unused in the pinned 2.2.1). No config lever exists. Type of Change Bug fix Testing type-check, lint:check, all 46 check:audits, and the consent suites pass. New test covers both directions — asks on backend/backend-cache-hit/ssr, asks nothing on offline-fallback — and I verified it goes red when the guard is removed. Residual, and the real fix This stops the spurious prompt. It does not stop the underlying lookup failure: a challenged load still clears the stored consent inside the runtime before we render, so a visitor whose jurisdiction requires consent will be asked again on their next successful load. That's fail-safe (tracking stays denied until they answer) but it is not free. The root cause belongs to the consent instance: an endpoint browsers call over XHR must not be behind a JS bot challenge. That needs turning off for /init and /subjects on inth's side. 🤖 Generated with Claude Code https://claude.ai/code/session_015tTS2kSemtRPmTq9ezGRCc

Open Graph Description: Summary Emir reported the cookie banner coming back "every 1/15 times" on login, for an account that had already answered it. It isn't the banner updating — it's a failure mode, a...

X Description: Summary Emir reported the cookie banner coming back "every 1/15 times" on login, for an account that had already answered it. It isn't the banner updating — it's a...

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

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:0df606af-8618-c04e-eec9-9e6fe00f0d7f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9832:2A369:2E231C:42597A:6AFB3742
html-safe-nonceb489672d8cd6ef1e7fa7f5b3e973f978f8f292f4582b367f4747ea91babbb48f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODMyOjJBMzY5OjJFMjMxQzo0MjU5N0E6NkFGQjM3NDIiLCJ2aXNpdG9yX2lkIjoiMTMzMTYxMjY2NjI0MjgwMzg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac2de940ab17de7672df66a4e017de624b15edd370148c07cb73c81d9797add21b
hovercard-subject-tagpull_request:4508381769
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/7766/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 Emir reported the cookie banner coming back "every 1/15 times" on login, for an account that had already answered it. It isn't the banner updating — it's a failure mode, a...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2169b0dfbef67ed6b128074a5ed45bb7d5d1859783b10178b09a7765ad5f3693
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
release3b4fc8df5ef1c6757e733a23e6b81b6725021823
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/7766/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7766%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%2F7766%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/7766/files
Reloadhttps://github.com/simstudioai/sim/pull/7766/files
Reloadhttps://github.com/simstudioai/sim/pull/7766/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests198 (198)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
investigate/consent-banner-flappinghttps://github.com/simstudioai/sim/tree/investigate/consent-banner-flapping
Conversation 5 https://github.com/simstudioai/sim/pull/7766
Commits 2 https://github.com/simstudioai/sim/pull/7766/commits
Checks 31 https://github.com/simstudioai/sim/pull/7766/checks
Files changed https://github.com/simstudioai/sim/pull/7766/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7766/files
fix(consent): stop asking for consent from a policy we failed to fetch https://github.com/simstudioai/sim/pull/7766/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/7766/files
1247354 fix(consent): stop asking for consent from a policy we failed to fetch waleedlatif1 Sep 11, 2026 https://github.com/simstudioai/sim/pull/7766/commits/1247354641baa3caa343e06937b77c5bc1fd24c1
2da92a0 fix(consent): keep the explicitly opened dialog working during a fall… waleedlatif1 Sep 11, 2026 https://github.com/simstudioai/sim/pull/7766/commits/2da92a0641fd5ec3a0fbe0ade5d905f2e4ee9bd7
Clear filters https://github.com/simstudioai/sim/pull/7766/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7766/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7766/files
consent-banner.test.tsx https://github.com/simstudioai/sim/pull/7766/files#diff-5a18a04e6c62297855ff5a4bdd3ad114ae0cb26395c426c87328116e459c99e2
consent-banner.tsx https://github.com/simstudioai/sim/pull/7766/files#diff-2bf236bc1bf6e9b9f559732c18a782041fe6c155c680172c096c673a4ca56c43
constants.ts https://github.com/simstudioai/sim/pull/7766/files#diff-693340d7b64f7338c07d7fb05888e5fa798ebc7e4480193e6442be30b5172058
apps/sim/app/_shell/consent/consent-banner.test.tsxhttps://github.com/simstudioai/sim/pull/7766/files#diff-5a18a04e6c62297855ff5a4bdd3ad114ae0cb26395c426c87328116e459c99e2
View file https://github.com/simstudioai/sim/blob/2da92a0641fd5ec3a0fbe0ade5d905f2e4ee9bd7/apps/sim/app/_shell/consent/consent-banner.test.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7766/{{ revealButtonHref }}
apps/sim/app/_shell/consent/consent-banner.tsxhttps://github.com/simstudioai/sim/pull/7766/files#diff-2bf236bc1bf6e9b9f559732c18a782041fe6c155c680172c096c673a4ca56c43
View file https://github.com/simstudioai/sim/blob/2da92a0641fd5ec3a0fbe0ade5d905f2e4ee9bd7/apps/sim/app/_shell/consent/consent-banner.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7766/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7766/files#diff-2bf236bc1bf6e9b9f559732c18a782041fe6c155c680172c096c673a4ca56c43
https://github.com/simstudioai/sim/pull/7766/files#diff-2bf236bc1bf6e9b9f559732c18a782041fe6c155c680172c096c673a4ca56c43
https://github.com/simstudioai/sim/pull/7766/files#diff-2bf236bc1bf6e9b9f559732c18a782041fe6c155c680172c096c673a4ca56c43
apps/sim/lib/consent/constants.tshttps://github.com/simstudioai/sim/pull/7766/files#diff-693340d7b64f7338c07d7fb05888e5fa798ebc7e4480193e6442be30b5172058
View file https://github.com/simstudioai/sim/blob/2da92a0641fd5ec3a0fbe0ade5d905f2e4ee9bd7/apps/sim/lib/consent/constants.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7766/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7766/files#diff-693340d7b64f7338c07d7fb05888e5fa798ebc7e4480193e6442be30b5172058
https://github.com/simstudioai/sim/pull/7766/files#diff-693340d7b64f7338c07d7fb05888e5fa798ebc7e4480193e6442be30b5172058
Please reload this pagehttps://github.com/simstudioai/sim/pull/7766/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.