Skip to content

feat(samples): plan-0061 phase 2 - canonical Http/DependencyInjection/Logging scenarios - #130

Merged
ncipollina merged 2 commits into
mainfrom
plan-0061-phase-2-canonical-samples
Sep 3, 2026
Merged

feat(samples): plan-0061 phase 2 - canonical Http/DependencyInjection/Logging scenarios#130
ncipollina merged 2 commits into
mainfrom
plan-0061-phase-2-canonical-samples

Conversation

@ncipollina

Copy link
Copy Markdown
Contributor

Summary

  • Implements PLAN-0061 Phase 2 / ADR-0033 Amendment 2 - closes the last "zero example coverage" gap the pre-1.0 cleanup audit found, for Compono.Http, Compono.DependencyInjection, and Compono.Logging.
  • No new sample projects: extends the two existing launch samples, per ADR-0033's original scope and this amendment's explicit "add no new top-level sample projects" decision.
    • Compono.Samples.AspNetApi: adds ShippingClient (a typed HttpClient calling an external carrier API) + ShippingClientTests (Compono.Http: [Shared] TestHttpHandler, RespondJson/Verify(), and a failure-status case).
    • Compono.Samples.AspNetApi.Tests: adds DependencyInjectionTests (Compono.DependencyInjection: row.AsServiceProvider() bridged into a real WebApplicationFactory<Program> host's own IServiceCollection).
    • Compono.Samples.BasicUsage: adds NotificationService, LoggingSampleProfile, LoggingTests (Compono.Logging: UseLogging() + [Shared] ILogger<T> + Verify()).
  • Docs sync: docs/samples/aspnet-api.md/basic-usage.md mention the new scenarios; docs/packages/compono-http.md/compono-dependencyinjection.md/compono-logging.md link back to their sample scenario.
  • PLAN-0061 Phase 2 and the plan overall set to Status: Done; docs/plans/README.md index updated.
  • No public API changes - Compono.Http/Compono.DependencyInjection/Compono.Logging source 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.Tests alone - 9/9 passed.
  • samples/Compono.Samples.BasicUsage alone - 7/7 passed.
  • ComponoGeneratedLogging explicitly set (true + CompilerVisibleProperty) in Compono.Samples.BasicUsage.csproj, matching the existing ComponoGeneratedTestDoubles fix in the AspNetApi.Tests project for the same ProjectReference-bypasses-packed-props situation - verified the failure mode first, then the fix.
  • All new doc links manually verified to resolve to files that exist in this checkout.
  • package-validation.yaml/aot-validation.yaml - expected unaffected (samples are IsPackable=false, not part of either workflow's matrix); to be confirmed green by CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GMQEjFrUVGYkctE3ECfRuA

…/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
@github-actions github-actions Bot added the type: feat New feature label Sep 3, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread samples/Compono.Samples.AspNetApi/Domain.cs Outdated
Comment thread samples/Compono.Samples.AspNetApi.Tests/ShippingClientTests.cs Outdated
Comment thread docs/samples/aspnet-api.md
- 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
@ncipollina
ncipollina merged commit 22477e9 into main Sep 3, 2026
11 checks passed
@ncipollina
ncipollina deleted the plan-0061-phase-2-canonical-samples branch September 3, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant