-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
Summary
Categorical and boolean modifier application uses last-wins semantics, but validators do not detect ambiguous overlapping conditions. This makes behavior depend on modifier order and can unintentionally flatten distributions.
Why This Matters
When multiple conditions can match the same agent, the final outcome may be dominated by whichever modifier appears last, not intended policy.
Current Behavior (Code)
In /Users/adithyasrinivasan/Projects/extropy/extropy/population/sampler/modifiers.py:
- categorical: last
weight_overrideswins (line ~195-216) - boolean: last
probability_overridewins (line ~225-236)
Validators check syntax/references and some semantics, but not overlap ambiguity for these last-wins paths.
Proposed Fix
- Add static overlap analysis for categorical/boolean modifiers on each attribute:
- detect pairs/groups of conditions that can co-match
- flag as warning/error depending on strictness
- Require explicit policy annotation for overlapping sets:
exclusive(must be mutually exclusive) ORordered_override(intentional precedence)
- In strict mode, fail if overlap is detected without explicit precedence policy.
Tests
- overlapping modifiers without policy -> strict fail
- mutually exclusive modifiers -> pass
- intentional ordered override with explicit policy -> pass
Acceptance Criteria
- Accidental overlap is surfaced before sampling.
- Teams can encode intentional precedence explicitly.
Pipeline Impact
Addresses the exact "last wins flattening" class of bugs seen in real runs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels