[Repo Assist] test+docs: add AppVersionInfo tests and update TEST_COVERAGE.md#502
Merged
shanselman merged 1 commit intoMay 22, 2026
Conversation
Task 5 (Coding Improvements): - Add AppVersionInfoTests.cs with 8 tests covering: - TestOverride returns injected value for Version and DisplayVersion - DisplayVersion always equals "v" + Version - Without override: Version is non-empty, DisplayVersion starts with "v" - Override clearing restores the real version Task 4 (Engineering Investments): - Update docs/TEST_COVERAGE.md to document test classes added since last update (ExecApprovalV2*, ExecApprovalsCoordinator, NodeCapabilityGating, AssetHashPinning, SingleFlightDownload, Mcp*, Channel*, Instance*, A2UICapabilitySecurityTests, ChatAttachment, HttpUrlRisk, UrlLogSanitizer, TokenSanitizer, WebBridge, SpeechToText, LocalGatewayUrl) - Adjust test count header to "2400+" (approximate; run dotnet test for exact) - Add "Last Updated" date Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
shanselman
added a commit
that referenced
this pull request
May 22, 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 PR was created by Repo Assist, an automated AI assistant.
Summary
Two improvements across Task 5 (Coding Improvements) and Task 4 (Engineering Investments).
Task 5: Add
AppVersionInfoTests.cs(8 new tests)AppVersionInfohad zero test coverage despite having aTestOverrideproperty specifically designed for testability. This PR adds:Version_WithTestOverride_ReturnsThatValueVersionDisplayVersion_WithTestOverride_PrefixesVDisplayVersion="v" + TestOverrideVersion_WithoutOverride_ReturnsNonNullNonEmptyDisplayVersion_WithoutOverride_StartsWithVVersion_AfterClearingOverride_DoesNotReturnClearedValueDisplayVersion_AlwaysEqualsVPlusVersion(3 theory cases)Each test cleans up
TestOverrideviaIDisposableto avoid test-order coupling.Task 4: Update
docs/TEST_COVERAGE.mdThe document claimed "2349 tests" but many test classes added since May 10 were undocumented. This PR:
"2400+"with an explanatory noteExecApprovalV2*suite (6 test files)ExecApprovalsCoordinatorTests(~30 tests)NodeCapabilityGatingTests(~17 tests)AssetHashPinningTests,SingleFlightDownloadTestsMcpToolBridgeTests,McpHttpServerTests,McpAuthTokenResetTestsChannelConfigPatchBuilderTests,ChannelsPipelineTests,InstanceMergerTestsChatAttachmentTests,HttpUrlRiskEvaluatorTests,UrlLogSanitizerTests, and moreTest Status
dotnet build tests/OpenClaw.Shared.Tests→ Build succeeded, 0 errors, 3 pre-existing warnings (not caused by this PR).Full test run requires Windows; the new tests use only
AppVersionInfo.TestOverride(cross-platformnet10.0) with no Windows-specific APIs.