universesoul.demarkus.io:6309/demarkus-library/journal/2026-12-03.md draft reader meta· reload
demarkus-library journal: 2026-12-03
Pulse convergence across replicas (#129)
- Cause confirmed against the user's sighting:
- Theme writes reached one pod only; the other had no lendable bearer for the hub world, so it had no watch.
- The servicing writes were lost on the other pod by a cursorless MCP reopen; the resync never reaches the pulse.
- Decision: ADR 0013, plan: pulse-convergence.
- demarkus
feat/watch-backlog, uncommitted:- event
at; backlogon a cursorless WATCH;- an MCP
status: okacknowledgement for backlog requests; - SPEC §6.8 and §6.8.1.
- Gate green after lint fixes:
WatchEvent.Block,EventOf,Feed.consumeand the gateway'snoticenow take pointers, sinceAtpushed them past gocritic's size limit.
- event
- Library
fix/pulse-backfill, uncommitted:Change.At;Pulse.Atis the write time, and a newPulse.Heardis the live graph's cursor.- The log orders by
At, then world, then path. Feeds ask for a backlog of 64. - Gate green against a scratch
go.work; helm 46/46; the browser live-graph test passes.
- Next: release demarkus (client and protocol), bump the library's go.mod, then check on GKE with 2 replicas: edit, reload across pods, restart one pod.
- Open: an archive's
atis the last write time, because the bucket slot has no commit time.
Archive time (pre-release)
- The end-to-end check showed archives dated by the document's last write. The user asked for a fix before the release.
- Fixed upstream, on the same demarkus branch:
- file store: archive events get their commit time;
- bucket store: an optional slot
at, gated bystampArchiveTime, read by every replica, written only when the flag is on. The user picked this rollout so mixed-version replicas never see a slot they refuse.
- Recorded as an amendment to ADR 0013.
- Gotcha: the knowledge config parses through
rawConfig, so a new top-level key needs a field there as well as onConfig. The parse test caught it. - Archive-time mutations all caught: event parse, the stamping gate, write-entry validation, the file store stamp, hooks wiring.
Pulse fix: demarkus released, library bumped
- demarkus #774 merged as
0e6c7c54; tagged client/v0.83.0, protocol/v0.40.0, server/v0.94.0, knowledge/v0.98.0. - Library
fix/pulse-backfill: go.mod bumped to client v0.83.0 + protocol v0.40.0; gate passes with GOWORK off; helm 46/46. - Two-replica smoke (server built from the released tag, library from the bump): A == B at every step; archive dated by its own time; 0 resyncs.
- Next: library PR review; deploy knowledge first (no archiving during rollout, no rollback past this release), then library.
Pulse fix: /simplify pass on the library
- Applied:
newerFirstfolded intocmp.Or;visiblepreallocates;graphWriteback to a value param (Pulse is 144 B, under hugeParam's 256; only rangeValCopy at 128 forces index loops); comments trimmed; pulse tests usenewTestService. Gate green, helm 46/46; mutation (drop the world tiebreak) still caught. - Kept
Heard: it is the only pod-local cursor finer than At's whole seconds. Replacing it with an<At>/<world>/<path>cursor is a redesign, not cleanup. - Kept the unstamped-time fallback in the service (
cmp.Or(At, Heard)): only the pulse reads At, and moving it to the feed needs a test clock. - Open for review: after a pod restart, backlog replays get Heard=now, so a graph overlay reconnecting with an older Last-Event-ID flashes up to 12 old writes. It is cosmetic and new with the backfill; before it, a restarted pod's list was empty.
Pulse fix: library #130 merged
- Merged to main:
fix(service): converge across replicas(d42912f) +fix(service): distinct heard cursors(09f69d1): pulseLog stamps Heard strictly increasing per pod (≥1µs apart) so a backlog burst never shares a graph cursor. - Review trade-offs kept, by design: a write older (by world time) than the 12 listed is trimmed and the graph never animates it (clock skew or gap replay; fresh drawing reconciles); the 64-path backlog bounds convergence only if a world's newest 64 changed paths are nearly all generated graph files.
- Remaining: deploy knowledge (server v0.94.0 / knowledge v0.98.0; no archiving during rollout, no rollback past it), then the library; verify on GKE that replicas show the same pulse.
Pulse fix: live on GKE (knowledge 0.98.0, library 0.55.1)
- Deploy repo: one PR bumped both at once (user's call, to see what happens). Argo rolled both ~00:12Z; all Synced/Healthy; no restarts; one normal startup-probe miss on a knowledge pod.
- Rolling both at once was harmless: in broker mode a library pod opens no world watch until a reader signs in on it (
watch: listing worlds … no signed-in reader), so none subscribed to a 0.97.1 knowledge pod. Watches opened at 00:13:46 on the pod the reader landed on, all four worlds,resumed:false, no errors. - The other library pod has no watch until a reader reaches it. When one does, that is the restart-refill case: the backlog should fill its pulse to match.
- Checks passed: /health on both pods and publicly (library.knowledge.demarkus.io); knowledge lookup across 4 worlds, fetch, versions chain-valid, presence, worlds.