Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0f578e9
fix(durable): don't journal a step whose context ended partway
reka18 Nov 5, 2026
805561e
fix(durable): check RunService's context after absorbing the settle
reka18 Nov 11, 2026
1b501bd
ci: run nothing on a draft PR
reka18 Nov 11, 2026
3fb4e20
feat(state): report the errors of parent Fires an ActorSystem drove
reka18 Nov 12, 2026
76f8791
fix(durable): one rule for a step refused by an ended context
reka18 Nov 12, 2026
dd65245
fix(durable): Fire follows the cancel rule, and outcomes replay where…
reka18 Nov 12, 2026
654f650
fix(durable): replay actor refusals as live ran them
reka18 Nov 12, 2026
5b7fb16
fix(durable): journal which actors are running, so Recover spawns onl…
reka18 Nov 12, 2026
b4f95bd
fix(durable): record the actors that ended, so a failed spawn is retried
reka18 Nov 12, 2026
bc66ce0
fix(durable): judge an ended actor from its spawns, not step boundaries
reka18 Nov 12, 2026
655032d
fix(durable): the latest spawn attempt decides whether an actor ran
reka18 Nov 12, 2026
fe0ad12
fix(state): StartEffects includes a compound state's invokes
reka18 Nov 12, 2026
b8b1be8
fix(durable): journal a failed spawn's onError
reka18 Nov 12, 2026
e9a00b7
fix(durable): journal only an absorb's settles and failed-spawn onErrors
reka18 Nov 12, 2026
6dcc04e
style(durable): fix lint: shadowed errs and an unused helper
reka18 Nov 13, 2026
49fe9eb
fix(durable): address review: spawn messages, Start refusals, settled…
reka18 Nov 13, 2026
e77ff5b
fix(durable): spawn running actors before retried ones on Recover
reka18 Nov 13, 2026
fdd395c
fix(durable): keep respawn quiet to the actor's own start; Start fail…
reka18 Nov 14, 2026
5d0b5e6
fix(state): keep a respawn's nested start Fires quiet; mark quiet on …
reka18 Nov 14, 2026
7670727
fix(durable): arm the timers and services an actor-driven Fire enters
reka18 Nov 14, 2026
b4da79c
fix(state): don't escalate a respawn's nested start failure again
reka18 Nov 14, 2026
ba07ed0
fix(durable): track settled services, drop fired timers by id, replay…
reka18 Nov 14, 2026
7d110fe
fix(durable): keep a tail cancel of a checkpoint timer; record the jo…
reka18 Nov 15, 2026
1224eb2
fix(durable): restore a checkpoint's timers before replay; don't retr…
reka18 Nov 15, 2026
233fbb7
fix(durable): retry a failed spawn only when nothing caught it; leave…
reka18 Nov 16, 2026
3fd5b9b
fix(durable): don't retry a spawn whose zero-event onError applied; p…
reka18 Nov 16, 2026
e60701e
fix(durable): record a chained timer's deadline from the read the sch…
reka18 Nov 16, 2026
9a8c110
fix(state): escalate an invoked actor's failure when it declared no o…
reka18 Nov 16, 2026
c400913
fix(durable): take a chained timer's deadline from the scheduler
reka18 Nov 16, 2026
26985c3
fix: scope AbsorbRespawn's quiet, keep a declared onError in the IR, …
reka18 Nov 16, 2026
ee55ccb
fix(durable): don't rerun a compound state's settled invoke after Rec…
reka18 Nov 16, 2026
b97e07d
fix: a delivery whose context ended fails; Recover keeps a Handle onc…
reka18 Nov 16, 2026
2ff9f8b
fix: check Recover's context after the last Record; nil OnError for a…
reka18 Nov 16, 2026
71a52da
test(state): a restored actor doesn't respawn a nested actor that set…
reka18 Nov 16, 2026
60d2bdb
revert: keep state's v1 behavior; track compound starts and undeclare…
reka18 Nov 16, 2026
c9d083f
fix(state): export ErrNoTransition for durable's no-transition check
joshua-temple Nov 16, 2026
00c9058
perf(durable): key the actor-set cache on the configuration slice
joshua-temple Nov 16, 2026
7297597
fix(durable): keep a running actor whose respawn fails out of the uns…
joshua-temple Nov 16, 2026
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
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: CI

# A draft PR runs only the gate, which fails until the PR is marked ready, so work
# under review spends no CI time. Marking it ready (ready_for_review) runs the full
# CI, as does every later push to a ready PR.
# A draft PR runs no jobs: every job, the gate included, skips while the PR is a
# draft, so work under review spends no CI time. GitHub still records a run for each
# push, with every job skipped. Marking it ready (ready_for_review) runs the full CI,
# as does every later push to a ready PR.
#
# The cost: a skipped required check counts as passing, so the draft's skipped `gate`
# reads as passed until the ready run starts, when its pending `gate` blocks a merge.
# A PR merged in the seconds between marking it ready and that run starting would
# merge without CI. We accept that window to keep drafts free of runs and red checks.
on:
pull_request:
branches: [main]
Expand All @@ -24,8 +30,8 @@ env:

