feat(autopilot): add provisioning mode configuration#164
Merged
mchave3 merged 5 commits intoMay 15, 2026
Merged
Conversation
There was a problem hiding this comment.
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
AutopilotConfigurationValidatorand wires it intoExpertDeployConfigurationStateServicereadiness andDeployConfigurationGenerator; 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.
1f5bc0a
into
feature/autopilot-hash-upload-foundation
4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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
AutopilotProvisioningMode, hardware hash upload metadata records, and schema version bumps.AutopilotConfigurationValidatorand uses it in deploy config generation and OSD readiness.Testing
dotnet test .\src\Foundry.Core.Tests\Foundry.Core.Tests.csproj --configuration Debugdotnet test .\src\Foundry.Deploy.Tests\Foundry.Deploy.Tests.csproj --configuration Debugdotnet build .\src\Foundry.slnx --configuration DebugNotes