Skip to content

refactor: seal Q92 — options-only construction, factory-less singleton Extensions - #36

Merged
Blind-Striker merged 2 commits into
masterfrom
refactor/q92-construction-reshape
Aug 15, 2026
Merged

Blind-Striker merged 2 commits into
masterfrom
refactor/q92-construction-reshape

Conversation

@Blind-Striker

Copy link
Copy Markdown
Collaborator

Executes M3 plan Arc 1 (Q92, ADR-0010; research log Session 24). Closes #31.

What

  • Constructor internalizes. OpenCodeClient(HttpClient, options) is now internal friend-assembly test surface — the change rode the ClientEmitter and a committed regen; contract tests, ContractScenario, and the benchmarks keep compiling unchanged via the existing IVT. OpenCodeClient(OpenCodeClientOptions) is the only public construction path.
  • Guard machinery deletes with its doors. The anonymous-mode Authorization refusal (construction + per-send), the injected-BaseAddress refusal, and their five tests are gone; the Q90 password semantics (null = anonymous, blank refused) stay pinned, and the password-wins-over-default decoration test survives.
  • Extensions goes factory-less singleton. AddOpenCode registers one singleton client owning its transport plus SessionsClient resolved from the same instance, returns IServiceCollection, and drops Microsoft.Extensions.Http (pin removed from CPM). Tests reshape to registration topology — wire behavior stays PipelineTests' domain — and a reflection-based roster test keeps future client families from silently lagging the registration list.
  • Sandbox and packaging follow. The showcase drops the delegating-handler chain; csproj Description/PackageTags, the packed README row, and the Password XML doc drop their factory/guard-era promises.
  • Baselines re-verified. PublicApi (sole delta: the removed public ctor) and the ClientEmitter snapshot, both reviewed before acceptance.

Review

A three-dimension adversarially-verified review ran on the branch: runtime-correctness came back clean; six confirmed doc/hygiene leftovers (orphaned CPM pin, stale README/XML-doc promises, unqualified pooled-lifetime comment, one inline literal, ROADMAP currency) were fixed in the second commit.

Verification

All six gates ALL-GREEN at each commit; 914 tests (the 21-test delta is exactly the five deleted guard tests and the Extensions topology reshape across three local legs). net472 compiles on the Windows CI lane; under the ADR-0010 singleton posture the net472 connection-lease hardening is a GA gate, tracked as M3 plan Arc 5.

…n Extensions

The transport constructor internalizes as friend-assembly test surface (emitter
change riding the committed regen), the pipeline's anonymous-Authorization and
BaseAddress injection guards delete with the doors they defended, AddOpenCode
registers one singleton client with sub-clients resolved from the same instance
and drops Microsoft.Extensions.Http, the Extensions tests reshape to
registration topology with a roster test keeping future families honest, and
the sandbox showcase follows. PublicApi and emitter baselines re-verified.
The orphaned Microsoft.Extensions.Http pin deletes, the packed README row and
the Password XML doc drop their factory/guard-era promises, the pooled-lifetime
comment gains its modern-TFM qualifier, the chaining test rides the centralized
endpoint, and the ROADMAP records Arc 1 as landed in the same change.
@Blind-Striker
Blind-Striker merged commit f13691a into master Aug 15, 2026
3 checks passed
@Blind-Striker
Blind-Striker deleted the refactor/q92-construction-reshape branch September 14, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M2: Extensions DI lifetime shape — transient disposable sub-client hazards (R2-1)

1 participant