Repository navigation
Open
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)Package/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)queue/claimedQueue worker lifecycle stateQueue worker lifecycle statesource/humanFiled directly by a humanFiled directly by a humanstatus/in-progressQueue worker lifecycle stateQueue worker lifecycle statetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this itemuser/reviewNeeds a user-look: Muse reviews first and handles what it canNeeds a user-look: Muse reviews first and handles what it canwork/assignedQueue worker lifecycle stateQueue worker lifecycle state
Description
Parent: #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
MetricsSnapshotagainst sustained thresholds (rate vs ceiling,actor_queue_depth_maxgrowth, latency bands over 10-minute windows). Detection today would be a human readingid 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 inMetricsSnapshot. - 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
-
MetricsSnapshotcarries 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 statssurfaces 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.
Metadata
Metadata
Assignees
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)Package/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)queue/claimedQueue worker lifecycle stateQueue worker lifecycle statesource/humanFiled directly by a humanFiled directly by a humanstatus/in-progressQueue worker lifecycle stateQueue worker lifecycle statetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this itemuser/reviewNeeds a user-look: Muse reviews first and handles what it canNeeds a user-look: Muse reviews first and handles what it canwork/assignedQueue worker lifecycle stateQueue worker lifecycle state
Activity
developing-today commentedon Oct 29, 2026
CODE-1136
dezren39 commentedon Oct 29, 2026
Intake review — fleet monitor, 2026-10-29
dezren39 commentedon 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) usesfetch_max, andMetricsSnapshotnever resets it — so after any large burst it can neither show queue growth inside a window nor show recovery. The detector should sampleactor_queue_depthper 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 commentedon Nov 3, 2026
🤖 Agent note · done
Evidence (fresh, 2026-11-03):
pkgs/id/src/world/metrics.rsat main:WorldMetricsrecord methods arerecord_command,record_journal_append,record_checkpoint,add_frame_bytes,record_queue_depthonly.MetricsSnapshotcarries 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 inpkgs/id(code search finds write-locality/hotness only in the investigation/design docs).actor_queue_depth_max(lifetime high-water mark,fetch_max, never reset) — it samples theactor_queue_depthgauge 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-triageremoved,queue/queuedkept for task 8498.5 remaining items
developing-today commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
developing-today commentedon Nov 3, 2026
Agent note — implementation complete, PR prepared in the action outbox
queue/8498-2275-hot-world-signals(commit 0e9e83f, pushed): bounded write-locality table inWorldMetricssurfaced inMetricsSnapshot.write_locality(entity-addressed writes record theirentity_refat the journal record path), and the sustained hotness evaluator inworld/hotness.rs(queue-gauge trend, sustained latency p95 bands, window-average command rate; neveractor_queue_depth_max), retained-window evaluation in every snapshot soid world statssurfaceshotnesswith the band and firing signals.world::suite 220 passed; fullpkgs/idlib suite minus thecli::cluster 1876 passed / 2 failed, both failures pre-existing on a clean baseline (shell-contract drift, fixture hash drift), as are thecli::*stack-overflow aborts on this laptop.developing-today commentedon Nov 6, 2026
🤖 Agent note · escalated
developing-today commentedon 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 toqueue/queued+status/needs-triageand enqueue a fresh triage packet;user/reviewwas added by that note.