Skip to content

release: event bus, binary persistence, source generators, transport codec#10

Merged
tgiachi merged 47 commits into
mainfrom
develop
Jun 26, 2026
Merged

release: event bus, binary persistence, source generators, transport codec#10
tgiachi merged 47 commits into
mainfrom
develop

Conversation

@tgiachi

@tgiachi tgiachi commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Release contents

Promotes develop into main to cut the next release. semantic-release will compute the version from the conventional commits below (feature-level changes → minor bump) and publish to NuGet on tag.

Event bus (SquidStd.Core / SquidStd.Services.Core)

  • IEventListener<in TEvent> and EventBusOptions contracts
  • Parallel per-listener dispatch with catch-all, fault isolation, and slow-listener telemetry
  • Delegate Subscribe with IDisposable unsubscribe
  • DI-native listener auto-subscription

Binary persistence (SquidStd.Persistence + .Abstractions + .MessagePack)

  • In-memory entity store with write-ordered journaling
  • Append-only binary journal service and atomic per-type snapshot service
  • Fixed-binary journal/snapshot codecs and FNV-1a ChecksumUtils
  • Lifecycle service with snapshot + journal replay and autosave
  • Serializer-agnostic via IDataSerializer; MessagePack provider and DI entity registration

Source generators (SquidStd.Generators)

  • Generated registrations for standard services, event listeners, job handlers, config sections, and Lua script modules
  • RegisterEventListenerAttribute and generated registration attributes with build-time diagnostics

Network transport codec (SquidStd.Network)

  • ITransportCodec contract with per-connection ConnectionPipeline descriptor
  • Per-connection codec applied on send and receive, with atomic SwapCodec for mid-connection upgrade

Build

  • Bump Microsoft.CodeAnalysis.CSharp to 5.3.0

Full test suite green (727 tests).

tgiachi added 30 commits June 26, 2026 12:56
Add ITransportCodec (in-place, length-preserving transport transform) with an
atomic mid-connection SwapCodec, a ConnectionPipeline descriptor, and a
per-connection connectionPipelineFactory on SquidTcpServer. Codec is applied
innermost (decode on receive before middleware, encode on send under the send
lock). Fully additive and backward compatible; receive history stays in sync
with decoded output. 97/97 Network tests green.
… subscribe

Rewrite EventBusService from the serialized channel model to a ConcurrentDictionary
parallel dispatcher with a single-listener fast path, catch-all (IEvent) listeners,
per-listener fault isolation, slow-listener telemetry, delegate Subscribe, and
IDisposable unsubscribe tokens. Unify ISyncEventListener/IAsyncEventListener into a
single contravariant IEventListener<T>. Publish once in MetricsCollectionService.

Register IEventBus via a delegate factory with a default EventBusOptions to resolve
the new two-constructor type. Migrate listener-side tests and samples to the unified
IEventListener<T> API.
Add RegisterEventListener<TEvent,TListener>() plus an EventListenerActivator
std service that subscribes all DI-registered listeners at startup with no
reflection. Register the activator at low priority so listeners are wired
before publishing services run.
…nd DI auto-subscription

Evolve IEventBus/EventBusService from the serialized channel model to a parallel
per-listener dispatcher: single-listener fast path, catch-all (IEvent) listeners,
per-listener fault isolation, slow-listener telemetry, delegate Subscribe, and
IDisposable unsubscribe tokens. Unify the sync/async listener split into a single
contravariant IEventListener<T>. Add DI-native auto-subscription via
RegisterEventListener<TEvent,TListener>() and a low-priority EventListenerActivator.
tgiachi added 17 commits June 26, 2026 16:45
- Format C# sources with jb cleanupcode across src, samples, and tests
- Apply existing ReSharper and EditorConfig style rules consistently
- Keep generated-registration behavior unchanged after formatting
Add per-package READMEs for SquidStd.Persistence(.Abstractions/.MessagePack),
list the three packages in the root README module table, and add a
SquidStd.Samples.Persistence console sample demonstrating the snapshot+journal
durable reload cycle.
Add SquidStd.Persistence(.Abstractions/.MessagePack): an embeddable in-memory
entity store with durable binary snapshot + journal (WAL). Full state in memory,
every mutation appended to a length+checksum-framed binary journal, periodic
snapshot + journal trim; boot loads snapshot and replays the journal tail.

Serializer-agnostic engine (via IDataSerializer/IDataDeserializer) with a
MessagePack provider as the recommended binary default; FNV-1a ChecksumUtils added
to SquidStd.Core; write-ordered journaling for deterministic replay; optional
IEventBus snapshot events. Includes module READMEs and a runnable sample.
@github-advanced-security

Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@tgiachi
tgiachi merged commit e927a39 into main Jun 26, 2026
3 checks passed
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.

2 participants