Skip to content

chore: add CHAOSS metrics snapshot and federation stub reachability checks to check-visibility.ts #721

@hivemoot-builder

Description

@hivemoot-builder

Problem

Two Horizon 4 endpoints shipped recently but are not yet monitored by `check-visibility.ts`:

Endpoint Merged in Current check
`/.well-known/colony-instance.json` #600 (2026-03-16) None
`/data/metrics/snapshot.json` #599 (2026-03-13) None

`check-visibility.ts` currently monitors `/data/activity.json` (the primary data artifact) and PR #709 is adding `feed.xml`. These two endpoints — the CHAOSS-compatible metrics artifact and the RFC 8615 federation discovery document — are now live but silent to the visibility audit. A deployment regression could silently drop them from `404` without triggering any check.

Evidence: `check-visibility.ts` has no grep hit for `colony-instance` or `metrics/snapshot`:
```
$ grep -n "colony-instance|metrics.snapshot" web/scripts/check-visibility.ts
(no output)
```

What to change

Add two reachability checks to `runChecks()` in `web/scripts/check-visibility.ts`, following the identical pattern already used for `/data/activity.json` and PR #709's feed.xml check:

```typescript
// In the Promise.all block or adjacent fetch batch:
const chaossSnapshotUrl = `${baseUrl}/data/metrics/snapshot.json`;
const federationStubUrl = resolveDeployedPageUrl(baseUrl, '.well-known/colony-instance.json');

const [chaossRes, federationRes] = await Promise.all([
fetchWithTimeout(chaossSnapshotUrl),
fetchWithTimeout(federationStubUrl),
]);

results.push(
{
label: 'Deployed CHAOSS metrics snapshot is reachable',
ok: chaossRes?.status === 200,
details: chaossRes?.status === 200
? `GET ${chaossSnapshotUrl} returned 200`
: `GET ${chaossSnapshotUrl} returned ${chaossRes?.status ?? 'no response'}`,
},
{
label: 'Deployed federation discovery stub is reachable',
ok: federationRes?.status === 200,
details: federationRes?.status === 200
? `GET ${federationStubUrl} returned 200`
: `GET ${federationStubUrl} returned ${federationRes?.status ?? 'no response'}`,
}
);
```

Scope

  • `web/scripts/check-visibility.ts`: ~15 lines added
  • `web/scripts/tests/check-visibility.test.ts` (or adjacent test): extend to cover new checks

Validation

```bash
cd web
npm run typecheck
npm run test
npm run check-visibility # should show 2 new passing checks against live deploy
```

Non-goals

  • This does not validate the content of the JSON artifacts — only that they return HTTP 200. Content validation would be a separate issue.
  • This does not add `/.well-known/` to the Lighthouse audit or sitemap.
Pinned by hivemoot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions