Skip to content

fix(platform): show a failed website scan as a red alert with its reason - #4064

Merged
larryro merged 3 commits into
mainfrom
fix/website-scan-error-alert
Oct 2, 2026
Merged

larryro merged 3 commits into
mainfrom
fix/website-scan-error-alert

Conversation

@larryro

@larryro larryro commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

A website whose scan failed showed its reason as a muted caption ("The embedding model couldn't process the pages.") with the stored reason only on title, so a reader had to hover one small grey line to learn what actually went wrong. Nobody found it.

What changed

  • The website details dialog shows a failed scan as a destructive Alert (red tint, icon), as a failed automation run is shown: the one-line reason as its title, what to do beneath it, and the stored reason itself. The embedding provider's own sentence (401 User not found.) reads inline; any other dump (sandbox JSON, DNS syscalls) is folded under Technical details. Nothing sits on title any more. Applies to both the hollow scan (nothing indexed) and a site that already has pages.
  • The crawl action records the embedding failure's class in the reason it already composes: The embedding model could not embed the pages [credential]: 401 User not found. (credential, credit, unresolved, dimension, upstream). The dialog reads it back to say whom to ask: a rejected credential sends an admin to Settings → AI providers, a billing refusal to the provider's account, an outage to Scan now later, a vector-width mismatch to Settings → Data residency. A reason stored before the class was recorded keeps the model's setting as the hint.
  • Locales: websites.viewDialog.scanDetail.* and websites.viewDialog.technicalDetails in en/de/fr; scanEmpty.embedding retired (the plain "Nothing was indexed." plus the class hint replaces it).
  • Docs: the crawling guide's Error rows (en/de/fr) say where the reason now reads; the REST reference documents the [<class>] token in metadata.lastSyncError.
  • Manual: KNOW-F18 describes the Alert, the hint and the fold; reference/automation.md row updated.

Proof

  • backend/core/knowledge/crawl_action.vectors.test.ts expects the class token per failure (15 pass); backend crawl + websites suites 168 pass.
  • app/features/websites UI tests 92 pass, including: the hollow runtime dump is under a closed <details> and not on title; the embedding sentence is visible; the [credential] token picks the AI-providers hint and never renders.
  • Guards (error-message-description, single-failure-toast), locale parity (lib/i18n/messages.test.ts), check-guide on the knowledge suite, lint:manual, oxlint --type-aware, tsc --noEmit, format:check: all green.
  • Not observed in a browser: no local stack was running. The Alert is the same component the automation run detail uses.

The website details dialog showed a failed scan as a muted caption with
the stored reason only on `title`, where nobody found it. It is now a
destructive Alert with the reason beneath: the embedding provider's own
sentence inline, any other dump under "Technical details". The crawl
action records the embedding failure's class in the reason
(`[credential]`, `[credit]`, `[unresolved]`, `[dimension]`, `[upstream]`)
so the dialog can say whom to ask.
@larryro

larryro commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Observed live on the local dev stack running this branch (2026-10-02 12:18 CST), after a Scan now on a 300-page site whose embedding provider ran out of quota mid-scan. The dialog's page section reads, as a destructive Alert (role alert):

The embedding model couldn't process the pages.
The provider refused the request over the account's balance or plan. An admin can check the account at the provider.
429 Allocated quota exceeded, please increase your quota limit. For details, see: https://www.alibabacloud.com/help/en/model-studio/error-code#token-limit

metadata.lastSyncError on the row: The embedding model could not embed the pages [credit]: 429 Allocated quota exceeded, … — the [credit] class picked the billing hint. Earlier the same stack showed the runtime class for a render-lane halt (The last scan didn't finish. with the sandbox's sentence folded under Technical details).

…ll lane

A lane that never settles held the Backend integration job until CI's
30-minute wall, which names no lane. Each lane now runs under a
10-minute deadline and the probes between lanes under 2 minutes; a
breach truncates the run under the lane's own name. The step trace in
checkBellHintWire is temporary, to pin the hung await in CI.
@larryro

larryro commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Backend integration: the two 30-minute walls

Both runs on 21455bf (02:36 and 03:40 UTC) went silent 4 s after PASS collab emitters … and never printed PASS personal bell hint wire …. The process stayed alive (the 10-minute [documents] replacement cleanup timer kept logging), the embedding-mock ECONNREFUSED retries are the same noise a green run carries (165 lines there), Postgres and MinIO logs are clean, dependencies were freshly installed. After id normalisation the log up to the hang is line-identical to a green run.

What was tried:

  • main: 13/13 green over the last two days; the sibling branch (feat(platform): filter a website's pages to the failed or skipped ones #4065, same base) green.
  • the full suite locally on 21455bf (throwaway tale-db built from the tree, PG + MinIO): 1264/1264, twice; checkCollabEmitters + checkBellHintWire alone: green.
  • 3cea64a = the same code plus a harness deadline (10 min per lane, 2 min per inter-lane probe) and a step trace inside the bell lane: CI green 2/2, and the trace never saw a hang.

So this is a CI-only race between the end of checkCollabEmitters and the first record() of checkBellHintWire (the inter-lane probes GET /api/auth/get-session + the member query, or the lane's sign-up / members POST / connectSse → abort() → done). It is not reproduced by anything in this PR's own change (a string the crawl writes and the dialog that reads it), and I could not pin the stuck await without a reproduction.

What stays in this PR: withinDeadline in the lane runner. A lane that does not settle in 10 minutes — or a probe in 2 — now truncates the run as RUN TRUNCATED at lane N (name) — … did not settle within …, so the next occurrence names its spot in the job summary instead of a nameless wall. The bell-lane trace was removed again (5447edb).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant