Skip to content

feat: batch 2026-07-22 — status-page custom domains, SMS/voice alerting, transactional compaction, heartbeat token rotation, results storage trim - #170

Merged
fclairamb merged 69 commits into
mainfrom
batch/2026-07-22
Jul 26, 2026
Merged

fclairamb merged 69 commits into
mainfrom
batch/2026-07-22

Conversation

@fclairamb

@fclairamb fclairamb commented Jul 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Five completed specs from specs/done/2026/07/, bundled on this batch branch:

  • Status page custom domains (2026-07-22-01) — DNS-verified (CNAME+TXT) custom domains, per-org entitlement, host-based routing with a strict allowlist (only the status0 SPA + its public API surface), periodic re-verification with takeover protection, and a dash0 UI to configure/verify a domain.
  • SMS / voice wake-up alerting (2026-07-22-02) — a twilio connection type, phone verification, severity-token dispatch (sms/voice) wired into the escalation/paging engine, DTMF-acknowledge voice calls, monthly quota entitlements with a config-overridable runaway guard, and dash0 UI for the integration + phone verification.
  • Transactional aggregation compaction (2026-07-22-03) — per-bucket results compaction is now a single transaction, fixing boundary-ms row stranding on partial failure.
  • Heartbeat token view/regenerate (2026-07-24-01) — heartbeat check ping tokens are viewable and regenerable from the check detail page, with a rotate endpoint.
  • Results table tier-1 storage trim (2026-07-24-02) — drops dead columns (last_for_status, availability_pct) and duplicated payloads (HTTP duration, raw output in rollups) from the results table.

Plus two small standalone fixes picked up along the way: CI postgres readiness (docker compose --wait) and status0 custom-host serving testability.

Also adds a new (unimplemented) spec idea: specs/ideas/2026-07-22-results-table-storage-optimization.md, analyzing further disk-space reduction options for the results table.

Test plan

  • make build-backend lint-back test — all backend Go tests pass, including embedded/testcontainer Postgres suites
  • make build-status0 / bun run lint (status0)
  • make build-dash0 / bun run lint (dash0) — no new lint errors in touched files
  • make build-docs
  • Dedicated Playwright E2E authored for custom-domain form, Twilio integration form, phone-verify flow, and heartbeat token regeneration
  • Manual DNS verification against a real domain (recommend before enabling in prod)
  • Manual Twilio sandbox test of SMS + voice + DTMF ack end-to-end

🤖 Generated with Claude Code

fclairamb added 30 commits July 22, 2026 02:09
fclairamb and others added 21 commits July 23, 2026 10:58
The hand-rolled pg_isready loop started polling immediately after `up -d`,
which can race the official postgres image's first-start behavior (a
short-lived temporary instance runs before the real one starts) and
false-positive against that instance — the app then gets its connection
reset mid-migration when postgres restarts for real, as seen in a recent
E2E run.

docker-compose.yml already defines a correct healthcheck for the postgres
service; `--wait` uses it (first probe after the 5s interval, well past the
temporary-instance window) instead of duplicating and racing it.
…e and regenerable from the check page

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…lity_pct

Drops the write-only last_for_status column (+ its partial index) and the
derivable availability_pct column from the hot results table on both
Postgres and SQLite. Down migrations restore both; no backfill needed.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The last_for_status flag was write-only: every result insert paid a
companion UPDATE (dead tuple + index churn + WAL) to clear the
predecessor's flag, yet nothing ever read it. SaveResultWithStatusTracking
is now a single INSERT on both backends. Removes the model field, all
writer assignments, the rollup builder assignment, and TestLastForStatus.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Hour rollups used to carry the last raw output blob, which then lived 7x
longer than the raw row it came from. Rollup rows now leave output nil
(day/month already did); recent-detail views read raw rows for output.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The HTTP checker wrote metrics={duration_ms} on every result path (~13
sites) — byte-for-byte the same value as the dedicated duration column.
Leave Metrics nil on all HTTP paths; duration stays in Duration. Other
checkers (ssl, domain) that carry duration_ms alongside real metric keys
are untouched.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
availability_pct is fully determined by successful_checks / total_checks,
so storing it on every rollup row was redundant and a drift risk. The
aggregation job no longer computes/stores it; the results handler derives
successfulChecks / totalChecks x 100 at serialization time (null when
totalChecks == 0), matching the availability and badges handlers. Model
field removed; JSON contract unchanged.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
ListResults gains a SkipBlobs projection option (both backends): when set,
metrics and output are dropped from the SELECT, so count-only consumers stop
paying for the two widest columns of the hottest table. Opted in from uptime
bars (window + bucket availability), badges and the status-page recent-result
query — none of them ever read a blob. Default stays full-row.

