Skip to content

fix(review): visual-capture screenshots render as broken images on self-host (private origin) #4184

Description

@JSONbored

What happened

On PR #4180's visual-capture review comment, both viewport thumbnails in the "Visual preview" table rendered as broken images, and the "Before (production)" column was blank for both rows.

Root cause

The comment's <img src> pointed directly at https://edge-us-01.raccoon-bushi.ts.net/gittensory/shot?url=... — a Tailscale MagicDNS (*.ts.net) tailnet hostname. That's only reachable from devices on the same tailnet; GitHub's own servers, which render the comment's images, cannot resolve or fetch it. Every screenshot embedded by this self-host instance has been silently broken the same way.

PUBLIC_API_ORIGIN on this instance is set to that private hostname instead of a publicly-reachable origin. Separately, PUBLIC_SITE_ORIGIN (the "before/production" screenshot source) was never set at all — it isn't documented anywhere in .env.example's self-host section, so there was nothing prompting an operator to configure it.

Fix

  • Root cause is a live deployment config value, not something fixable from the repo.
  • Added a boot-time advisory (publicOriginReachabilityAdvisory in src/selfhost/health.ts, mirroring the existing sqliteBackupAdvisory pattern) that warns loudly — and exposes a Prometheus gauge — when PUBLIC_API_ORIGIN/PUBLIC_SITE_ORIGIN look like a private/internal hostname, with an explicit PUBLIC_ORIGIN_ACKNOWLEDGED escape hatch for a legitimately Funnel-exposed *.ts.net node.
  • Documented PUBLIC_SITE_ORIGIN in .env.example for the first time, and corrected PUBLIC_API_ORIGIN's misleading "not needed after setup" framing in both example files.

Remaining

The live edge-us-01 instance's own PUBLIC_API_ORIGIN/PUBLIC_SITE_ORIGIN values still need to be corrected on that deployment directly — that's an ops change outside this repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions