Merged
Conversation
…are version checks Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Essentials startup and diagnostic behavior to better support running the Web API and developer tooling even when a valid configuration file is not present, and improves certificate loading compatibility for Crestron runtimes.
Changes:
- Allow
ControlSystem.GoWithLoad()to proceed when config load fails / config is null, with additional null-guards in device/room/tieline loading paths. - Add startup/diagnostic log output for Web API readiness and the Developer Tools web app URL.
- Replace PFX loading for the debug websocket sink with a BouncyCastle-based PKCS#12 reader and clear password char arrays after use.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/PepperDash.Essentials/ControlSystem.cs |
Enables config-less startup by not aborting on config load failure and adds null checks around config-driven initialization. |
src/PepperDash.Essentials.Core/Web/EssentialsWebApi.cs |
Adds additional log output after route enumeration, including a Developer Tools URL. |
src/PepperDash.Core/Logging/DebugWebsocketSink.cs |
Switches certificate loading to a BouncyCastle PKCS#12 path and clears password buffers after use. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ify config loading warning message
…and response messages
andrew-welker
approved these changes
May 7, 2026
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.
This pull request introduces several improvements and fixes across certificate handling, configuration validation, and logging in the Essentials codebase. The most significant changes are the overhaul of certificate loading for better compatibility on specific runtimes, enhanced validation and error handling for configuration loading, and improved logging for easier diagnostics and developer experience.
Certificate handling improvements:
LoadCertFromBouncyCastle) to load PKCS#12 certificates generated by BouncyCastle, ensuring compatibility on Crestron runtimes. The new method directly reads the certificate and attaches the private key, and securely clears password arrays from memory after use.Org.BouncyCastle.Crypto.ParametersandSystem.Security.Cryptographyimports to support new certificate handling logic.Configuration validation and error handling:
Warningwhen config loading fails, and improved messaging to guide users. [1] [2]Logging and diagnostics enhancements:
Other changes:
ControlSystem.InitializeSystem, possibly to allow running on a wider range of firmware versions or for development purposes. [1] [2]These changes collectively improve the reliability, security, and usability of the system, especially in environments with strict runtime constraints or where configuration errors are common.