Files
pad/internal/metrics
xarmian 44efef5970 refactor(events): remove the dead global-limit parameter from SubscribeIfAllowed (BUG-2726)
BUG-2726 moved the global streaming bound to internal/server's
streamAdmission, which both SSE endpoints acquire from before
subscribing. Since then the handler passed maxGlobal=0 and the bus's own
global branch was unreachable from any shipped path — a policy knob that
looked live and was not.

Removed rather than left behind, on the lead's ruling and for the reason
the round-21 registry-cap removal gave one layer up: dead policy surface
is scope, not cleanup. Somebody eventually configures a knob that looks
live, and its silence gets diagnosed as a bug.

The successor is streamAdmission (internal/server/stream_admission.go),
named in the interface doc so the archaeology is one hop: a global bound
is a property of the PROCESS, and Pad serves two SSE endpoints over two
different buses, so neither bus could enforce it alone — one counting its
own subscribers would let a caller exhaust the machine through the other
while every configured limit still read as satisfied.

The per-workspace bound stays on the bus. It is genuinely
workspace-scoped, the other endpoint has no workspace to count against,
and it keeps the package-level test added in round 5 — which was the
first instrument it ever had.

Claude-Session: https://claude.ai/code/session_01JVDBKbgn3Xt7ndW1YoYd8X
2026-08-22 03:20:47 +00:00
..