Also covers the rest of the tier-1 trim with tests: migration 009 up/down on
both backends (columns + partial index), and the read-time availabilityPct
derivation including the totalChecks == 0 -> null case.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The clearing UPDATE that used to accompany every insert is gone, but nothing
asserted it stays gone. SQLite measures total_changes() around each save
(exactly one row written); Postgres installs a statement-level BEFORE UPDATE
trigger on results that raises, so any re-introduced UPDATE fails the save.
Both carry a positive control proving the guard fires.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The tier-1 trim left three integration fixtures assigning the deleted
models.Result.AvailabilityPct (they now rely on the read-time derivation) and
an unused bun import in worker_test.go after TestLastForStatus was removed.
Both broke the test build, which go build alone does not cover.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
… dead columns and duplicated payloads

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Analysis of disk-space reduction options for the results table (TOAST
compression, dead-tuple churn from the raw-row lifecycle, column trims).
@fclairamb fclairamb changed the title Custom domains for status pages + SMS/voice wake-up alerting feat: batch 2026-07-22 — status-page custom domains, SMS/voice alerting, transactional compaction, heartbeat token rotation, results storage trim Jul 25, 2026
@fclairamb
fclairamb enabled auto-merge (squash) July 25, 2026 23:41
@fclairamb
fclairamb merged commit 1184b15 into main Jul 26, 2026
20 of 22 checks passed
@fclairamb
fclairamb deleted the batch/2026-07-22 branch July 26, 2026 00:02
@fclairamb fclairamb mentioned this pull request Jul 22, 2026
fclairamb added a commit that referenced this pull request Aug 4, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.7.0](v0.6.2...v0.7.0)
(2026-08-04)


### Features

* batch 2026-07-22 — status-page custom domains, SMS/voice alerting,
transactional compaction, heartbeat token rotation, results storage trim
([#170](#170))
([1184b15](1184b15))
* custom-domain in-server ACME, status-page custom CSS, and fly.io
system agents
([#175](#175))
([9ffd436](9ffd436))


### Bug Fixes

* **deps:** update dependency recharts to v3.10.1
([#177](#177))
([c7a6e91](c7a6e91))
* **deps:** update github.com/dop251/goja digest to b4aef50
([#169](#169))
([0d090cb](0d090cb))
* **deps:** update github.com/dop251/goja digest to c65cf2f
([#159](#159))
([6d7223e](6d7223e))
* **deps:** update go dependencies (non-major)
([#167](#167))
([68ee7da](68ee7da))
* **deps:** update go dependencies (non-major)
([#178](#178))
([6a175f8](6a175f8))
* **deps:** update go dependencies (non-major)
([#184](#184))
([d731b26](d731b26))
* **deps:** update go dependencies (non-major)
([#189](#189))
([4bb9aba](4bb9aba))
* **deps:** update module github.com/prometheus/common to v0.70.1
([#168](#168))
([2696a9a](2696a9a))
* **deps:** update module github.com/sijms/go-ora/v2 to v3
([#186](#186))
([4cd8081](4cd8081))
* **deps:** update module github.com/sijms/go-ora/v2 to v3
([#187](#187))
([22f932c](22f932c))
* **deps:** update module github.com/vanng822/go-premailer to v1.35.0
([#188](#188))
([d54cadf](d54cadf))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
This was referenced Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant