mirror of
https://github.com/zap-proto/zip.git
synced 2026-10-19 15:38:57 +00:00
The handler position takes `f(x)` in two unrelated shapes and handlerDoc read both as a builder — a function returning the handler, whose own doc comment is the only one there is. An ADAPTER has the same shape and the opposite meaning: its argument IS the handler, and its doc describes the adapter. So every operation registered through one published the adapter's sentence. Measured on hanzoai/cloud: 55 operations across 24 apps described `cloud.Handle` or `cloud.Terminal` instead of themselves — "Binds a Service-scoped handler to a route", true of every route that uses it and about none of them — while the sentence each handler had already written sat unread one call inside. The arguments tell the two apart, and nothing else has to: a builder takes what the handler needs, a wrapper takes the handler. Recursing on the last func-typed argument reaches through nested adapters and leaves the builder case exactly as it was.