feat(samples): plan-0061 phase 2 - canonical Http/DependencyInjection/Logging scenarios - #130
Merged
Merged
Conversation
…/Logging scenarios Extends the two existing launch samples per ADR-0033 Amendment 2 rather than adding new per-package sample projects: Compono.Samples.AspNetApi gains a Compono.Http scenario (ShippingClient, an outbound-HTTP-calling typed client, tested against a composed TestHttpHandler) and a Compono.DependencyInjection scenario (row.AsServiceProvider() bridged into a real ASP.NET Core host's own IServiceCollection); Compono.Samples.BasicUsage gains a Compono.Logging scenario (NotificationService composed via UseLogging(), asserted with Verify()). Docs/package-guide "Next" sections updated to point at the new scenarios. Closes PLAN-0061 Phase 2 - plan set to Done. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GMQEjFrUVGYkctE3ECfRuA
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9824936039
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- ShippingClient.RequestLabelAsync no longer suppresses a null
deserialization result with the null-forgiving operator - throws
HttpRequestException instead, preserving the method's non-null
Task<ShippingLabel> contract.
- ShippingClientTests now register/verify against the exact "/v1/labels"
endpoint (OnPost("/v1/labels")) instead of Match.Any<string>(), so a
regression to a different path fails the tests; added a regression test
proving a null-body response is rejected.
- docs/samples/aspnet-api.md/index.md: corrected the stale "all four
Compono packages" wording and package/demonstrates columns now that the
ASP.NET API sample covers six packages and Basic Usage covers three.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GMQEjFrUVGYkctE3ECfRuA
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
Compono.Http,Compono.DependencyInjection, andCompono.Logging.Compono.Samples.AspNetApi: addsShippingClient(a typedHttpClientcalling an external carrier API) +ShippingClientTests(Compono.Http:[Shared] TestHttpHandler,RespondJson/Verify(), and a failure-status case).Compono.Samples.AspNetApi.Tests: addsDependencyInjectionTests(Compono.DependencyInjection:row.AsServiceProvider()bridged into a realWebApplicationFactory<Program>host's ownIServiceCollection).Compono.Samples.BasicUsage: addsNotificationService,LoggingSampleProfile,LoggingTests(Compono.Logging:UseLogging()+[Shared] ILogger<T>+Verify()).docs/samples/aspnet-api.md/basic-usage.mdmention the new scenarios;docs/packages/compono-http.md/compono-dependencyinjection.md/compono-logging.mdlink back to their sample scenario.Status: Done;docs/plans/README.mdindex updated.Compono.Http/Compono.DependencyInjection/Compono.Loggingsource untouched.Test plan
dotnet build Compono.slnx -c Release- 0 errors, 0 warnings.dotnet test Compono.slnx -c Release- 3482/3482 passed (3478 baseline + 4 new).samples/Compono.Samples.AspNetApi.Testsalone - 9/9 passed.samples/Compono.Samples.BasicUsagealone - 7/7 passed.ComponoGeneratedLoggingexplicitly set (true+CompilerVisibleProperty) inCompono.Samples.BasicUsage.csproj, matching the existingComponoGeneratedTestDoublesfix in the AspNetApi.Tests project for the same ProjectReference-bypasses-packed-props situation - verified the failure mode first, then the fix.package-validation.yaml/aot-validation.yaml- expected unaffected (samples areIsPackable=false, not part of either workflow's matrix); to be confirmed green by CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01GMQEjFrUVGYkctE3ECfRuA