Skip to content

chore: CONTRIBUTING, xUnit tests, warnings-as-errors (OpenSSF Passing groundwork) - #8

Merged
carterscode merged 1 commit into
mainfrom
chore/openssf-passing-tier
May 7, 2026
Merged

chore: CONTRIBUTING, xUnit tests, warnings-as-errors (OpenSSF Passing groundwork)#8
carterscode merged 1 commit into
mainfrom
chore/openssf-passing-tier

Conversation

@carterscode

Copy link
Copy Markdown
Owner

Summary

Closes the four real gaps from the OpenSSF Best Practices questionnaire:

  • CONTRIBUTING.md — branching/PR flow, commit conventions, test policy, how to add a monitor or service. Satisfies test_policy, tests_are_added, tests_documented_added.
  • xUnit test project at tests/GamerGuardian.Tests/ — 36 tests across ServiceCatalog, SettingDocs, WindowsServiceController. Satisfies test_invocation, test_most.
  • <TreatWarningsAsErrors>true</TreatWarningsAsErrors> in src/GamerGuardian/GamerGuardian.csproj. Satisfies warnings_strict.
  • build.yml runs dotnet test after build on every PR.

Test plan

  • dotnet build GamerGuardian.sln -c Release — 0 warnings, 0 errors
  • dotnet test GamerGuardian.sln -c Release — 36/36 passed locally
  • CI build + Analyze (csharp) + Analyze (actions) green on this PR
  • After merge: re-grade the affected criteria on bestpractices.dev

After merge

This is the work that needs to land on main to 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

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
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);
}
}
@carterscode
carterscode merged commit c4bfa47 into main May 7, 2026
5 checks passed
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