feat(api): organizations with own status page servers serve their pages alone
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Canceled after 6m3s
ci / test (pull_request) Canceled after 6m2s
ci / build (pull_request) Canceled after 0s
ci / image (pull_request) Canceled after 0s

The platform's status page servers handed out every published page,
including those of organizations running their own servers. Once one of
an organization's own status page servers has connected, the agent API
now answers the platform's servers 404 for its pages, so they drop them
from their cache, and only the organization's servers serve them. A
created but never connected token changes nothing, so moving over does
not take the pages offline.

The console no longer links such pages to the platform's address,
which would not serve them; the editor says who does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-24 22:45:37 +01:00
1 parent 20874a5a87
commit c0239e15bb
11 files changed
+905 -778

No files matched your search

+16
View File
@@ -318,6 +318,22 @@ func (q *Queries) ListVisibleRegions(ctx context.Context) ([]Region, error) {
return items, nil
}
const orgServesOwnPages = `-- name: OrgServesOwnPages :one
SELECT EXISTS (
SELECT 1 FROM agents
WHERE org_id = $1 AND kind = 'statuspage' AND last_seen_at IS NOT NULL
)
`
// An organization serves its status pages itself once one of its own
// status page servers has connected.
func (q *Queries) OrgServesOwnPages(ctx context.Context, orgID *uuid.UUID) (bool, error) {
row := q.db.QueryRow(ctx, orgServesOwnPages, orgID)
var exists bool
err := row.Scan(&exists)
return exists, err
}
const setAgentAllowPrivate = `-- name: SetAgentAllowPrivate :execrows
UPDATE agents SET allow_private = $1
WHERE id = $2 AND kind = 'checker' AND org_id = $3