Skip to content

feat(autopilot): add provisioning mode configuration#164

Merged
mchave3 merged 5 commits into
feature/autopilot-hash-upload-foundationfrom
feature/autopilot-hash-upload-config
May 15, 2026
Merged

feat(autopilot): add provisioning mode configuration#164
mchave3 merged 5 commits into
feature/autopilot-hash-upload-foundationfrom
feature/autopilot-hash-upload-config

Conversation

@mchave3
Copy link
Copy Markdown
Collaborator

@mchave3 mchave3 commented May 15, 2026

Summary

  • Add Autopilot provisioning mode configuration for JSON profile and hardware hash upload modes.
  • Add persistent non-secret tenant/app/certificate metadata models and reduced Deploy runtime metadata.
  • Add mode-aware readiness validation and deploy configuration projection while keeping legacy missing-mode JSON as JSON profile mode.
  • Update Phase 1 progress tracking in the implementation plan.

Reason

Phase 1 establishes the configuration contract required by later Autopilot hardware hash upload work without implementing tenant onboarding, UI, media staging, or WinPE runtime upload behavior yet.

Main changes

  • Adds AutopilotProvisioningMode, hardware hash upload metadata records, and schema version bumps.
  • Adds string enum serialization for configuration JSON.
  • Adds AutopilotConfigurationValidator and uses it in deploy config generation and OSD readiness.
  • Mirrors the reduced runtime model in Foundry.Deploy configuration models.
  • Adds tests for legacy defaults, hash mode readiness, invalid/expired certificate metadata, unsupported mode values, null malformed payloads, and Deploy model deserialization.

Testing

  • dotnet test .\src\Foundry.Core.Tests\Foundry.Core.Tests.csproj --configuration Debug
  • dotnet test .\src\Foundry.Deploy.Tests\Foundry.Deploy.Tests.csproj --configuration Debug
  • dotnet build .\src\Foundry.slnx --configuration Debug

Notes

  • UI-only manual checks are explicitly deferred to Phase 3.
  • Runtime profile gating in Foundry.Deploy remains for Phase 5, where Deploy starts branching by provisioning mode.
  • This PR must not be merged or squashed automatically; repository owner will handle the merge workflow.

@mchave3 mchave3 self-assigned this May 15, 2026
@mchave3 mchave3 marked this pull request as ready for review May 15, 2026 20:27
Copilot AI review requested due to automatic review settings May 15, 2026 20:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Phase 1 of the Autopilot hardware-hash upload effort: introduces a provisioning-mode configuration contract (JSON profile vs. hardware hash upload) shared between the OSD configuration store and the Deploy runtime, along with mode-aware readiness validation. Implementation of tenant onboarding, UI, media staging, and WinPE upload is deferred to later phases.

Changes:

  • Adds AutopilotProvisioningMode, AutopilotHardwareHashUploadSettings, AutopilotTenantRegistrationSettings, AutopilotCertificateMetadata, and matching reduced Deploy runtime models; bumps schema versions (Expert 4→5, Deploy 2→3) and enables camelCase string-enum JSON serialization.
  • Introduces AutopilotConfigurationValidator and wires it into ExpertDeployConfigurationStateService readiness and DeployConfigurationGenerator; adds sanitization for persisted hash-upload settings and projection into Deploy config (omitting profile folder in hash-upload mode).
  • Updates "staging" wording to "provisioning" across docs/comments and adds unit/integration tests for legacy defaults, JSON/hash-upload readiness, expired/invalid certificates, unsupported modes, null payloads, and Deploy deserialization.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Foundry.Core/Models/Configuration/AutopilotProvisioningMode.cs New enum for JSON profile vs. hardware hash upload modes.
