Skip to content

Two Edge Cookie cluster settings are parsed and documented as controls but nothing reads them #1097

Description

@jwrosewell

Found while reviewing the Edge Cookie provider work in
PR #1043. The
settings predate that pull request and are present on main.

The problem

[ec] cluster_trust_threshold and [ec] cluster_recheck_secs are accepted in
the operator configuration, given defaults, and described in the operator guide
as controlling identity decisions. No code reads either value. An operator can
set both, see the application start cleanly, and get no behavior change at all.

What was checked and found

Read on main at commit d516a9e94 and again on the
PR #1043 branch. Both
trees carry the same settings, defaults and documentation. The line numbers
below are from the branch tree, so they sit roughly 30 lines below the matching
lines on main.

  • crates/trusted-server-core/src/settings.rs:525-537 declares both fields with
    serde defaults, and :560-570 supplies the default values, being 10 and
    3600.
  • A workspace search for cluster_trust_threshold and cluster_recheck_secs
    finds matches only in settings.rs, in docs/, and in
    trusted-server.example.toml. There is no read anywhere in crates/.
  • The doc comment on cluster_trust_threshold says entries at or below the
    value "are treated as individual users for identity resolution" and tells B2B
    publishers to raise it to 50 or more. Nothing compares any value against it.
  • docs/guide/configuration.md:510 repeats that claim to operators.
    trusted-server.example.toml:93-94 repeats it again in a commented example.
  • cluster_size itself is real. It is computed in
    crates/trusted-server-core/src/ec/kv.rs:683-771, stored on the identity
    graph entry, and reported in the identify response
    (crates/trusted-server-core/src/ec/identify.rs:87-155). It gates nothing.
  • cluster_recheck_secs is the milder of the two, because its own doc comment
    in settings.rs:531-535 already admits the value is not used. The operator
    guide entry still lists it as a setting.

Why it matters

An operator reading the guide believes there is a knob that decides whether a
shared network address is treated as one user. There is no such knob. The
unimplemented claim is also what would lead a reader to believe cluster_size
is a control rather than a signal reported in a diagnostic response, which is
the misreading that made the cluster count look load bearing during the
PR #1043 review.

What would resolve it

Pick one of two directions and carry it through in one change.

  1. Delete both fields, their defaults, their operator guide rows, and their
    example configuration lines. The repository rule is that when a mechanism
    goes, its parameters and documentation go in the same commit, because
    documentation that outlives its mechanism reads as a working feature to the
    next person.
  2. Implement the threshold, meaning make identity resolution actually compare
    the stored cluster_size against cluster_trust_threshold, and add a test
    that fails if the comparison disappears.

Direction 1 is the smaller change and matches what the code does today. Either
way, remove cluster_recheck_secs, because its own doc comment says nothing
uses it.

This issue does not depend on any pull request in the current stack and can be
picked up independently.

Note on authorship

This issue was drafted with AI assistance. Every file and line reference above
was read at the commits named. A human should review it before acting on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions