Add CI workflow and unit tests for HubDocs functionality#3
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1525785. Configure here.
| Assert.Contains("/hubdocs/index.html", routeEndpoints); | ||
| Assert.Contains("/hubdocs", routeEndpoints); | ||
|
|
||
| await app.StopAsync(); |
There was a problem hiding this comment.
WebApplication not cleaned up on test assertion failure
Medium Severity
Both tests that call app.StartAsync() place app.StopAsync() after assertions without a try/finally block. If any assertion between StartAsync and StopAsync throws, the WebApplication is never stopped, leaving the port bound. Since both tests are in the same class (xUnit runs them sequentially), a failure in the first test will cascade into a port-conflict failure in the second test, making debugging harder.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 1525785. Configure here.
| { | ||
| public void AcceptsNullableRef(string? value) | ||
| { | ||
| } |
There was a problem hiding this comment.
Unused test fixture method AcceptsNullableRef
Low Severity
AcceptsNullableRef(string? value) in NullableHolder is never referenced by any test. The existing tests use AcceptsNullableValue and AcceptsNonNullableRef, but no test exercises the nullable reference type case. This is dead code that may also indicate a missing test for nullable reference type detection via IsNullable.
Reviewed by Cursor Bugbot for commit 1525785. Configure here.


Note
Low Risk
Low risk: adds CI automation and new unit tests without changing production library behavior; main risk is CI instability due to targeting
.NET 10.0.xand new coverage tooling.Overview
Adds a new GitHub Actions workflow (
ci-build-test.yml) to restore/buildHubDocs.sln, run unit tests with code coverage collection, generate an HTML/Markdown coverage report, and upload coverage artifacts on pushes/PRs tomain/master.Introduces unit tests covering HubDocs internals: endpoint registration via
AddHubDocs, hub route discovery and hub metadata generation (including typed client methods), method signature/type/nullable formatting, base/derived method deduping, plus basic tests forHubDocsAttributeusage andHubRouteRegistrystate updates.Reviewed by Cursor Bugbot for commit 1525785. Bugbot is set up for automated code reviews on this repo. Configure here.