chore: CONTRIBUTING, xUnit tests, warnings-as-errors (OpenSSF Passing groundwork) - #8
Merged
Merged
Conversation
OpenSSF Best Practices Passing tier groundwork. Targets the four real
gaps from the questionnaire walkthrough.
CONTRIBUTING.md
Documents branching/PR flow, commit conventions, code style, the
test policy ('add a test if reasonably testable'), how to add a
monitor or a new service, and what reviewers look for. Satisfies
test_policy / tests_are_added / tests_documented_added.
tests/GamerGuardian.Tests
New xUnit test project with 36 tests across three areas:
* ServiceCatalogTests — catalog has no duplicates, every entry
has display name + description + known DefaultStartType, the
RecommendedTarget invariant holds, expected services present.
* SettingDocsTests — Mechanism / Verify lookups return non-empty
strings for every known setting Id, the service: prefix path
includes the service name, hdr:/refresh:/resolution: prefixes
route correctly, unknown Ids return the documented marker.
* WindowsServiceControllerTests — Exists / ReadStartType / ReadStatus
all return safe defaults for missing services without throwing,
and return non-Unknown values for the always-present EventLog
service.
Satisfies test_invocation (dotnet test works) and test_most (real
branch coverage of the testable surface).
GamerGuardian.csproj
TreatWarningsAsErrors=true. Build is currently clean; this prevents
silent regression. Satisfies warnings_strict.
build.yml
Runs 'dotnet test' after build on every PR. Required check on main.
carterscode
enabled auto-merge
May 7, 2026 19:20
Comment on lines
+48
to
+54
| foreach (var def in ServiceCatalog.All) | ||
| { | ||
| if (def.RecommendedTarget.HasValue) | ||
| { | ||
| Assert.NotEqual(ServiceTargetState.Default, def.RecommendedTarget.Value); | ||
| } | ||
| } |
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
Closes the four real gaps from the OpenSSF Best Practices questionnaire:
test_policy,tests_are_added,tests_documented_added.tests/GamerGuardian.Tests/— 36 tests acrossServiceCatalog,SettingDocs,WindowsServiceController. Satisfiestest_invocation,test_most.<TreatWarningsAsErrors>true</TreatWarningsAsErrors>insrc/GamerGuardian/GamerGuardian.csproj. Satisfieswarnings_strict.build.ymlrunsdotnet testafter build on every PR.Test plan
dotnet build GamerGuardian.sln -c Release— 0 warnings, 0 errorsdotnet test GamerGuardian.sln -c Release— 36/36 passed locallyAfter merge
This is the work that needs to land on
mainto flip 6 OpenSSF criteria from Unmet to Met. Combined with the SCORECARD_TOKEN PAT setup and the OpenSSF Best Practices badge submission (both your manual steps), the project should comfortably earn the Passing tier badge.🤖 Generated with Claude Code