GeezerVison is showing github.com — id: implement: hot-world signals — write-locality metrics + sustained-threshold detector · Issue #2275 · developing-today/code
id: implement: hot-world signals — write-locality metrics + sustained-threshold detector #2275DescriptionParent: #2059 (hot-world sharding investigation, ID epic #2056). Filed from the #2059 investigation (doc: ~/workspace/id-program-2026-10-28/investigations/hot-world-sharding.md, §2/§5).
Problem
The hot-world sharding triggers in #2059 need two things pkgs/id does not have yet:
- Write-locality data.
WorldMetrics (pkgs/id/src/world/metrics.rs) records command/journal latency, queue depth, and sessions, but no per-topic/per-region write split — so the rung-1 (topic partition) vs rung-2 (region shard) vs rung-3 (native spill) decision cannot be made from evidence: all three triggers depend on whether writes concentrate in one topic/region.
- A signal consumer. Nothing evaluates
MetricsSnapshot against sustained thresholds (rate vs ceiling, actor_queue_depth_max growth, latency bands over 10-minute windows). Detection today would be a human reading id world stats.
Scope
- Add a bounded write-locality counter to
WorldMetrics (per-topic or per-region write counts, fixed-size / top-K so recording never allocates on hot paths, matching the existing metrics design), surfaced in MetricsSnapshot.
- Add a threshold evaluation over snapshots (sustained-window, spike-resistant) that reports a world's hotness band (healthy / warning / critical) plus which signal fired, consumable from
id world stats.
Acceptance criteria
-
MetricsSnapshot carries write-locality counts with no allocation/locking on the record path (same discipline as existing fields).
- Hotness-band evaluation exists with tests covering: sustained critical, spike-does-not-trigger, and queue-growth detection.
-
id world stats surfaces the band and the firing signal.
- No change to world semantics, journal format, or the serial actor model.
Program: ID wave-1 follow-on from #2059; the design/synthesis consumer is #2046 (serverless edition v1), which stays gated on its named inputs. Activitydeveloping-today commented on Oct 29, 2026 dezren39 commented on Oct 29, 2026 Intake review — fleet monitor, 2026-10-29
- Related: parent id: investigate: hot-world sharding — when one world outgrows one Durable Object #2059 (hot-world sharding investigation), epic epic: ID platform expansion — apps, comms, currency, hosting, boards (2026-10-28 directive, LIST 6–15) #2056; investigation doc §2/§5 linked in the body.
- Still live: filed today from the id: investigate: hot-world sharding — when one world outgrows one Durable Object #2059 investigation; no metrics/detector implementation exists yet.
- Notes: body already carries acceptance criteria; none appended.
- Risks: threshold tuning is the open-ended part — a detector that fires constantly is worse than none. Prefer shipping the metrics first with the detector behind a conservative sustained-threshold default.
- Suggested approach: write-locality metrics first (observable, no behaviour change), detector second with thresholds from the id: investigate: hot-world sharding — when one world outgrows one Durable Object #2059 doc's numbers.
- Labels normalized: kind/enhancement, source/human, priority/normal, effort/m, status/needs-triage, meta/enriched.
dezren39 commented on Oct 30, 2026 Refinement from the #2059 investigation doc review (PR #2820, Codex finding, verified against the code): the hotness detector in this issue must not trigger on actor_queue_depth_max. That metric is a lifetime high-water mark — WorldMetrics::record_queue_depth (pkgs/id/src/world/metrics.rs) uses fetch_max, and MetricsSnapshot never resets it — so after any large burst it can neither show queue growth inside a window nor show recovery. The detector should sample actor_queue_depth per snapshot (trend across 3+ snapshots, per the investigation §2 bands) and/or compute a windowed maximum itself. The landed doc (doc/2026-10-30T19-35-00Z_investigation_hot_world_sharding/, §2 caveat) states this; carrying it here so the implementation spec doesn't have to rediscover it. dezren39 commented on Nov 3, 2026 🤖 Agent note · done
Evidence (fresh, 2026-11-03):
pkgs/id/src/world/metrics.rs at main: WorldMetrics record methods are record_command, record_journal_append, record_checkpoint, add_frame_bytes, record_queue_depth only. MetricsSnapshot carries latency histograms, totals, frame_bytes_total, actor_queue_depth, actor_queue_depth_max, sessions — no write-locality counts, and no hotness-band evaluation exists anywhere in pkgs/id (code search finds write-locality/hotness only in the investigation/design docs).
- PR search for id: implement: hot-world signals — write-locality metrics + sustained-threshold detector #2275: only PR doc: investigation — hot-world sharding (#2059) #2820 (the merged id: investigate: hot-world sharding — when one world outgrows one Durable Object #2059 investigation doc). No implementation PR or branch exists; nobody owns this work.
- The 2026-10-30 refinement on this issue (comment 6532029493) is carried into the follow-up packet verbatim: the detector must not trigger on
actor_queue_depth_max (lifetime high-water mark, fetch_max, never reset) — it samples the actor_queue_depth gauge trend across 3+ snapshots and/or computes a windowed maximum.
Routing: implementation enqueued as task 8498 (small_fix, priority 30) with the issue's four acceptance criteria as its acceptance list, including the gauge-trend constraint and the sustained-critical / spike-does-not-trigger / queue-growth tests. Issue #2275 stays open; status/needs-triage removed, queue/queued kept for task 8498.
developing-today commented on Nov 6, 2026 Correction to the fleet monitor escalation note above (its label names were stripped by a shell substitution error when posting): the stale labels on this issue are queue/claimed + work/assigned; the requeue path, if the reviewer finds the work is not done, is to swap them to queue/queued + status/needs-triage and enqueue a fresh triage packet; user/review was added by that note. developing-today commented on Nov 7, 2026
Picked up by repo-worker-code-d — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-d posts progress markers; after 30 minutes of silence any other worker may pick this up.) developing-today commented on Nov 7, 2026
Progress from repo-worker-code-d: reviewing user/review escalation: implementation reportedly completed 2026-11-03 on branch queue/8498-2275-hot-world-signals (0e9e83f) but PR never left the outbox. Next: verify branch vs main, revalidate, land or close with evidence. developing-today commented on Nov 7, 2026
Progress from repo-worker-code-d: branch verified intact (0e9e83f), merge-tree clean vs current main, not in main. Next: merge main locally, run metrics/hotness tests, open rescue PR. developing-today commented on Nov 7, 2026
Progress from repo-worker-code-d: tests pass on merged tree (hotness 6/6, metrics 3/3). Next: PR open, Codex gate, merge. developing-today commented on Nov 7, 2026
Released by repo-worker-code-d (outcome: done). DONE (user/review escalation resolved): the 2026-11-03 implementation by lane code-i (task 8498) was complete but its PR never left the outbox. Verified intact on branch queue/8498-2275-hot-world-signals (0e9e83f), merged current main cleanly, re-ran tests on the merged tree (hotness 6/6, world::metrics 3/3, cargo check --no-default-features OK), and landed it as PR #6832. Issue closed by the merge. Credit: implementation lane code-i; landing/review lane code-d.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|