Skip to content

[Repo Assist] test+docs: add AppVersionInfo tests and update TEST_COVERAGE.md#502

Merged
shanselman merged 1 commit into
masterfrom
repo-assist/improve-appversioninfo-tests-and-coverage-doc-2026-05-22-f6c6551b178ffc75
May 22, 2026
Merged

[Repo Assist] test+docs: add AppVersionInfo tests and update TEST_COVERAGE.md#502
shanselman merged 1 commit into
masterfrom
repo-assist/improve-appversioninfo-tests-and-coverage-doc-2026-05-22-f6c6551b178ffc75

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 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)

AppVersionInfo had zero test coverage despite having a TestOverride property specifically designed for testability. This PR adds:

Test Description
Version_WithTestOverride_ReturnsThatValue Injected override is reflected in Version
DisplayVersion_WithTestOverride_PrefixesV DisplayVersion = "v" + TestOverride
Version_WithoutOverride_ReturnsNonNullNonEmpty Real version is always surfaced
DisplayVersion_WithoutOverride_StartsWithV Format invariant holds without override
Version_AfterClearingOverride_DoesNotReturnClearedValue Override is truly optional
DisplayVersion_AlwaysEqualsVPlusVersion (3 theory cases) Contract holds for multiple versions

Each test cleans up TestOverride via IDisposable to avoid test-order coupling.


Task 4: Update docs/TEST_COVERAGE.md

The document claimed "2349 tests" but many test classes added since May 10 were undocumented. This PR:

  • Updates the total count header to "2400+" with an explanatory note
  • Adds sections for all newly documented test classes:
    • ExecApprovalV2* suite (6 test files)
    • ExecApprovalsCoordinatorTests (~30 tests)
    • NodeCapabilityGatingTests (~17 tests)
    • AssetHashPinningTests, SingleFlightDownloadTests
    • McpToolBridgeTests, McpHttpServerTests, McpAuthTokenResetTests
    • ChannelConfigPatchBuilderTests, ChannelsPipelineTests, InstanceMergerTests
    • ChatAttachmentTests, HttpUrlRiskEvaluatorTests, UrlLogSanitizerTests, and more
  • Updates "Last Updated" date to 2026-05-22

Test Status

dotnet build tests/OpenClaw.Shared.TestsBuild 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-platform net10.0) with no Windows-specific APIs.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

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 shanselman merged commit 27f95f4 into master May 22, 2026
7 checks passed
shanselman added a commit that referenced this pull request May 22, 2026
Includes PRs #498, #500, #501, #502, and #503.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shanselman shanselman deleted the repo-assist/improve-appversioninfo-tests-and-coverage-doc-2026-05-22-f6c6551b178ffc75 branch May 22, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant