feat(activation): structured per-component provisioning result#2744
Draft
madhavilosetty-intel wants to merge 2 commits into
Draft
feat(activation): structured per-component provisioning result#2744madhavilosetty-intel wants to merge 2 commits into
madhavilosetty-intel wants to merge 2 commits into
Conversation
Break the activation outcome into structured per-component results
(Activation, WiredNetwork, WirelessNetwork, TLS, CIRAProxy,
CIRAConnection) so operators get granular visibility into what
succeeded or failed during the multi-minute provisioning window.
Each child state machine now records a {Result, Mode, Details,
ErrorCode} entry into a new additive Status.Components object via a
shared recordComponentResult helper, alongside the existing flat
status strings. The result rides in the same WebSocket message field,
so older RPC clients that don't understand Components simply ignore
it. Recording never alters control flow: a component failure is
captured for visibility but does not change the activation outcome.
802.1x reporting is intentionally deferred to a follow-up.
Refs #2665
There was a problem hiding this comment.
Pull request overview
Adds a structured, per-component activation/provisioning outcome (status.Components) to improve operator visibility during/after provisioning, while keeping the existing flat status strings for backwards compatibility.
Changes:
- Introduces
Status.Componentsplus supportingComponentResult/ComponentResultstypes for granular activation outcomes. - Adds a shared
recordComponentResult()helper and wires it into activation + key provisioning child state machines (wired, Wi-Fi, TLS, CIRA proxy, CIRA connection). - Updates/extends unit tests to accommodate the new helper (including new unit tests for
recordComponentResultitself).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/RCS.Config.ts | Adds typed ComponentResult / ComponentResults and the additive Status.Components field. |
| src/stateMachines/common.ts | Introduces recordComponentResult() helper to record structured component outcomes onto device status. |
| src/stateMachines/common.test.ts | Adds unit tests validating recordComponentResult() behavior. |
| src/stateMachines/activation.ts | Records Activation component success/failure into status.Components. |
| src/stateMachines/activation.test.ts | Updates common module mock to include recordComponentResult. |
| src/stateMachines/wiredNetworkConfiguration.ts | Records WiredNetwork component result when updating network status. |
| src/stateMachines/wiredNetworkConfiguration.test.ts | Updates common module mock to include recordComponentResult. |
| src/stateMachines/wifiNetworkConfiguration.ts | Records WirelessNetwork component result when updating network status. |
| src/stateMachines/wifiNetworkConfiguration.test.ts | Updates common module mock to include recordComponentResult. |
| src/stateMachines/tls.ts | Records TLS component success/failure alongside legacy TLSConfiguration status. |
| src/stateMachines/tls.test.ts | Updates common module mock to include recordComponentResult. |
| src/stateMachines/proxyConfiguration.ts | Records CIRAProxy component result alongside legacy network status string. |
| src/stateMachines/ciraConfiguration.ts | Records CIRAConnection component result derived from final statusMessage. |
| src/stateMachines/ciraConfiguration.test.ts | Updates common module mock to include recordComponentResult. |
1973fee to
d839922
Compare
Each child state machine test now drives both success and failure outcomes and asserts the recorded component result (Activation, WiredNetwork, WirelessNetwork, TLS, CIRAProxy, CIRAConnection) has the expected Result/Details. Refs #2665
d839922 to
b113cc9
Compare
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.
Break the activation outcome into structured per-component results (Activation, WiredNetwork, WirelessNetwork, TLS, CIRAProxy, CIRAConnection) so operators get granular visibility into what succeeded or failed during the multi-minute provisioning window.
Each child state machine now records a {Result, Mode, Details, ErrorCode} entry into a new additive Status.Components object via a shared recordComponentResult helper, alongside the existing flat status strings. The result rides in the same WebSocket message field, so older RPC clients that don't understand Components simply ignore it. Recording never alters control flow: a component failure is captured for visibility but does not change the activation outcome.
802.1x reporting is intentionally deferred to a follow-up.
Refs #2665
PR Checklist
What are you changing?
Anything the reviewer should know when reviewing this PR?
If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )