Skip to content

Conversation

@Mpdreamz
Copy link
Member

The AssemblyConfiguration.Match() method now has two code paths for handling version branches:

  1. When current is a versioned branch (e.g., 8.15):

    • Build if branch >= current
    • Build if branch equals the previous minor of current (e.g., 8.14 when current is 8.15)
  2. When current is NOT a versioned branch (e.g., main):

    • Build if branch >= anchored product version
    • Do NOT build for previous minor versions
  • VersionBranchSpeculativeBuildBasedOnProductVersion: Changed expectation for branch 8.14 with product version 8.15 from true to false, since current is "main" and previous minor logic should not apply.

  • VersionBranchSpeculativeBuildWhenMatchesPreviousMinorVersion: Changed tests to use versioned current branches (e.g., current: "9.2") instead of current: "main", since this test specifically validates previous minor version logic.

  • VersionBranchPreviousMinorCalculationHandlesEdgeCases: Changed to use versioned current branches (e.g., current: "8.1") to properly test edge cases in previous minor calculation.

Test Results

All 41 tests in AssemblyConfigurationMatchTests now pass ✓

The `AssemblyConfiguration.Match()` method now has two code paths for handling version branches:

1. **When `current` is a versioned branch** (e.g., `8.15`):
   - Build if branch >= current
   - Build if branch equals the previous minor of current (e.g., `8.14` when current is `8.15`)

2. **When `current` is NOT a versioned branch** (e.g., `main`):
   - Build if branch >= anchored product version
   - Do NOT build for previous minor versions

- **`VersionBranchSpeculativeBuildBasedOnProductVersion`**: Changed expectation for branch `8.14` with product version `8.15` from `true` to `false`, since `current` is `"main"` and previous minor logic should not apply.

- **`VersionBranchSpeculativeBuildWhenMatchesPreviousMinorVersion`**: Changed tests to use versioned `current` branches (e.g., `current: "9.2"`) instead of `current: "main"`, since this test specifically validates previous minor version logic.

- **`VersionBranchPreviousMinorCalculationHandlesEdgeCases`**: Changed to use versioned `current` branches (e.g., `current: "8.1"`) to properly test edge cases in previous minor calculation.

### Test Results
All 41 tests in `AssemblyConfigurationMatchTests` now pass ✓
@Mpdreamz Mpdreamz requested a review from a team as a code owner November 17, 2025 21:12
@Mpdreamz Mpdreamz requested a review from reakaleek November 17, 2025 21:12
@Mpdreamz Mpdreamz added the fix label Nov 17, 2025
@Mpdreamz Mpdreamz self-assigned this Nov 17, 2025
@Mpdreamz Mpdreamz added the fix label Nov 17, 2025
@Mpdreamz Mpdreamz merged commit b908050 into main Nov 18, 2025
26 checks passed
@Mpdreamz Mpdreamz deleted the fix/speculative-builds-previous-minor branch November 18, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants