Skip to content

Component: Smrt.Core

Canonical source: SmrtApps/src/Smrt.Core/README.md (mirrored below)


Smrt.Core

Overview & Responsibilities

  • Provides assembly-level metadata helpers (CoreAssembly) that higher-level components (Smrt.Infrastructure, runtime hosts, services) rely on during diagnostics.
  • Establishes cross-runtime conventions without taking dependencies on optional stacks, keeping the core surface lightweight.
  • Serves as the canonical landing spot for future cross-cutting abstractions referenced by both C# and Python bridges.

Dependencies & Integrations

  • Targets .NET 8 and intentionally avoids third-party dependencies so it can be referenced by any SmrtHub assembly.
  • Upstream libraries (e.g., Smrt.Infrastructure, Smrt.Logging) consume these primitives to avoid duplicating core conventions.

Configuration & Log Paths

  • This assembly does not read or write configuration or logs directly. Components that require persistence rely on Smrt.Config and Smrt.Logging as documented in the Operational Data Policy.

Runtime Flows

  • CoreAssembly.Assembly exposes the authoritative Assembly instance so downstream infrastructure can resolve strong-name metadata without reflection boilerplate.
  • CoreAssembly.GetInformationalVersion() returns the informational version string used by support bundles and logging enrichers.
  • Additional primitives must remain side-effect free so that referencing assemblies can safely load them in design-time tools.

Public surface

The primary public surface is the small set of primitives listed under Key APIs below.

Key APIs

  • CoreAssembly.Assembly – cached strong-name identity for the SmrtHub.Core assembly.
  • CoreAssembly.GetInformationalVersion() – retrieves the informational version string with defensive fallbacks for missing metadata.

Testing & Validation

  • When adding new primitives, create focused unit tests in the consuming component (or a future Smrt.Core.Tests project) to preserve backward compatibility for dependent libraries.
  • Perform solution-wide builds to ensure no new dependencies are introduced that would break lightweight consumers.

Support Bundle & Diagnostics

  • Smrt.Core does not emit logs or bundle artifacts directly. Diagnostic behavior is inherited by consumers that combine Smrt.Core with Smrt.Logging and Smrt.SupportBundle.

Roadmap

  • TODO: add shared identifier normalization utilities once parity requirements across runtimes are finalized.

Subdirectories

  • Currently none beyond build outputs (bin/, obj/). Generated folders remain excluded from documentation scope.
  • SmrtApps/src/Smrt.Infrastructure/README.md
  • SmrtApps/src/Smrt.Logging/README.md