Skip to content

Migrate the licensing engine to Nordstein.Core (closes #539) - #542

Merged
JabbaKadabra merged 2 commits into
masterfrom
migrate_licensing
Aug 14, 2026
Merged

Migrate the licensing engine to Nordstein.Core (closes #539)#542
JabbaKadabra merged 2 commits into
masterfrom
migrate_licensing

Conversation

@JabbaKadabra

Copy link
Copy Markdown
Collaborator

Third extraction tranche: the licensing engine moves to Nordstein.Core.Licensing (companion PR NordsteinSoftware/Nordstein.Core#4, submodule bumped to its head), and Proxytrace.Licensing becomes the product policy + thin façade.

What stays in the product (unchanged public surface)

  • LicenseFeature / LicenseLimit / LicenseTier enums, LicensePolicy, TierDefinition
  • LicensePublicKeys trust root (embedded key + build-time override), issuer/audience constants
  • ILicenseService, ILicenseActivator, LicenseSnapshot (with Free/Invalid/Enterprise factories), LicenseSource/LicenseStatus, the exceptions, LicenseServiceExtensions.Ensure

Zero downstream call-site changes — the 60+ consuming files in Api/Application/Proxy are untouched; adapters (LicenseServiceAdapter, LicenseActivatorAdapter, LicenseSnapshotMapper, ProxytraceLicenseTierPolicy) convert at the boundary and rethrow engine rejections as the product's InvalidLicenseException.

Wire-format contract

Enum member names double as the JWT tier/feat/lim claim values and are preserved exactly; pinned by façade tests (feature/limit overlays, offline claim, kiosk override round-trip). One announced divergence from the old parsing: an undefined numeric claim value (e.g. tier: "50", previously leaking (LicenseTier)50) now falls back to Free; numeric aliases of defined members ("100" → Enterprise) still resolve. Both pinned by tests.

Docs

docs/code-reuse.md (Core table + roadmap: licensing done), docs/licensing.md (split note; directives unchanged), plus the cross-linked Core docs framework (core/CLAUDE.md, core/docs/*) referenced from the updated root CLAUDE.md.

Verification

  • Full product solution builds warning-free in source mode and package mode (-p:UseLocalCore=false against freshly packed .nupkgs)
  • Suites green: Licensing 33/33, Application 569 (6 pre-existing Docker-gated skips), Api 589, Proxy 122; Core standalone 333
  • Adversarial review pass on the extraction (findings fixed in the Core PR: hung-license-server host stop, ServerUrl override seam)

No user-facing behavior change → no CHANGELOG entry.

Closes #539

🤖 Generated with Claude Code

https://claude.ai/code/session_01Nv67JW3ZyVvVWvaLYTcBZj

JabbaKadabra and others added 2 commits August 14, 2026 14:40
Move the licensing engine to Nordstein.Core.Licensing (submodule bump) and
turn Proxytrace.Licensing into the product policy plus a thin enum-typed
facade: the LicenseFeature/LicenseLimit/LicenseTier enums, LicensePolicy,
the issuer/audience, and the LicensePublicKeys trust root stay here, while
JWT validation, activation, the snapshot, and the server check with offline
grace now come from the Core engine, parameterized via ILicenseTierPolicy
(enum member names remain the JWT claim values — the wire format is
unchanged, preserved by tests on both sides).

No downstream call site changes: ILicenseService, ILicenseActivator,
LicenseSnapshot, the enums, and the exceptions keep their exact public
surface; adapters convert at the boundary and rethrow engine rejections as
the product's InvalidLicenseException.

Also carries the cross-linked docs framework (core/CLAUDE.md pointer, Core
doc references) and updates docs/code-reuse.md + docs/licensing.md for the
split.

Closes #539

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nv67JW3ZyVvVWvaLYTcBZj
The Nordstein.Core PR branch merged main, which includes the dependabot
group bump moving the Microsoft.* platform packages to 10.0.11 and
NSubstitute to 6.2.0. Advancing the submodule made those versions flow
into the product's source-mode graph, turning every remaining 10.0.10 /
6.0.0 pin into an NU1605 package downgrade (this is what failed CI on the
Core PR's merge ref). Align all product pins with the same versions.

Full backend suite green after the bump (2,780 passed, 6 pre-existing
Docker-gated skips).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nv67JW3ZyVvVWvaLYTcBZj
@JabbaKadabra
JabbaKadabra merged commit f09839c into master Aug 14, 2026
14 checks passed
@JabbaKadabra
JabbaKadabra deleted the migrate_licensing branch August 14, 2026 13:33
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.

Split reusable licensing engine from Proxytrace product policy

1 participant