Repository navigation
Description
Summary
When the captcha gate refuses a host page the whole widget fails, and nothing records it. REPORTED_KINDS['captcha-blocked'] is false, so no Sentry event is ever sent, and the only signal is a console line on the host's own page. Since 3 November that gate is live and keyed to an allowlist of host domains, which makes this the widget's most likely production failure and the one failure we cannot observe.
Approach
1. The defect
src/hooks/use-turnstile-guard.ts:79throwsatlasError('captcha-blocked', …)during render.ResetErrorBoundarycatches it, and the visitor getserror.captcha_blockedin place of the atlas (src/components/molecules/Fallbacks/Fallbacks.tsx:257).src/lib/report.ts:210sets'captcha-blocked': false, socaptureErrorreturns at:533before the reporter is loaded.- The reason stated beside the flag does not hold for this path. It says the report POST is itself Turnstile-gated, which is true of the visitor-facing report form and false of
captureError, which posts to the Sentry DSN over@sentry/browser's own fetch transport (:542). Nothing in that path touches the gate. The same wording is sound foroffline, where there is no network to post over; it is not sound here. config, the sibling kind for a host misconfiguration, is reported (:205).- Nothing else covers it.
reportEmbed(src/config/api/mutate.ts:445) sends a mount fingerprint at boot, never a failure — and SahajCloud refuses that POST from a host outside the client'ssiteHosts, so the embeds we cannot hear from are exactly the embeds that are broken.
2. The fix
Report the kind, and correct the comment to a reason that is true.
Noise is the objection, and it is bounded already: dedupeIntegration is in the client (src/lib/report.ts, loadReporter), MAX_EVENTS_PER_PAGE caps a page load, and the transport latches off after one refusal. Tagging is unchanged — atlas.kind already carries the kind.
Weigh one alternative before writing code: SahajCloud's /api/atlas/challenge already answers 403 and already knows the parent host, so it could log every refusal with no client traffic at all. That is the cheaper census, and it is a different repo — see ## Notes. It does not replace this half: only the client knows a visitor actually saw the broken screen.
3. The spec that let it through
src/lib/report.sentry.test.ts:147 — the which failures are worth an event table lists five of the six kinds and omits captcha-blocked, the one whose value is contentious. Add it, and watch the row fail against the current false before counting it (docs/testing.md).
Acceptance criteria
- A
captcha-blockedfailure produces one Sentry event, taggedatlas.kind: 'captcha-blocked'. - The comment beside
REPORTED_KINDS['captcha-blocked']states a reason that is true ofcaptureError, or the entry carries no reason at all. It must not claim the Sentry channel is Turnstile-gated. -
report.sentry.test.ts's table covers everyErrorKind, so a future change to any row is a spec change. - The visitor-facing screen is unchanged:
ERROR_POLICY['captcha-blocked']still offers no report action and still retries.
Verification checklist
-
pnpm test:run src/lib/report.sentry.test.tspasses, and the new row goes red whenREPORTED_KINDS['captcha-blocked']is set back tofalse. -
pnpm test:run src/components/molecules/Fallbackspasses unchanged. -
.claude/skills/pr-prep/check.shpasses. -
pnpm build && pnpm sizestays inside budget.
Notes
Found while verifying #259 on 2026-11-11, by measurement rather than by an error: SahajAtlasWeb's Sentry project carries zero unresolved issues in 14 days, which is what this seam produces whether the gate is healthy or not.
The full question is larger than this repo and may be roadmap-sized. Nothing anywhere notices that a site's map has stopped working: sydevs/SahajCloud#1106's audit sees only hosts that report, POST /api/clients/report refuses a host outside the client's siteHosts (SahajCloud/src/collections/Clients/endpoints/report.ts:148), and VerifyEmbeds skips any client without site.page, which #1106 found is all of them. This ticket is SahajAtlasWeb's half, and it stands on its own. Leaving the promotion to @sydevs-bot revise on a human's call.
#232 is prior art, and it recorded captcha-blocked as never-reported in passing without examining the reason — reasonably, since the parent gate did not exist then.
🤖 Written by the sydevs autonomous loop — see what this is
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
Ardnived commentedon Nov 12, 2026
@sydevs-bot implement
sydevs-bot commentedon Nov 12, 2026
🤖 no session running
approved by Ardnived
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.
refactor(fallbacks): drop the second copy of the reporting rationale