Skip to content

v1.10.1

Choose a tag to compare

@MorganKryze MorganKryze released this 28 Jul 11:56
fba8fea

Nothing changes for you. This one is the inside of the house: the code is now six packages instead of one, and the tests cover a good deal more of it.

🧹 Internal

  • One package per job. A flat package main of nine source files became config (read and validate the YAML), render (turn it into bytes), status (Gatus), server (routes, handlers, probes, loops), check (backs -check), and a cmd/cairn that does nothing but wire them together. The dependency graph runs one way and main.go went from 514 lines and 27 functions to 90.

    Mapping every cross-file symbol first turned up three real cycles that a naive split would have hit: config validated link icons against a map living in the renderer, -check builds a model so it could not live in config, and the base-path helpers sat in main while the renderer needed them. Each was resolved rather than worked around.

  • Coverage went from 82.7% to 89.6%, with 128 tests against 72, and the CI floor moved to 87%. The new tests are aimed where they earn their keep rather than at the number: every rejection validateSite can produce, so the error messages the README promises stay as precise as advertised; the route table, so a path cannot quietly disappear; the UI string fallback chain; malformed markdown links.

    What is left uncovered is 94 statements out of 879, and most of it is the process entry point and the two for range time.Tick loops whose bodies were already extracted and tested. The demo job covers those end to end.

  • A regression caught before it shipped. Writing those tests found that the friendly YAML error vocabulary was keyed on main.Site, main.SitePage and so on, so splitting the packages had silently turned "found a text where a page entry was expected" into "where config.SitePage was expected": Go jargon in the face of someone editing a YAML file. Fixed, and made independent of the package name so a future move cannot break it again.

  • Two shadowing bugs surfaced and were fixed along the way: a status parameter hid the status package, and the -healthcheck flag variable named check hid the check package.

📦 Image

docker pull ghcr.io/morgankryze/cairn:1.10.1

The artifact is byte-for-byte the same shape as 1.10.0: two files, /cairn and a CA bundle, under 10 MB. This release also moves 1.10, 1, stable and latest.