Skip to content

Construct Chronicle reactors and reducers through Arc dependency injection #93

Description

@woksin

Chronicle.TypeScript now lets a host activate reactors and reducers (ChronicleOptions.artifactActivator, Cratis/Chronicle.TypeScript#121) and gives reactor handlers the event store and read models of their observation. Plug Arc's DI into it from withChronicle, like Arc for .NET composes Chronicle with the host container:

  • activate each delivered batch in an Arc service scope for the observation's tenant (namespace), with delivery correlation and cancellation, resolving the artifact from Arc DI (constructor dependencies);
  • a supported Core API to run the handler and returned effects inside that scope, so currentServices()/currentContext() work in handlers;
  • pin Arc's existing Chronicle services (ChronicleReadModels etc.) to the delivery's store;
  • drain in-flight deliveries before scopes and singletons are disposed on shutdown, and pass the delivery signal to commands returned from reactors;
  • avoid duplicate registrations across builder services, options.services and decorated lifetimes;
  • define the result when scope disposal fails before acknowledgement.

Requires the @cratis/chronicle release that contains #121.

Activity

  1. self-assigned this
    on Sep 26, 2026
  2. deleted a comment from cratis-direct on Sep 28, 2026
  3. deleted a comment from cratis-direct on Sep 28, 2026
  4. deleted a comment from cratis-direct on Sep 28, 2026
  5. deleted a comment from cratis-direct on Sep 28, 2026
  6. deleted a comment from cratis-direct on Sep 28, 2026
  7. deleted a comment from cratis-direct on Sep 28, 2026
  8. deleted a comment from cratis-direct on Sep 28, 2026
  9. deleted a comment from cratis-direct on Sep 28, 2026
  10. deleted a comment from cratis-direct on Sep 28, 2026
  11. deleted a comment from cratis-direct on Sep 28, 2026
  12. deleted a comment from cratis-direct on Sep 28, 2026
  13. deleted a comment from cratis-direct on Sep 28, 2026
  14. deleted a comment from cratis-direct on Sep 28, 2026
  15. 28 remaining items

  16. woksin commented on Sep 29, 2026

    @woksin
    ContributorAuthor

    Increment A2 (shutdown participants, registry-owned coordinated shutdown; no-participant path unchanged) shipped in #127 / v0.45.0. Next: A3 Chronicle fallback registration, A4 activator, A5 store pinning and returned-command signal, A6 runtime shutdown, live kernel and docs. Also #121 (pre-existing synchronous closeWebSockets leak) can now be fixed on top.

  17. woksin commented on Sep 29, 2026

    @woksin
    ContributorAuthor

    Increment A3 (discovered reactors and reducers registered as deferred scoped fallbacks) shipped in #131 / v0.46.0. Next: A4 activator.

  18. woksin commented on Sep 29, 2026

    @woksin
    ContributorAuthor

    Increment A4 (preview opt-in scoped activation, activateArtifactsInScopes) shipped in #135 / v0.48.0. Remaining: A5 (pin Arc Chronicle services to the delivery store, pass the delivery signal to returned commands) and A6 (enable by default, caller-owned clients, raise the Chronicle peer floor to 6.17, live-kernel tests).

  19. woksin commented on Sep 29, 2026

    @woksin
    ContributorAuthor

    All increments (A1–A6) are released; A6 shipped in #137 / v0.50.0. Scoped activation remains an opt-in option (activateArtifactsInScopes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions