Title: Faultmark scanned this repo and found 4 verified bugs · Issue #8145 · formbricks/formbricks · GitHub
Open Graph Title: Faultmark scanned this repo and found 4 verified bugs · Issue #8145 · formbricks/formbricks
X Title: Faultmark scanned this repo and found 4 verified bugs · Issue #8145 · formbricks/formbricks
Description: Hey formbricks team, I've been building Faultmark, an AI scanner that runs a multi-model debate to verify bugs before surfacing them. Ran it on this repo as a real-world test and found 4 confirmed bugs, 0 disputed. Sharing before posting...
Open Graph Description: Hey formbricks team, I've been building Faultmark, an AI scanner that runs a multi-model debate to verify bugs before surfacing them. Ran it on this repo as a real-world test and found 4 confirmed ...
X Description: Hey formbricks team, I've been building Faultmark, an AI scanner that runs a multi-model debate to verify bugs before surfacing them. Ran it on this repo as a real-world test and found 4 confir...
Opengraph URL: https://github.com/formbricks/formbricks/issues/8145
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Faultmark scanned this repo and found 4 verified bugs","articleBody":"Hey formbricks team,\n\nI've been building Faultmark, an AI scanner that runs a \nmulti-model debate to verify bugs before surfacing them. Ran it on this repo \nas a real-world test and found 4 confirmed bugs, 0 disputed. Sharing before \nposting anything publicly.\n\n---\n\n## 🔴 High Severity (1)\n\n**1. doesNotIncludeAllOf logic is inverted**\n`apps/web/lib/surveyLogic/utils.ts:445`\n\nThe `doesNotIncludeAllOf` operator currently returns true only when NONE of \nthe right values are in the left array, which is `doesNotIncludeAnyOf` \nsemantics. It should return true when at least one right value is missing \nfrom the left array (negation of includesAllOf). This means survey logic \nconditions using this operator silently evaluate to the wrong result.\n\n**Fix:** Change `rightValue.every((v) =\u003e !leftValue.includes(v))` to \n`!rightValue.every((v) =\u003e leftValue.includes(v))`\n\n---\n\n## 🟡 Medium Severity (3)\n\n\u003cdetails\u003e\n\u003csummary\u003e2. loadInitialDisplays error swallowed — displaysError state never set on load failure\u003c/summary\u003e\n\n`apps/web/app/(app)/workspaces/[workspaceId]/surveys/[surveyId]/(analysis)/summary/components/SummaryPage.tsx:108`\n\nWhen `loadInitialDisplays` catches an error, it calls `toast.error()` but \nnever calls `setDisplaysError()`. The `displaysError` state stays null, so \nerror-aware UI components like `SummaryImpressions` never show a retry \ninterface. Users see an empty list and a toast that disappears, with no way \nto retry.\n\n**Fix:** Add `setDisplaysError(error instanceof Error ? error.message : String(error))` \nin the catch block alongside the toast call.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e3. enabledLanguageIds may contain undefined values, breaking language enable/disable logic\u003c/summary\u003e\n\n`apps/web/lib/survey/service.ts`\n\n`enabledLanguageIds` is built with `.map()` using an early return for \ndisabled languages, which creates undefined gaps in the array. The \n`deleteMany` condition `enabled: enabledLanguageIds.includes(languageId)` \nthen always evaluates to false for disabled languages, making the deletion \nfilter semantically wrong. The `enabled` field also should not be part of \na `deleteMany` where clause on a join table.\n\n**Fix:** Use `.filter(l =\u003e l.enabled).map(l =\u003e l.language.id)` instead of \n`.map()` with a conditional return, and remove the `enabled` field from the \n`deleteMany` where clause.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e4. createSurvey returns stale segment state after connecting a segment\u003c/summary\u003e\n\n`apps/web/lib/survey/service.ts:673`\n\nAfter `prisma.survey.update()` connects the segment, the function returns a \n`TSurvey` built from the pre-connect survey fetch. The returned object has \n`segment: null` because the database row was updated but never re-read. \nCallers will always see the wrong segment state after survey creation.\n\n**Fix:** After the segment connect, re-fetch the survey with \n`prisma.survey.findUnique({ where: { id: survey.id }, select: selectSurvey })` \nand use that for the `transformedSurvey` construction.\n\u003c/details\u003e\n\n---\n\nHappy to share the full report or answer any questions. No strings attached, \njust wanted to be useful and get real-world feedback on the tool.\n\n— Rohit\nfaultmark.com","author":{"url":"https://github.com/R0hit-Sriram","@type":"Person","name":"R0hit-Sriram"},"datePublished":"2026-05-26T06:07:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/8145/formbricks/issues/8145"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8fed251f-0ed7-26a4-f18a-d06879dab692 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A82C:2F88AB:3C523A:563DAF:6A4BC77D |
| html-safe-nonce | 7aa1b22a69dbe4de5a14ea4492d56594e4887a93ce991426b842a8f4cd16cc11 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODJDOjJGODhBQjozQzUyM0E6NTYzREFGOjZBNEJDNzdEIiwidmlzaXRvcl9pZCI6IjU1NTk1NDIzMzEyOTAxNDI1ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6a6e32737727a5e48e340c6cd7dd22e7d1f780efb24e78785555e8af85b04e37 |
| hovercard-subject-tag | issue:4521818733 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/formbricks/formbricks/8145/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c14c9a72b84ba04fc364e66f52428c31bb466ee26f9efe58ccbdbc6f2079f651/formbricks/formbricks/issues/8145 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c14c9a72b84ba04fc364e66f52428c31bb466ee26f9efe58ccbdbc6f2079f651/formbricks/formbricks/issues/8145 |
| og:image:alt | Hey formbricks team, I've been building Faultmark, an AI scanner that runs a multi-model debate to verify bugs before surfacing them. Ran it on this repo as a real-world test and found 4 confirmed ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | R0hit-Sriram |
| hostname | github.com |
| expected-hostname | github.com |
| None | 14aa00ce5bdb34d0eefb5facbffd7de9e144c688d8a93ef8df902d5f94b51dd7 |
| turbo-cache-control | no-preview |
| go-import | github.com/formbricks/formbricks git https://github.com/formbricks/formbricks.git |
| octolytics-dimension-user_id | 105877416 |
| octolytics-dimension-user_login | formbricks |
| octolytics-dimension-repository_id | 500289888 |
| octolytics-dimension-repository_nwo | formbricks/formbricks |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 500289888 |
| octolytics-dimension-repository_network_root_nwo | formbricks/formbricks |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58b8f89190447502561829f30862aa0a99d53367 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width