jobs:
# Detect whether anything other than docs changed. Docs-only PRs skip the Go
# lint/test/vuln/coverage/bench jobs entirely; the `gate` job below still runs
# and is the single required status check, so such PRs stay mergeable.
# lint/test/vuln/coverage/bench jobs entirely; on a ready PR the `gate` job below
# still runs and is the single required status check, so such PRs stay mergeable.
changes:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -597,19 +603,12 @@ jobs:
# docs) as a pass — so such PRs stay mergeable without running every matrix.
# `bench` is advisory and is deliberately excluded so a benchmark regression
# never blocks a merge.
# It skips on a draft, like every job here; the header says why, and what it costs.
gate:
if: always()
if: ${{ always() && !github.event.pull_request.draft }}
needs: [changes, lint, tests, sink, source, vuln, coverage, docs]
runs-on: ubuntu-latest
steps:
# On a draft every other job is skipped, and a skipped required check would
# count as passing for this commit. Fail instead, so a PR can't be marked ready
# and merged before its CI has run.
- name: Fail on a draft
if: ${{ github.event.pull_request.draft }}
run: |
echo "::error::Draft PR: CI runs when it's marked ready for review."
exit 1
- name: Fail if a required job did not pass
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: |
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ Run `mage -l` to list everything. Each target iterates the suite's modules.

Before you push, **tests, lint, vet, and `govulncheck` must all pass.** The
quickest way to verify locally is `mage check`. CI runs the same gates across a
OS matrix on every ready PR. A draft PR runs only the `gate` check, which fails until
the PR is marked ready for review; marking it ready runs the full CI.
OS matrix on every ready PR. A draft PR runs no jobs, the `gate` check included;
marking it ready for review runs the full CI.

Docs-only pull requests (changing only `*.md`, `docs/`, `LICENSE`, or `NOTICE`)
skip the Go matrix automatically and are gated solely by the aggregate `gate`
Expand Down
28 changes: 16 additions & 12 deletions docs/src/content/docs/durable/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ the first time, and replayed verbatim on recovery:
| Seam | Wire with | Recorded as |
| --- | --- | --- |
| **Clock** (timers) | `WithRunnerClock` | `JournalClockRead`, replayed so timers fire at the same recorded instants, wall-clock-independent; armed deadlines survive checkpoint compaction |
| **Invoked services** | `WithServiceRegistry` + `Handle.RunService` | `JournalServiceResult`; the service runs once, then recovery replays its result through the kernel's settle seam |
| **Child-machine actors** | `WithActorPalette` + `Handle.DeliverToActor` | `JournalActorMessage`; the behavior runs once, then recovery re-fires the recorded parent transition |
| **Invoked services** | `WithServiceRegistry` + `Handle.RunService` | `JournalServiceResult`; a recorded result replays through the kernel's settle seam without re-running the service, and an unrecorded one (a context canceled during the service or its settle, a crash, or a failed `Append` whose write didn't land) runs again when the host calls `RunService` |
| **Child-machine actors** | `WithActorPalette` + `Handle.DeliverToActor` | `JournalActorMessage`; recovery re-fires a recorded parent transition; a settled or stopped actor doesn't re-run; a running `InvokeActor` actor restarts from its initial state on any `Recover`, and a `Spawn` actor doesn't return |
| **Domain effects** | `WithEffectHandler` | dispatch set, applied exactly once via deterministic `EffectID` dedup |

Use `WithCheckpointEvery(n)` to tune how often a full snapshot is written: a
Expand Down Expand Up @@ -140,16 +140,20 @@ context not derived from the step's. A step waiting for the lock stops when its
ends. Read the instance with `View`, which
takes the lock; `Instance()` is outside it.

A step that may not have been recorded fails the Handle with `ErrHandleFailed`. So does an
effect handler that returns an error or panics. Before `Recover`, call `Handle.Drain`,
which waits until no step of the failed Handle is still recording and no effect is still
being sent, so the recovered Handle loads every recorded step and can't send an effect
twice. Give `Drain` a context of its own, not the failed call's, and don't `Recover`
until it returns nil: an error means it didn't finish draining. A step that was recording when another goroutine failed the Handle returns
`ErrHandleFailed` saying it was recorded; `Recover` sends any of its effects. To move a healthy Handle's instance to a new Handle, stop
calling the old one and let its calls return first: a step can start after `Drain`
returns. `Recover` a new Handle with the same options to continue, unless the cause is `ErrFenced`: then a newer owner holds the
instance, so stop.
A step that may not have been recorded fails the Handle with `ErrHandleFailed`. So does a
`Tick`, `RunService` or `DeliverToActor` whose context ended during the step, and any of
the four, `Fire` included, that drove a Fire refused because a context ended, the caller's
or one middleware derived from it. So does an effect handler
that returns an error or panics. Before `Recover`, call `Handle.Drain`, which waits until no
step of the failed Handle is still recording and no effect is still being sent, so the
recovered Handle loads every recorded step and can't send an effect twice. Give `Drain` a
context of its own, not the failed call's, and don't `Recover` until it returns nil: an
error means it didn't finish draining. A step that was recording when another goroutine
failed the Handle returns `ErrHandleFailed` saying it was recorded; `Recover` sends any of
its effects. To move a healthy Handle's instance to a new Handle, stop calling the old one
and let its calls return first: a step can start after `Drain` returns. `Recover` a new
Handle with the same options to continue, unless the cause is `ErrFenced`: then a newer
owner holds the instance, so stop.

## A note on serialized payloads

Expand Down
Loading
Loading