Skip to content

config: the cap ceiling depends on a copied frame-queue constant a third crate could falsify #1049

Open

Description

@chappie-daemon

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

  1. added
    bugSomething isn't working
    rewritenostream 4.0 Rust/LMDB rewrite
    rustRust implementation work
    factoryBuilt by the software factory
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfactoryBuilt by the software factoryrewritenostream 4.0 Rust/LMDB rewriterustRust implementation work

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions