memory backend via burner-redis + integration tests
Wires `tangled.org/zzstoatzz.io/burner-redis` (zig 0.16 port of
PrefectHQ/burner-redis, in-process Redis-compatible engine) as
docket's second backend.
src/backend/memory.zig
- MemoryBackend owns a burner.Store + burner.scripting.LuaEngine.
- scheduleTask / promoteDueTasks / ackMessage EVAL the SAME three
Lua scripts the redis backend uses — single source of truth at
src/scripts/*.lua, ports cleanly across backends.
- ensureConsumerGroup + consumeStream skip Lua and call straight
into the store (matches the redis backend's xgroupCreate /
xreadgroup path, which also doesn't go through EVAL).
- read_arena holds the bytes of the most recent consumeStream
result; reset on each call so previous slices stop being valid,
matching the redis client's read-buffer behaviour.
src/backend.zig
- Backend union learns the .memory variant.
- connect() now resolves memory:// URLs to MemoryBackend instances.
tests/integration.zig
- drives Docket end-to-end against both backends through the
perpetual schedule → promote → consume → ack → reschedule cycle.
- memory backend tests run unconditionally (no external services).
- redis backend test gated on DOCKET_TEST_REDIS_URL so CI / local
runs can opt in.
- new `zig build test-integration` step.
Smoke test (manual):
DOCKET_URL=memory://docket-example ./zig-out/bin/perpetual
→ 4 perpetual ticks observed in 10s (50ms interval), clean exit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>