Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/formal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ jobs:
expect: pass
- cfg: DgenRegistryReplicationDegradedReachable
expect: fail
# The gather stops waiting once the old leader's DOWN has reached every
# live member. Every invariant holds there, and the canary proves the
# exit is taken.
- cfg: DgenRegistryReplicationLeaderGoneAssume
expect: pass
- cfg: DgenRegistryReplicationLeaderGoneReachable
expect: fail
# A held forwarded ack released by a later epoch's versions: the false
# `yes` the epoch fence closes.
- cfg: DgenRegistryReplicationNoEpochFence
expect: fail
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## v0.4.3 (TBD)
## v0.5.0 (2026-11-01)

### Bug fixes

Expand All @@ -12,13 +12,27 @@
probes; they run off its loop.
- `whereis_name/1` and `get_metadata/1` no longer briefly read a bound name as
`undefined` while a member re-baselines its replica (a resync or handoff).
- A leader that dies after a commit but before broadcasting it no longer stalls
the next leader's handoff for 2 seconds. The new leader proceeds as soon as
every member has seen the old leader go down.
- A follower could answer `yes` to a forwarded registration that a degraded handoff
had lost. It held the answer until its replica reached the commit version, but the
new leader's versions could get it there without that commit. A held `yes` now
counts only in the epoch that committed it, and is otherwise sent again.

### Enhancements

- `dgen_registery_member`'s internal implementation is refactored into
`dgen_registry_replica`, `dgen_registry_intents`, `dgen_registry_pipeline`,
and `dgen_registry_conflicts`.

### Breaking changes

- Some internal legacy behavior has been removed. It may affect systems during
a rolling upgrade from 0.4.x to 0.5.x.
- The handoff gather's peer reply changed shape. A 0.5.x leader skips a 0.4.x
member's replica, and the reverse, so don't run the two in one cluster.

## v0.4.2 (2026-10-04)

### Enahancements
Expand Down
39 changes: 39 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Writing comments and docs

These rules apply to code comments, `-moduledoc`/`-doc` strings, Elixir
`@moduledoc`/`@doc`, and the Markdown design docs.

- Write the way you'd explain the code to a colleague out loud.
- Use full sentences with a subject that does something: "We drop the reply",
not "Reply dropped".
- Don't use field or type names as English words ("an intent is a kind in a
phase"). When you name a field, variable or atom, put it in backticks and use
it as a name.
- No stacked possessives ("its forward's reference"). No parentheticals that
carry the main point. Don't use semicolons or colons to glue sentences
together; write two sentences.
- One idea per sentence. Say why when the why isn't obvious.
- Function comments start with a third-person verb: "Sends...", "Returns...".
- Avoid shorthand jargon ("CP:", "adjudicated", "owed", "surrendered") unless
it is a term this codebase defines. Use defined terms (for example "fenced",
§5.1 of the registry design doc) consistently.
- Don't be wordy. Don't comment what the code already says, and don't turn a
short, accurate comment into a paragraph.
- Keep `§N.N` references to `docs/design/dgen_registry_design.md` accurate, and
don't renumber its sections.
- Keep the "LLM-generated" disclaimer on files that carry it.

Example. Before:

```erlang
%% Drop timed-out register/set_meta intents so a long leaderless window cannot grow
%% the map. Unregisters are kept: their effect is owed whether or not anyone waits.
```

After:

```erlang
%% Drops timed-out registers and set_metas so the map can't grow during a long
%% stretch without a leader. Unregisters are kept, because the name must still be
%% removed even when nobody is waiting.
```
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ end
configuration.
- [formal/README.md](formal/README.md) — the TLA+ model of `dgen_registry`'s
replication protocol.
- [test/support/sim/README.md](test/support/sim/README.md) — deterministic
simulation testing of `dgen_registry` against the same invariants, driven by
- [test/support/sim/dgen_registry_simulation.md](test/support/sim/dgen_registry_simulation.md)
— deterministic simulation testing of `dgen_registry` against the same invariants, driven by
[`eta`](https://hexdocs.pm/eta).
- API reference and getting-started guides: <https://hexdocs.pm/dgen>.
- [CHANGELOG.md](CHANGELOG.md) — release notes.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2
0.5.0
93 changes: 93 additions & 0 deletions docs/design/assets/registry_flows/direct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading