Files
zeekayandHanzo Dev 879d09d4ad relay: one seam means one body, not five that drift apart
relay.go has said since the collapse that wrote it: "One function, one place:
every typed op in this package reaches the o11y runtime through relay and
through nothing else." That was aspirational. Four more bodies sat in the op
files — infraRelay, metricsRelay, rulesAlertsRelay, integrationsRelay — each a
copy of relay differing only in concatenating o11yRoot itself.

So when a handler turned out to be a SERVER seam and needed a request-target,
the fix landed in one of the five. The other four kept handing the runtime a
request with RequestURI empty; adaptor.FiberApp copies that field into fasthttp
verbatim, the path was erased, fasthttp normalized it to "/", and no API route
matched. 94 of 367 routes answered 404 at the unified door — all of infra,
metrics, rules/alerts, integrations, cloud_integrations, downtime_schedules,
route_policies, metric_reduction_rules and gateway ingestion_keys — while the
standalone served the identical paths 200. The commit that believed it had
closed this had closed a fifth of it.

Collapse the four into relay at all 108 call sites, which now pass the whole
public path exactly as the other faces already did.

The reason a copy could survive the repair is that nothing measured the surface:
routes_test.go counts what Mount REGISTERS, and every one of those 94 was
registered. reach_test.go adds the census that was missing — every registered
route driven through the production embed shape (adaptor.FiberApp over a runtime
that routes) against a runtime serving all of them, where a 404 means the request
never arrived. It fails at 94 before this change and at 293 with the surviving
request-target removed. Its structural half fails on the existence of a second
body, so a sixth relay cannot be added quietly.

Also fix what the census made reachable. PlannedMaintenance.Schedule is a
pointer that IsActive, IsUpcoming and IsRecurring all dereference unguarded, and
MarshalJSON has a value receiver and calls them — so an answer carrying no
"data" decodes to the zero value and panics inside encoding/json. Those routes
were 404 until now, which is why it had never fired; in the embed a handler
panic takes iam, commerce and ai down with o11y. A window with no schedule is
not active, not upcoming and not recurring.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-02 11:51:41 -07:00
..
2026-03-12 02:10:29 -07:00