Files
zeekayandHanzo Dev 39d66ced14 proxy: fix Health, drop the ceremony, 1.27.1
Health carried a map it wrote and never read, an atomic counter that existed
only to key that map, and an unsynchronized append racing the slice its Order
reads. All three gone, and the append is guarded — the race only stayed hidden
because the natural form calls every watch before the first dial.

Its real contract is now written down: the exits given to Try must be the
values watch returned, in that order, which the one-expression form guarantees
because Go evaluates arguments left to right. Split across statements and
reordered, ordering degrades to the order it was given rather than ranking the
wrong exits — silently, and deliberately, since a demoted vendor is a
preference and getting a preference wrong should not fail a servable request.

Chain around a single rule was ceremony. A Rule is a function; one of them
applies by calling it, and Chain is for two or more. No Then or Apply method to
go with it: Apply spells r(e) with more letters, and Then would be a second way
to compose what Chain already composes.

sort.SliceStable to slices.SortStableFunc with cmp.Compare, counted loops to
range-over-int, and go.mod to 1.27.1 to match the rest of the estate.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-17 15:36:16 -07:00

4 lines
43 B
AMPL

module github.com/hanzoai/proxy
go 1.27.1