feat: absorb 6 kernel-surface files from Modules/Core - #8
Open
smuchow1962 wants to merge 1 commit into
Open
Conversation
Core owns 6 non-licensing files Herald.OSS lacked: the Community-tier FlightRecorder edition gate, the pipeline capability matrix, the edition validator, the manifest reader for dashboard config forms, and two kernel-adapter types (IStructuredOnlySink, MaterializingKernelSink). Core's test project cannot compile without PipelineCapabilityMatrix because it references Herald.OSS, not its own assembly, to avoid a CS0012 collision with the Pro/Enterprise package pin. Brings the 5 corresponding test files, the 21 .mmpform dashboard-form manifests PipelineManifestReader reads (11 apply to OSS's own Community-tier steps; 5 paid-tier manifests are left out since no OSS capability ever registers under those names), and a new MaterializingKernelSinkTests.cs written against OSS's own SpyLogger instead of importing Core's KernelPipelineTests.cs wholesale (that 636-line file mixes general kernel coverage OSS already tests under its own file layout with the 2 MaterializingKernelSink tests actually needed here). Test fixes required to port cleanly: - Trimmed 5 paid-tier step names (audit, circuitBreaker, durableBuffer, fallback, retry) from PipelineCatalogTests' InlineData: those steps register from Herald.Enterprise/Compliance at plugin load time and never exist in an OSS-only assembly. - FlightRecorderCommunityShapeTests expected InvalidOperationException; OSS's HeraldEditionGate throws the more specific HeraldEditionRequirementException (not a subclass). - Manifest container headers used Core's internal/technical step names; swapped in OSS's own plain-language DisplayName so the dashboard label check passes and the copy matches OSS's own naming. - Loosened one exact-count assertion in Catalog_includes_every_matrix_entry to a subset check: PipelineCapabilityMatrix caches a FrozenDictionary at first touch while PipelineStep.AllNames stays live, so other test classes' PipelineStep.Register(...) calls can land after the cache warms, depending on run order. The invariant the test owns (every matrix entry has a catalog entry) holds either way. Verified: net8.0/net9.0/net10.0 all build clean and the full suite passes (1606/1601 non-skipped depending on TFM, baseline was 1541/1536, 65 net-new). Not moved (needs Richard's sign-off before touching): QuickLogBuilder.With.cs, SinkRegistry.cs, SinkInfo.cs, SinkNameValidator.cs, NetworkSinkNameAssigner.cs. Together these implement a named-sink feature whose QuickLogBuilder methods overlap Sinks.cs/NetworkSinks.cs by name but not by signature (Core's copies add a 3rd name parameter) - moving them as-is creates ambiguous-overload errors against OSS's existing 2-param overloads. The feature also touches already-diverged shared files (QuickLogResult.cs, QuickLogBuilder.cs, PipelineBuildResult.cs, SinkRuntimeOverrideSet.cs) and something in Core's own build graph (not its plain OSS source tree) already supplies these members for Core's test project, which needs investigating before a real port - not a mechanical file move.
Contributor
Author
|
Companion PR (merges after this one): https://github.com/mmpworks/Herald.Core/pull/3 |
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
Modules/Core's test project cannot compile because 11 files exist only inCore, not in Herald.OSS, and the test project references Herald.OSS (not
Core's own assembly) to avoid a version collision. This PR moves the 6 of
those 11 files that carry no licensing gate and no naming collision into
Herald.OSS, so Core's test project can pick them up through the reference it
already has.
FlightRecorderCommunityShape,PipelineCapabilityMatrix,PipelineEditionValidator,PipelineManifestReader(Configuration), andIStructuredOnlySink,MaterializingKernelSink(Pipeline/Kernel).in an OSS-only test process (no Pro/Enterprise plugin loaded).
MaterializingKernelSinkTests.cswritten against OSS's ownSpyLoggertest double, instead of importing Core's 636-lineKernelPipelineTests.cswholesale — that file mixes general kernelcoverage OSS already tests under its own file layout with the 2
MaterializingKernelSinktests this PR actually needs..mmpformdashboard config-form manifests these types readat runtime for OSS's own Community-tier pipeline steps.
Real defects surfaced / Follow-ups
FlightRecorderCommunityShapeTestsexpectedInvalidOperationException;OSS's
HeraldEditionGatethrows the more specificHeraldEditionRequirementException(not a subclass — directException). Fixed the test to expect the type OSS actually throws.("Post-Filtering (NLog PostFilteringWrapper equivalent)") while OSS's own
PipelineStepdefinitions carry plain-languageDisplayNames ("Filter onMessage Text"). Prefixed each of the 10 Community-tier manifest headers
with OSS's own display name so the dashboard label check passes and the
copy matches what OSS actually calls the step.
Catalog_includes_every_matrix_entrywasorder-dependent.
PipelineCapabilityMatrix.Allcaches aFrozenDictionaryat first touch, whilePipelineStep.AllNames(and soPipelineCatalog.Build()) stays live. Other test classes in thisassembly (
PipelineStepCapabilityTests,DetourCSurfaceFillInTests)already call
PipelineStep.Register(...), and depending on run orderthose registrations can land after the matrix cache warms up. The
assertion checked that the catalog and matrix counts matched; loosened it
to the subset check the test actually needs (every matrix entry has a
catalog entry) — that invariant holds regardless of ordering. This is a
pre-existing characteristic of
PipelineCapabilityMatrix's caching design, not something this PRchanges; flagging for whoever owns that type next.
QuickLogBuilder.With.cs,SinkRegistry.cs,SinkInfo.cs,SinkNameValidator.cs,NetworkSinkNameAssigner.cs— the remaining 5 ofthe 11 Core-only files. Together they implement a "named sink" feature.
Core's
WithConsoleSink/WithFileSink/WithHttpJsonSinkadd a 3rdnameparameter that OSS's existingSinks.cs/NetworkSinks.csoverloads don't have — moving them as-is produces ambiguous-overload
errors against OSS's 2-param overloads once a caller omits the optional
tail. The feature also touches already-diverged shared files
(
QuickLogResult.cs: 856 diff lines against Core's copy,QuickLogBuilder.cs: 186,PipelineBuildResult.cs: 13,SinkRuntimeOverrideSet.cs: 170), and something in Core's own referencegraph — not its plain OSS source tree — already supplies these members to
Core's test project. That needs investigating before a real port; it
isn't a mechanical file move. Filing as a follow-up rather than guessing.
Test plan
dotnet build tests/Herald.OSS.Tests.csproj -c Release -f net8.0/net9.0/net10.0— all three green, 0 errors, same 3 pre-existing warnings on each TFM as before this PR.dotnet test tests/Herald.OSS.Tests.csproj -c Release -f net10.0— 1606 passed, 1 skipped, 0 failed (baseline: 1541 passed, 1 skipped).dotnet test tests/Herald.OSS.Tests.csproj -c Release -f net9.0— 1606 passed, 1 skipped, 0 failed (baseline: 1541 passed, 1 skipped).dotnet test tests/Herald.OSS.Tests.csproj -c Release -f net8.0— 1601 passed, 1 skipped, 0 failed (baseline: 1536 passed, 1 skipped — net8 omits 5 tests present on net9/net10, consistent with the baseline gap).Verified per TFM
Full test-suite results — net10.0
Full test-suite results — net9.0
Full test-suite results — net8.0
Addendum: blast radius
PipelineCatalog.cs(one comment edit only — no behaviorchange): the doc comment said OSS "intentionally omits" the matrix shape;
it no longer does, so the comment now says the matrix lives here but
PipelineCatalogstill deliberately keeps its own hand-maintained costnumbers instead of consuming it.
manifests/pipeline/*.mmpform, 11 files):OSS's own
Herald.OSS.csprojalready had a conditionalEmbeddedResource Include="manifests\pipeline\*.mmpform"wired in,unused until this PR populates the directory — this was an anticipated
seam, not new plumbing.
nothing already shipped in Herald.OSS moves or changes shape.
mmpworks/Herald.Core#refactor/drop-absorbed-kernel-surface(companionPR). Core's test project references Herald.OSS by sibling
ProjectReferencewhen present, falling back to the published
Herald.OSSNuGet package(currently pinned at 0.12.11 in the umbrella's
Directory.Packages.props)otherwise. Until this PR merges and a new Herald.OSS version ships, the
Core PR's test-file removal has nothing to fall back on for a
from-scratch clone that restores the package instead of building the
sibling project. No
HeraldCoreVersionorDirectory.Packages.propspin needs to move for the PAIR to be internally consistent (both repos
build via the sibling
ProjectReferencetoday, in this same umbrellacheckout) — but the next Herald.OSS NuGet release should include this
change before anyone rebuilds
Modules/Corefrom a package-onlyrestore.
AI-assisted: written with Claude (Max, build/licensing steward persona) via Claude Code, directed and reviewed by Steve.