Repository navigation
feat: status.hellonear.xyz, a status page for HelloNear and its providers - #302
Conversation
…ts providers Two outages from outside our code in one night (13 Nov: NEAR AI embeddings hung, 1Click quotes timed out) were found only by curl. apps/status is a small Next.js page for Vercel that reads the backend's public GET /v1/status: an overall banner, what is down and what users see because of it, and per service 48 half-hour bars for the last 24 h with uptime. Server-rendered and revalidated every 30 s, refreshed every minute while visible; if the API can't be read it says so instead of showing all down. Web app tokens, light and dark. STATUS_FIXTURE=1 shows the 13 Nov outages for local work. Tests: typecheck clean; node:test 3/3 (lib); next build passes. Checked in Chrome on localhost with the fixture. CI workflow `status` added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
Axel asked for status.claude.com's hover card and Past Incidents. Each bar now opens a small card: the time range (UTC), its state, about how long it was bad (bad checks x 5 min), the last problem's detail and the number of checks (optional bucket fields from the backend). Below the services, the last 7 UTC days list the backend's incidents (runs of failed checks of one service), Ongoing or Resolved with the duration; quiet days say so. The card no longer clips the tooltip. All times are UTC and labelled, since the page is rendered on the server. Tests: typecheck clean; node:test 4/4. Checked in Chrome on localhost with the fixture (hover card near the right edge, past incidents). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
…e GET /v1/status For status.hellonear.xyz. The backend probes 9 services in parallel every 5 minutes (HelloNear API and engine, NEAR AI chat and embeddings through the engine's new /internal/v1/probes, 1Click dry quote, OutLayer, FastNear RPC, NEAR AI Agent Market, Phala TEE Explorer), keeps 8 days in a new service_checks table, and answers a public GET /v1/status (CORS *, cached 30 s): per service status, latency, impact, 24 h / 7 d uptime, 48 half-hour buckets with checks/bad/detail, and incidents (runs of failed checks, last 7 days). A failing probe never stops the others; without the engine NEAR AI reads unknown, not a guess. Thresholds per service in docs/api-contract.md. Tests: be typecheck; test:unit 38/38; status.test.ts 6/6 (local Postgres, fake upstreams: shape, CORS, order, statuses, incidents, cache, pruning); full be suite 153 pass / 0 fail / 1 skipped before the last two contract additions. engine typecheck; test:unit 191/191 (probes 3/3); 401 without the key. Load: cached 500 req, 10 concurrent, 0 errors, p95 6.2 ms; uncached worst case p95 970 ms. Live probe run 13 Nov: NEAR AI chat and embeddings up again, 1Click quote down (500 after 25 s), the rest up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
A single failed check painted a whole half hour red. Now a bar is green
when every check was fine ("No downtime recorded in this half hour"),
yellow for a partial outage (some checks failed, or it was only slow) and
red for a major outage (every check failed), from the bucket's checks/bad.
Tests: typecheck clean; node:test 5/5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
… up its rows The backend's "degraded" also covers a provider being down while HelloNear answers, so "Some services are slow" was wrong (1Click was down, not slow): it now reads "Partial outage: some services are having problems", and "down" (HelloNear's own API or engine) reads "Major outage". The status test now deletes its fake-upstream rows afterwards: they stayed in the dev database and a local backend showed 4 ms 1Click answers. Tests: status typecheck clean. The be status test runs before the PR (it clears the table the local check reads). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
Live now table and API reference (63 operations). The status row in Live now points at the page that goes up on Vercel after this merge. Docs only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
|
@Lexirieru the
Backend part (
DNS after the merge: I'll tell James the exact record ( |
Bun 1.4 on the laptop wrote lockfileVersion 2, which CI's Bun 1.3.9 can't
read ("Unknown lockfile version", frozen install failed). Regenerated with
bun@1.3.9; a frozen install passes with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
|
Merged ( Next:
@AncungAulia @Nabil-Aufa FYI: status.hellonear.xyz will show whether HelloNear and its providers (NEAR AI, 1Click, OutLayer, RPC, Agent Market, TEE Explorer) are up, handy while you test #298. |
|
Live on the hosted demo:
|
|
@Lin1er the status page is on Vercel now (project
This is the exact record |
@Lin1er @AncungAulia @Nabil-Aufa On 13 Nov, two outages came from outside our code in one night: NEAR AI's embeddings hung, and 1Click quotes timed out. We only found them with curl. This PR adds a public status page so the team and the judges can see that at a glance.
What
apps/be/src/status.ts,statusMath.ts, migration016_service_checks.sql):/internal/v1/probes, because only the engine has the key;GET /v1/status(CORS*, cached 30 s) with, per service:checks/bad/detail;incidents(runs of failed checks) from the last 7 days.docs/api-contract.md.apps/status(new Next.js app, deployed on Vercel), modelled on status.claude.com:status. Docs:apps/status/CLAUDE.md, rootCLAUDE.md, both API docs, README (Live now table, 63 operations).Tests (local)
test:unit38/38;status.test.ts6/6 against local Postgres with fake upstreams (some up, one slow, one 500, engine down). It checks the shape, CORS, order, statuses, incidents, the cache and pruning, and now cleans up its rows afterwards;bun run test: 156 pass, 0 fail, 1 skipped.test:unit191/191 (probes 3/3, 401 without the key).next buildpasses.GET /v1/statuswith 7 days of rows:After merge (needs Axel / James)
verceland thenvercel --prodfromapps/status.STATUS_API_URLdefaults tohttps://api.hellonear.xyz/v1/status.CNAME status → cname.vercel-dns.comin thehellonear.xyzCloudflare zone (DNS only, not proxied); Axel adds the domain in Vercel. This is a DNS change, so it needs Axel's approval (given).Approved by Axel (PR and merge).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e