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
Validator missing overlap detection for categorical/boolean modifiers under last-wins semantics #122
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_overrides wins (line ~195-216)
boolean: last probability_override wins (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) OR
ordered_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.
Closing as fixed. Validator now performs last-wins overlap detection for categorical/boolean modifiers and emits diagnostics (promotable via strict gates). See and strict-gate handling in .
Activity
feat(validator): detect ambiguous categorical/boolean modifier overla…
RandomOscillations commentedon Feb 20, 2026
Implemented on branch
codex/steps1-3-hardening(see PR #124). Keeping this issue open until merge + integration verification completes.RandomOscillations commentedon Feb 23, 2026
Closing as fixed. Validator now performs last-wins overlap detection for categorical/boolean modifiers and emits diagnostics (promotable via strict gates). See and strict-gate handling in .