Skip to content

Widen Chronicle client-docs tabs to real Elixir parity#25

Open
woksin wants to merge 5 commits into
mainfrom
chore/chronicle-client-docs-parity
Open

Widen Chronicle client-docs tabs to real Elixir parity#25
woksin wants to merge 5 commits into
mainfrom
chore/chronicle-client-docs-parity

Conversation

@woksin

@woksin woksin commented Jul 5, 2026

Copy link
Copy Markdown

Added

  • Real Elixir examples in the shared Chronicle docs everywhere the SDK already supports it (events, reactors, reducers, projections, constraints, compliance, subscriptions, seeding, event migrations, dynamic tags, correlation/identity/causation, and more), instead of falling back to C#-only or C#+TypeScript-only tabs.
  • A shared Jobs and Webhooks page in the main Chronicle docs — previously undocumented anywhere except Elixir and TypeScript's own client pages, at inconsistent depth.
  • A real Elixir event-seeding guide, replacing a stale placeholder.
  • Explicit "not supported yet" notes on shared doc tabs for confirmed genuine Elixir gaps, so missing coverage is honest rather than silent.

Changed

  • Trimmed Elixir client-specific pages that duplicated shared concept explanations (correlation/identity/causation, sinks, event stores, subscriptions) down to cross-links into the shared docs, keeping the genuinely Elixir-specific reference content.

Chronicle's shared docs previously fell back to C#-only or C#+TypeScript-only
tabs in many places because Elixir coverage was never written, not because
the SDK lacked the capability. Add real, source-verified Elixir snippets
everywhere an equivalent API exists (events, reactors, reducers, projections,
constraints, compliance, subscriptions, seeding, event migrations, dynamic
tags, correlation/identity/causation, and more), and add explicit
"not supported" stubs for the confirmed genuine gaps so every tab is either
real or honestly scoped, never silently missing.

Trims Elixir client-specific pages that duplicated shared concept
explanations down to cross-links into the shared docs, adds a shared
Jobs/Webhooks page (previously undocumented anywhere but Elixir and
TypeScript, at inconsistent depth), and adds a real Elixir event-seeding
guide (replacing a stale placeholder).
@woksin woksin added the minor label Jul 5, 2026
woksin added 4 commits July 5, 2026 08:03
Its second snippet was bare top-level code (not wrapped in a def), and
wasn't registered in BODY_SNIPPETS, so the generated test file placed it
directly at module scope where it executes immediately on load instead of
only being compiled. It called Chronicle.get_event_stores() against an
unconfigured client and crashed the whole snippet-compilation test.
Register it in BODY_SNIPPETS, matching the established get-started/client-flow
precedent, so both of its snippets are wrapped in never-invoked functions.
use Chronicle.Events.EventType requires an :id (Keyword.fetch!, unlike
ReadModel/Reactor/Reducer/Projection's optional id which defaults to the
module name) — these snippets omitted it, which crashes with a KeyError at
macro-expansion time. Add a stable id to each.
…ir toolchain

The validator concatenates every snippet into one file and compiles it, so a
struct used before its own defmodule is textually processed fails to expand
at compile time (Elixir does not reliably forward-reference structs across
top-level modules within one compiled unit) — surfaced now that a real
Elixir/OTP toolchain actually ran this for the first time:

- projections/filtering/appending-with-metadata.md referenced
  FilteringOrderPlaced (defined in the alphabetically-later basic.md). Made
  it self-contained with its own locally-scoped event instead of relying on
  file ordering, matching the safer established pattern.
- tutorial/first-event/append.md and tutorial/reacting/explicit-append.md
  reference structs defined in alphabetically-later sibling files
  (book-added.md, notification-sent-event.md/waitlist-notifier.md). Deferred
  both via BODY_SNIPPETS so they compile after all real modules, matching
  get-started/client-flow's established precedent, instead of renaming
  files that are also referenced by the shared docs and other clients.
- projections/model-bound/removal/basic.md called removed_with/1, but the
  macro is only imported at arity 2 (Chronicle.ReadModels.ReadModel's
  __using__ explicitly imports removed_with: 2, not removed_with: 1) — add
  the required empty options list.
- concepts/correlation-identity-causation/correlation.md aliased
  Chronicle.CorrelationId, but the real module is
  Chronicle.Correlation.CorrelationId.
…eterminism

CI's parallel compiler runs with fewer schedulers (max_cases: 8) than this
session's local runs (24), and struct-forward-reference failures are
scheduling-dependent — a file that referenced another file's not-yet-textually-processed
struct could pass locally and still fail in CI, as just happened with
tutorial/reacting/reading-state.md and waitlist-notifier.md. Systematically
swept the whole corpus for every remaining alias to a struct/module defined
in a different snippet file and deferred all of them via BODY_SNIPPETS
(matching the established get-started/client-flow precedent), rather than
continuing to fix them one CI round-trip at a time. Verified locally across
multiple seeds with schedulers constrained to match CI (+S 4:4).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant