You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
config: the cap ceiling depends on a copied frame-queue constant a third crate could falsify #1049
Found in job 022's architecture review (a carrier note, not a blocker for #998).
nostream-config's MAX_CONNECTIONS_PER_IP is computed as MAX_FRAME_MEMORY_BUDGET_BYTES / FRAME_QUEUE_BYTES. The division is sound, but FRAME_QUEUE_BYTES in nostream-config is a copy of nostream-relay's default — it has to be, because the dependency runs relay → config and nothing in config can reference the relay's constant.
Today production has exactly one frame size, so the copy is exact. The failure is silent if that changes: a third crate that chose a different frame size would make the cap ceiling describe a queue nobody has, and the validator's arithmetic would keep being right about the wrong number.
What it needs
An ADR-level decision, not a patch: either the frame queue size moves down into nostream-config so there is one definition, or it is parameterised and the ceiling becomes a function of the configured size. State which, and what breaks if a second frame size is ever introduced.
Unpinnable today because FRAME_QUEUE_BYTES is a private const — a test cannot reach it, which is itself part of the finding. Measured in 022-settings-ceiling's round-2/review-architecture.md.
Activity