Skip to content

Add JSON-RPC support to Registry resources - #1817

Merged
Steve Lee (SteveL-MSFT) merged 2 commits into
mainfrom
stevel-msft-registry-json-rpc
Nov 17, 2026
Merged

Steve Lee (SteveL-MSFT) merged 2 commits into
mainfrom
stevel-msft-registry-json-rpc

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

Summary

  • Implement the resource JSON-RPC lifecycle and invocation interface for Microsoft.Windows/Registry and Microsoft.Windows/RegistryList, retaining executable fallbacks.
  • Support native what-if, schema retrieval, and per-entry _exist: false deletion; preserve RegistryList entry order and offline-hive inheritance with per-entry overrides.
  • Add protocol and integration coverage for reusable processes, error recovery, offline hives, and reuse-disabled fallbacks, and document both transports.

Validation

  • ./build.ps1 -Project registry -Test -Clippy -Quiet
  • 9 Rust tests and 65 Pester tests passed; 1 existing administrator-only test skipped.
  • Both resource manifests validate against the bundled manifest schema.

Implement the persistent resource protocol with lifecycle validation, Registry operations, and native what-if support while retaining executable fallbacks. Add protocol and transport integration coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 23:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The tests leave DSC_RESTRICTED_PATH set, which can prevent discovery of the generated JSON-RPC-only manifests and cause reuse-enabled cases to exercise executable fallbacks or fail unexpectedly.

1 open issue
What changed in this PR

Adds reusable JSON-RPC support to the Windows Registry resources while retaining executable fallbacks.

Changes:

  • Implements lifecycle handling, resource operations, schema retrieval, and native what-if.
  • Shares offline-hive inheritance logic while preserving per-entry overrides and RegistryList ordering.
  • Adds protocol and transport integration tests and documents both invocation modes.
File Description
resources/​registry/​tests/​registry.jsonrpc.tests.ps1 Tests JSON-RPC operations, offline hives, and both transports.
resources/​registry/​src/​types.rs Extracts shared offline-hive inheritance logic.
resources/​registry/​src/​main.rs Routes JSON-RPC invocation and uses shared inheritance logic.
resources/​registry/​src/​jsonrpc.rs Implements the protocol server, operation dispatch, and unit tests.
resources/​registry/​src/​args.rs Adds the jsonrpc subcommand.
resources/​registry/​registry.dsc.manifests.json Declares JSON-RPC transport and what-if support.
resources/​registry/​locales/​en-us.toml Adds localized command help and protocol errors.
docs/​reference/​resources/​Microsoft/​Windows/​Registry/​index.md Documents transports and RegistryList behavior.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown

😁 Code Coverage Report

Changed Code Coverage

98% (90%+ coverage)

Metric Value
Changed lines analyzed 245
Lines covered by tests 242
Coverage percentage 98%

🔵 Full Codebase Coverage

83% (good)

Metric Value
Total executable lines 22011
Lines covered by tests 18483
Coverage percentage 83%

Changed code coverage measures only Rust lines added/modified in this PR.
Full codebase coverage measures all instrumented Rust lines across the project.

@SteveL-MSFT
Steve Lee (SteveL-MSFT) merged commit 2af2b46 into main Nov 17, 2026
32 checks passed
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the stevel-msft-registry-json-rpc branch November 17, 2026 00:30
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