# Function findCrossPartyAlignmentWindows

- findCrossPartyAlignmentWindows(
  buckets: WeekBucket[],
  share?: number,
  ): CrossPartyWindow[]

  Find sub-windows (weeks) where the MEP defected toward non-home-group majorities on ≥ `share` of decisive RCVs.

  Skips weeks with fewer than MIN_SUBWINDOW_DECISIVE_VOTES decisive votes to avoid spurious 100% windows on tiny samples.

  Units: the `share` parameter is a fraction (0–1). The returned CrossPartyWindow.sharePercent field is converted to a percentage (0–100) for consumer ergonomics — keep this distinction in mind when wiring severity classifiers (e.g. `severityFromShare` expects percent input).

  #### Parameters

  - buckets: WeekBucket[]

    Output of bucketByWeek.

  - share: number = DEFAULT_CROSS_PARTY_SHARE

    Minimum share (0–1) of decisive RCVs where the MEP defected toward non-home group majorities (default DEFAULT_CROSS_PARTY_SHARE).

  #### Returns CrossPartyWindow[]

  Windows in chronological order.

  - Defined in utils/votingBaseline.ts:494