src/Foundry.Core/Models/Configuration/AutopilotSettings.cs Adds mode and hash upload sub-record on persistent settings.
src/Foundry.Core/Models/Configuration/AutopilotHardwareHashUploadSettings.cs New record holding tenant, certificate, group tag metadata.
src/Foundry.Core/Models/Configuration/AutopilotTenantRegistrationSettings.cs Non-secret tenant/app identity metadata.
src/Foundry.Core/Models/Configuration/AutopilotCertificateMetadata.cs Active certificate descriptor (keyId, thumbprint, expiry, name).
src/Foundry.Core/Models/Configuration/FoundryExpertConfigurationDocument.cs Schema version bump 4→5; doc update.
src/Foundry.Core/Models/Configuration/Deploy/FoundryDeployConfigurationDocument.cs Schema version bump 2→3 for Deploy runtime contract.
src/Foundry.Core/Models/Configuration/Deploy/DeployAutopilotSettings.cs Adds provisioning mode and hash upload runtime settings.
src/Foundry.Core/Models/Configuration/Deploy/DeployAutopilotHardwareHashUploadSettings.cs New reduced runtime hash upload record.
src/Foundry.Core/Services/Configuration/AutopilotConfigurationValidator.cs New mode-aware readiness validator.
src/Foundry.Core/Services/Configuration/DeployConfigurationGenerator.cs Validates Autopilot, projects mode and hash settings into Deploy doc.
src/Foundry.Core/Services/Configuration/ConfigurationJsonDefaults.cs Adds camelCase string enum JSON converter.
src/Foundry.Core/Services/Media/MediaPreflightOptions.cs Doc-comment terminology update.
src/Foundry.Deploy/Models/Configuration/AutopilotProvisioningMode.cs Mirror enum in Deploy project.
src/Foundry.Deploy/Models/Configuration/DeployAutopilotSettings.cs Mirror reduced runtime settings in Deploy project.
src/Foundry.Deploy/Models/Configuration/DeployAutopilotHardwareHashUploadSettings.cs Mirror hash upload runtime settings in Deploy project.
src/Foundry.Deploy/Models/Configuration/FoundryDeployConfigurationDocument.cs Deploy doc schema bump and comment update.
src/Foundry.Deploy/Services/Configuration/ConfigurationJsonDefaults.cs Adds camelCase string enum JSON converter to Deploy runtime.
src/Foundry.Deploy/Services/Deployment/DeploymentRuntimeState.cs Doc-comment terminology update.
src/Foundry/Services/Configuration/IExpertDeployConfigurationStateService.cs Interface doc-comment update.
src/Foundry/Services/Configuration/ExpertDeployConfigurationStateService.cs Uses validator for readiness; gates profile display name to JSON mode; sanitizes hash upload settings.
src/Foundry.Core.Tests/Configuration/AutopilotConfigurationValidatorTests.cs New validator unit tests across modes.
src/Foundry.Core.Tests/Configuration/DeployConfigurationGeneratorTests.cs New generator tests for mode validation and projection.
src/Foundry.Core.Tests/Configuration/ExpertConfigurationServiceTests.cs Tests legacy default and ensures no secrets are serialized.
src/Foundry.Core.Tests/WinPe/WinPeMountedImageAssetProvisioningServiceTests.cs Asserts current schema version instead of hard-coded 2.
src/Foundry.Deploy.Tests/ExpertDeployConfigurationModelTests.cs Tests deploy doc deserialization for new fields and legacy default.
docs/implementation/autopilot-hash-upload/05-implementation-phases.md Marks Phase 1 checklists complete; defers manual UI checks to Phase 3.
docs/implementation/autopilot-hardware-hash-upload.md Updates cross-phase status board for Phase 1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions Bot added documentation Documentation updates ci CI, automation, or workflow changes tests Test coverage or test infrastructure change project: foundry Changes in the Foundry desktop application project: foundry-deploy Changes in the Foundry.Deploy deployment application project: foundry-core Changes in the Foundry.Core shared business logic library labels May 15, 2026
@mchave3 mchave3 merged commit 1f5bc0a into feature/autopilot-hash-upload-foundation May 15, 2026
4 checks passed
@mchave3 mchave3 deleted the feature/autopilot-hash-upload-config branch May 15, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI, automation, or workflow changes documentation Documentation updates project: foundry Changes in the Foundry desktop application project: foundry-core Changes in the Foundry.Core shared business logic library project: foundry-deploy Changes in the Foundry.Deploy deployment application tests Test coverage or test infrastructure change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants