Skip to content

CPU topology v2 phase 6: migrate profiles and core masks to CpuSelection#12

Draft
PrimeBuild-pc wants to merge 1 commit into
mainfrom
codex/cpu-topology-v2-phase-6-profile-cpuselection-migration
Draft

CPU topology v2 phase 6: migrate profiles and core masks to CpuSelection#12
PrimeBuild-pc wants to merge 1 commit into
mainfrom
codex/cpu-topology-v2-phase-6-profile-cpuselection-migration

Conversation

@PrimeBuild-pc
Copy link
Copy Markdown
Owner

Summary

Adds a conservative CpuSelection migration and compatibility layer for persisted profiles and core masks.

  • Adds schema constants where legacy files without a schema version are treated as version 1 and CpuSelection-backed files are version 2.
  • Adds CpuSelectionMigrationMetadata for affinity/core-mask migration provenance, confidence, topology signature, review state, and source legacy mask.
  • Adds a public ProcessProfileSnapshot model with legacy ProcessorAffinity retained alongside optional CpuSelection and migration metadata.
  • Extends ProfileModel and CoreMask with optional CpuSelection fields without removing existing legacy fields.
  • Adds CpuSelectionMigrationService for testable migration from legacy affinity masks and bool core masks, plus safe legacy-mask build-back only when representable.
  • Wires profile save/load to persist/read CpuSelection when a topology snapshot is available, while keeping legacy ProcessorAffinity for compatibility.
  • Wires core mask load/save to attach CpuSelection metadata where possible while preserving BoolMask and leaving runtime core-mask apply unchanged.

Out of scope

  • No UI changes.
  • No profile UI migration or review UI.
  • No deletion of legacy fields.
  • No preset generator changes.
  • No Process Lasso-style registry/IFEO work.
  • No priority guardrails.
  • No X3D detection.
  • No version bump and no tag.
  • Core mask runtime auto-apply still uses the existing legacy path; switching it to CpuSelection is left for a later phase.

Tests

  • dotnet test "ThreadPilot_1.sln" --configuration Release --no-restore
  • Result: 230 passed, 0 failed, 0 skipped.

Existing warnings remain in unrelated test files: CS1998 in RetryPolicyServiceTests and CS0067 in ProcessMonitorManagerServiceTests.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 65.76087% with 63 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Services/CoreMaskService.cs 0.00% 41 Missing ⚠️
Services/ProcessService.cs 59.09% 9 Missing ⚠️
Services/ServiceConfiguration.cs 0.00% 5 Missing ⚠️
Models/ProfileModel.cs 0.00% 4 Missing ⚠️
Models/CoreMask.cs 50.00% 3 Missing ⚠️
Services/CpuSelectionMigrationService.cs 98.88% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants