Skip to content

fix(persistence): enforce membership share budgets pointwise across time #620

Open

Description

@seonghobae

Finding

The predecessor 0010_membership_same_role_share_budget trigger summed every existing membership whose possible-activity range overlapped the candidate range. That is stricter than the Membership owner invariant because different existing spells may overlap a spanning candidate at different times without ever overlapping one another.

Counterexample:

  • A: weight 0.6, active [2026-02-01, 2026-02-10];
  • B: weight 0.6, active [2026-02-20, 2026-02-28];
  • candidate C: weight 0.4, active [2026-02-05, 2026-02-25].

At every event time the true same-role total is at most 1.0 (A+C early, B+C late), but pairwise-candidate aggregation produces 1.6 and rejects a scientifically valid time-varying history.

RED → causal repair

No timestamp epsilon, tolerance, normalization, decimal-only aggregate, or scalar temporal collapse is used.

Current authority

The surviving vehicle is Draft #615, currently exact 10b07fcdf47f867e3c7b78ba1b8e8a2a668cc4b3, which also carries #619/#621/#622 refinements. #620 remains open until that exact lineage has hosted PostgreSQL 18 acceptance, current-head security/coverage evidence, independent review, prerequisite reconciliation, and normal landing.

Refs #604, #605, #610, #612, #615, #616, #617, #618, #619, #621, #622.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions