GLM-5.3 · Serving

S03 · TTFT

Valid

Online TTFT 1dev · Implementation Optimization

1.20×PERFORMANCE RATIO
125TOOL EVENTS
1TEXT PATCHES
0BINARY NAMES

01 / PROCESS MAP

Tool activity

Each row shows one agent’s tool events in its own recorded order. Colors show broad activities; bar widths do not represent duration.

Main agentGLM-5.3 · 125 visible calls

InspectEditValidateExecuteBuildProfileRollbackOther
72Inspect
9Edit
3Validate
23Execute
5Profile
13Other

02 / EVENT SEQUENCE

Event timeline

Requests are grouped by agent, activity and topic. Delegations open into child branches. Summaries describe visible requests; tool errors and missing responses are flagged. A recorded response does not establish command success or a performance improvement.

Show event timelineHide event timeline92 groups · 125 calls

Scroll within this panel to view all events. Command sketches retain familiar programs and options. Values become <val> or <n>; paths, addresses and script bodies are hidden as <path>, <url> and <script>.

Main agent

  1. Inspect · Task requirements

    Requested workspace inspection and file and log inspection related to task requirements.

    1 call · #0001–#0001

    ls -l -a <path> <n> > <path>echo <flag>find <path> -maxdepth <n> -name <val> -path <val> <n> > <path>head -n <n>
  2. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    2 calls · #0002–#0003

    ls <path>ls -l -a <path>
  3. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    2 calls · #0004–#0005

    Read <path>
  4. Inspect · Runtime processes

    Requested workspace inspection and file and log inspection related to runtime processes.

    1 call · #0006–#0006

    cd <path>find <path> -type <val>sortecho <path>cat <path>
  5. Validate · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0007–#0007

    cd <path><command> <args>cat <val>
  6. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0008–#0008

    cd <path>cat <path>echo <path>
  7. Inspect · Source & workspace

    Requested file and log inspection and source searches related to source & workspace.

    5 calls · #0009–#0013

    Read <path>cd <path>grep -n <val> -A <n> <path>head -n <n>sed -n <val> <path>
  8. Other · Dependencies & build setup

    Requested script or workload execution and source searches related to dependencies & build setup.

    1 call · #0014–#0014

    which <val> <val>python3 -c <script>echo <flag>python3 -m <module> <val> <n> > <path>grep -i -E <val>
  9. Inspect · Device memory

    Requested workspace inspection, runtime inspection and file and log inspection related to device memory.

    1 call · #0015–#0015

    ls <path> <n> > <path>npu-smi info <n> >& <path>head -n <n>
  10. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0016–#0016

    cd <path>echo <val>cat <path>echo
  11. Validate · Task requirements

    Requested file and log inspection and script or workload execution related to task requirements.

    1 call · #0017–#0017

    date -uecho <flag>cd <path>head -c <n> <path>echoecho <val>
    1 more command sketches
    python3 -c <script>
  12. Inspect · Source & workspace

    Requested environment setup or inspection, source searches and workspace inspection related to source & workspace.

    3 calls · #0018–#0020

    envgrep -E <val>sortecho <path>ls -l -a <path> <path> <path> <n> >& <path>head -n <n>
    7 more command sketches
    timeout <n> <val> <path> <n> >& <path>tail -n <n>echo <val>ls <path>env <vars> timeout <n> <val> <path> > <path> <n> >& <path>python3 -c <script>head -c <n> <path>
  13. Execute · Benchmark & validation setup

    Requested workspace file updates and environment setup or inspection related to benchmark & validation setup.

    1 call · #0021–#0021

    rm -rf <path>mkdir -p <path>env <vars> nohup <val> <path> > <path> <n> >& <path>echo <val>
  14. Inspect · Source & workspace

    Requested workspace inspection and file and log inspection related to source & workspace.

    1 call · #0022–#0022

    cd <path>lsecho <val>ls <val>head -n <n>find <path> -iname <val> -o -iname <val>
  15. Execute · Benchmark & validation setup

    Requested runtime inspection, source searches and file and log inspection related to benchmark & validation setup.

    1 call · #0023–#0023

    ps <val>grep -E <val>grep -v <val>head -n <n>echo <flag>ls -l -a <path> <n> > <path>
    2 more command sketches
    cat <path> <n> > <path>tail -n <n>
  16. Inspect · Attention kernels

    Requested file and log inspection and source searches related to attention kernels.

    1 call · #0024–#0024

    wc -l <path> <path> <path> <path> <path>grep -n <val> <path>
  17. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0025–#0025

    sed -n <val> <path>
  18. Inspect · Source & workspace

    Requested execution waits, file and log inspection and source searches related to source & workspace.

    2 calls · #0026–#0027

    sleep <n>tail -n <n> <path>grep -r -n <val> --include <path> <path>head -n <n>
  19. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0028–#0028

    sed -n <val> <path>
  20. Inspect · Attention kernels

    Requested source searches and file and log inspection related to attention kernels.

    3 calls · #0029–#0031

    grep -n <val> <path>head -n <n>echo <flag>grep -r -n <val> <path> <path> <n> > <path>headsed -n <val> <path>
  21. Execute · Benchmark & validation setup

    Requested workspace inspection and file and log inspection related to benchmark & validation setup.

    1 call · #0032–#0032

    ls -l -a <path>echo <flag>tail -n <n> <path>cut <flag>ls <path> <n> > <path>
  22. Profile · Dependencies & build setup

    Requested script or workload execution, file and log inspection and dependency and build commands related to dependencies & build setup.

    1 call · #0033–#0033

    which <val> <val> <n> > <path>python3 -c <script> <n> >& <path>head -n <n>pip list <n> > <path>grep -i -E <val>echo <flag>
    1 more command sketches
    grep -n <val> <path>
  23. Execute · Benchmark & validation setup

    Requested execution waits, workspace inspection and file and log inspection related to benchmark & validation setup.

    1 call · #0034–#0034

    sleep <n>ls -l -a <path>head -n <n>tail -n <n> <path>cut <flag>
  24. Execute · Batching & scheduling

    Requested workspace file updates, file and log inspection and workspace inspection related to batching & scheduling.

    1 call · #0035–#0035

    mkdir -p <path>cat > <path> <script>chmod <val> <path>echo <val>ls <path> <n> > <path>head
  25. Execute · Benchmark & validation setup

    Requested execution waits, workspace inspection and file and log inspection related to benchmark & validation setup.

    1 call · #0036–#0036

    sleep <n>ls <path>echo <flag>cat <path> <n> > <path>
  26. Other · Latency & request handling

    Requested script or workload execution related to latency & request handling.

    1 call · #0037–#0037

    python3 -c <script>
  27. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    1 call · #0038–#0038

    grep -E <val> <path>tail -n <n>
  28. Execute · Benchmark & validation setup

    Requested workspace inspection, file and log inspection and script or workload execution related to benchmark & validation setup.

    1 call · #0039–#0039

    ls <path>sed <path>echo <flag>cat <path>python3 -c <script>
  29. Other · Latency & request handling

    Requested script or workload execution related to latency & request handling.

    1 call · #0040–#0040

    python3 -c <script>
  30. Inspect · Source & workspace

    Requested workspace inspection, source searches and file and log inspection related to source & workspace.

    2 calls · #0041–#0042

    ls <path>grep -r -n <val> <path>headsed -n <val> <path>echo <val>grep -n <val>
    1 more command sketches
    head -n <n>
  31. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0043–#0043

    sed -n <val> <path>
  32. Execute · Benchmark & validation setup

    Requested workspace inspection, file and log inspection and script or workload execution related to benchmark & validation setup.

    2 calls · #0044–#0045

    ls <path> <n> > <path>cat <path>python3 -c <script>tail -n <n>sleep <n>
  33. Execute · Latency & request handling

    Requested execution waits, workspace inspection and script or workload execution related to latency & request handling.

    1 call · #0046–#0046

    sleep <n>ls <path> <n> > <path>python3 -c <script>ps <val>grep <val>grep -v <val>
    1 more command sketches
    wc -l
  34. Execute · Runtime processes

    Requested execution waits, runtime inspection and source searches related to runtime processes.

    2 calls · #0047–#0048

    cd <path><command> <args>sleep <n>ps <val>grep -c <val>echo <val>
    4 more command sketches
    grep -q <val>ps <flag> <args>grep -E <val>head -n <n>
  35. Profile · Batching & scheduling

    Requested execution waits and file and log inspection related to batching & scheduling.

    1 call · #0049–#0049

    cd <path><command> <args>sleep <n>tail -n <n>echo <val>
  36. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0050–#0050

    cd <path>python3 - <script>
  37. Inspect · Runtime processes

    Requested source searches and file and log inspection related to runtime processes.

    1 call · #0051–#0051

    grep -r -n <val> <path>head -n <n>grep -n <val> <path>grep -i <val>head
  38. Inspect · Source & workspace

    Requested source searches and file and log inspection related to source & workspace.

    1 call · #0052–#0052

    grep -n <val> -A <n> <path>head -n <n>
  39. Profile · Batching & scheduling

    Requested workspace file updates, service requests and execution waits related to batching & scheduling.

    1 call · #0053–#0053

    mkdir -p <path>cd <path>curl -s -m <n> -X <val> <url> -H <path> -d <path>echosleep <n>python3 - <script>
    2 more command sketches
    curl -s -m <n> -X <val> <url> <val>ls -l -a <path>
  40. Inspect · Source & workspace

    Requested workspace inspection and file and log inspection related to source & workspace.

    2 calls · #0054–#0055

    find <path> -type <val>head -n <n>du <flag> <args>cd <path>head -n <n> <val>echo <val>
    1 more command sketches
    ls
  41. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    2 calls · #0056–#0057

    cd <path>python3 - <script>
  42. Other · Task requirements

    Requested script or workload execution related to task requirements.

    1 call · #0058–#0058

    cd <path>python3 - <script>
  43. Profile · Batching & scheduling

    Requested execution waits, file and log inspection and script or workload execution related to batching & scheduling.

    1 call · #0059–#0059

    cd <path><command> <args>sleep <n>tail -n <n>waitpython3 - <script>
  44. Inspect · Batching & scheduling

    1 tool error

    Requested file and log inspection related to batching & scheduling.

    3 calls · #0060–#0062

    sed -n <val> <path>echo <val>cd <path>
  45. Other · Rollout generation

    Requested script or workload execution related to rollout generation.

    1 call · #0063–#0063

    cd <path>python3 - <script>
  46. Inspect · Batching & scheduling

    Requested file and log inspection, source searches and script or workload execution related to batching & scheduling.

    2 calls · #0064–#0065

    cd <path>awk <val> <path>grep -E <val>sed -n <val>python3 - <script>
  47. Inspect · Runtime processes

    Requested file and log inspection, source searches and script or workload execution related to runtime processes.

    1 call · #0066–#0066

    <command> <args>cat <path>grep -c <val>python3 -c <script>
  48. Inspect · Source & workspace

    1 tool error

    Requested runtime inspection and file and log inspection related to source & workspace.

    2 calls · #0067–#0068

    ps <flag> <args>head -n <n>echo <val>cat <path> <n> > <path>cat <path>
  49. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0069–#0069

    cd <path>sed -n <val> <path>echo <val>
  50. Other · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0070–#0070

    awk <val> <path>
  51. Inspect · Attention kernels

    Requested source searches and file and log inspection related to attention kernels.

    1 call · #0071–#0071

    grep -r -n <val> -A <n> <path>grep -r -n <val> -A <n> <path> <path> <n> > <path>head -n <n>echo <val>cat <path> <n> > <path>
  52. Inspect · Device memory

    Requested source searches, file and log inspection and workspace inspection related to device memory.

    2 calls · #0072–#0073

    grep -r -n <val> -A <n> --include <path> <path>head -n <n>echo <val>find <path> -name <path>headcat <path>
    1 more command sketches
    grep -r -n <val> --include <path> <path>
  53. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0074–#0074

    sed -n <val> <path>echo <val>
  54. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0075–#0075

    cd <path>python3 - <script>
  55. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0076–#0076

    cd <path>sed -n <val> <path>
  56. Inspect · Attention kernels

    Requested file and log inspection and source searches related to attention kernels.

    2 calls · #0077–#0078

    sed -n <val> <path>grep -n <val> <path> <path> <path> <path> <path> <path> <path> <path> <path> <args>head -n <n>
  57. Profile · Parallelism & communication

    Requested script or workload execution related to parallelism & communication.

    1 call · #0079–#0079

    cd <path>python3 - <script>
  58. Inspect · Batching & scheduling

    Requested file and log inspection and source searches related to batching & scheduling.

    2 calls · #0080–#0081

    sed -n <val> <path>grep -n <val> -A <n> <path> <path> <path>head -n <n>cd <path>echo <val>grep -r -n <val> <path> <path> <path>
    1 more command sketches
    head
  59. Inspect · Runtime processes

    Requested source searches and file and log inspection related to runtime processes.

    1 call · #0082–#0082

    grep -r -n <val> --include <path> <path>grep -v <path>headecho <val>sed -n <val> <path>grep -r -n <val> <path> <path>
  60. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    1 call · #0083–#0083

    grep -r -n <val> --include <path> <path>headecho <val>grep -r -n <val> -A <n> <path> <path> <n> > <path>head -n <n>
  61. Inspect · Runtime processes

    Requested file and log inspection and source searches related to runtime processes.

    1 call · #0084–#0084

    sed -n <val> <path>echo <val>grep -r -n <val> -A <n> <path> <path> <n> > <path>head -n <n>
  62. Other · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0085–#0085

    awk <val> <path>
  63. Other · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0086–#0086

    awk <val> <path>
  64. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0087–#0088

    wc -l <path>head -n <n> <path>sed -n <val> <path>
  65. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    1 call · #0089–#0089

    grep -r -n <val> -A <n> <path>head -n <n>grep -n <val> <path>
  66. Edit · Batching & scheduling

    Requested code edits related to batching & scheduling.

    1 call · #0090–#0090

    Write <path>
  67. Inspect · Batching & scheduling

    Requested file and log inspection and source searches related to batching & scheduling.

    1 call · #0091–#0091

    awk <val> <path>echo <val>grep -n <val> <path>head -n <n>
  68. Edit · Batching & scheduling

    Requested code edits related to batching & scheduling.

    3 calls · #0092–#0094

    Edit <path>
  69. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    1 call · #0095–#0095

    grep -n <val> -A <n> <path>head -n <n>
  70. Edit · Batching & scheduling

    Requested code edits related to batching & scheduling.

    2 calls · #0096–#0097

    Edit <path>
  71. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0098–#0098

    sed -n <val> <path>
  72. Execute · Batching & scheduling

    1 tool error

    Requested process termination, execution waits and script or workload execution related to batching & scheduling.

    2 calls · #0099–#0100

    pkill -f <val>sleep <n>python3 -c <script>cd <path>rm -f <val><command> <args>
    3 more command sketches
    echo <val>ps <val>grep -c <val>
  73. Execute · Runtime processes

    Requested runtime inspection, source searches and file and log inspection related to runtime processes.

    1 call · #0101–#0101

    ps <val>grep <val>awk <val>xargs -r <val> <flag>sleep <n>grep -c <val>
    3 more command sketches
    cd <path>rm -f <val><command> <args>
  74. Execute · Batching & scheduling

    Requested source searches, execution waits and runtime inspection related to batching & scheduling.

    1 call · #0102–#0102

    <command> <args>grep -q <val>sleep <n>ps <flag> <args>grep <val>
  75. Other · Rollout generation

    Requested script or workload execution related to rollout generation.

    1 call · #0103–#0103

    cd <path>python3 - <script>
  76. Execute · Latency & request handling

    1 tool error

    Requested execution waits, environment setup or inspection and script or workload execution related to latency & request handling.

    1 call · #0104–#0104

    cd <path><command> <args>sleep <n>env <vars> bash <script> > <path> <n> >& <path>python3 -c <script>echo <path>
  77. Inspect · Source & workspace

    Requested source searches and file and log inspection related to source & workspace.

    3 calls · #0105–#0107

    cd <path>grep -r -n <val> -A <n> <path>head -n <n>grep -r -n <val> --include <path> <path>grep -r -n <val> -A <n> --include <path> <path>
  78. Execute · Benchmark & validation setup

    Requested runtime inspection, source searches and file and log inspection related to benchmark & validation setup.

    2 calls · #0108–#0109

    ps <val>grep <val>awk <val>xargs -r <val> <flag>sleep <n>rm -rf <path>
    7 more command sketches
    mkdir -p <path>cd <path><command> <args>echo <val>grep -c <val>ls <path> <n> > <path>tail -n <n> <path> <n> > <path>
  79. Inspect · Source & workspace

    Requested repository inspection related to source & workspace.

    2 calls · #0110–#0111

    cd <path>git status --shortgit diff --statgit diff
  80. Edit · Device memory

    Requested code edits related to device memory.

    2 calls · #0112–#0113

    Write <path>
  81. Inspect · Device memory

    1 tool error

    Requested environment setup or inspection, workspace inspection and file and log inspection related to device memory.

    1 call · #0114–#0114

    env <vars>ls -l -a <val>cat <path> <n> > <path>
  82. Edit · Device memory

    Requested code edits related to device memory.

    1 call · #0115–#0115

    Write <path>
  83. Execute · Benchmark & validation setup

    Requested workspace inspection and file and log inspection related to benchmark & validation setup.

    1 call · #0116–#0116

    ls <path> <n> > <path>sed <path>tail -n <n> <path>cut <flag>
  84. Execute · Batching & scheduling

    Requested execution waits, workspace inspection and file and log inspection related to batching & scheduling.

    1 call · #0117–#0117

    sleep <n>ls <path> <n> > <path>sed <path>grep <flag> <args>
  85. Inspect · Latency & request handling

    Requested execution waits, workspace inspection and file and log inspection related to latency & request handling.

    1 call · #0118–#0118

    sleep <n>ls <path> <n> > <path>sed <path><command> <args>python3 -c <script>
  86. Execute · Latency & request handling

    Requested execution waits, script or workload execution and workspace inspection related to latency & request handling.

    1 call · #0119–#0119

    sleep <n><command> <args>python3 -c <script>ls <path> <n> > <path>
  87. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0120–#0120

    python3 -c <script>
  88. Inspect · Runtime processes

    Requested script or workload execution, file and log inspection and runtime inspection related to runtime processes.

    1 call · #0121–#0121

    bash <script> <n> >& <path>tail -n <n>echo <val>ps <val>grep -c <val>ls <path> <n> > <path>
  89. Execute · Benchmark & validation setup

    Requested workspace file updates, workspace inspection and file and log inspection related to benchmark & validation setup.

    1 call · #0122–#0122

    rm -rf <path> <path> <path> <path> <path> <path> <path> <n> > <path>ls <path>head -n <n>echo <val>ls <path> <n> > <path>head
    1 more command sketches
    git status --short
  90. Inspect · Source & workspace

    Requested workspace file updates and workspace inspection related to source & workspace.

    1 call · #0123–#0123

    <command> <args>echo <flag>rm -f <path>ls <path>
  91. Inspect · Runtime processes

    Requested runtime inspection, source searches and file and log inspection related to runtime processes.

    1 call · #0124–#0124

    ps <flag> <args>grep -i -E <val>headecho <val><command> <args>grep -E <val>
    3 more command sketches
    git status --shortechogit diff --stat
  92. Inspect · Batching & scheduling

    Requested script or workload execution and file and log inspection related to batching & scheduling.

    1 call · #0125–#0125

    timeout <n> <val> -c <path> <n> >& <path>tail -n <n>

03 / CANDIDATE ARTIFACT

Text patches & binary names

Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.

sglang · 2 changed files

Base commit: 340db9201005fc64635bb25db1d2538f955761c3

diff --git a/python/sglang/srt/managers/scheduler.py b/python/sglang/srt/managers/scheduler.pyindex a9615a14c512345b2d63323ff3ebd2fe3d9a0dca..7d5e8b0b3708d1a883306c73860575c779b3b510 100644--- a/python/sglang/srt/managers/scheduler.py+++ b/python/sglang/srt/managers/scheduler.py@@ -202,6 +202,7 @@ from sglang.srt.managers.scheduler_components.batch_result_processor import ( ) from sglang.srt.managers.scheduler_components.dp_attn import SchedulerDPAttnAdapter from sglang.srt.managers.scheduler_components.flush_wrapper import SchedulerFlushWrapper+from sglang.srt.managers.scheduler_components.idle_housekeeper import IdleHousekeeper from sglang.srt.managers.scheduler_components.idle_sleeper import (     IdleSleeper,     RustServerIdleSleeper,@@ -473,6 +474,7 @@ class Scheduler(         # Init inter-process communication         self.init_ipc_channels(port_args)         self.init_idle_sleeper()+        self.init_idle_housekeeper()          # Init ZBAL, switch allocator should before any torch alloc action         self.init_zbal_on_npu()@@ -757,6 +759,9 @@ class Scheduler(         except Exception as e:             logger.warning("load snapshot writer init failed: %s", e) +    def init_idle_housekeeper(self) -> None:+        self.idle_housekeeper = IdleHousekeeper()+     def init_idle_sleeper(self) -> None:         if (             self.ps.pp_rank == 0@@ -3928,6 +3933,15 @@ class Scheduler(         self.maybe_send_health_check_signal()          if not self.is_fully_idle():+            # Busy again: re-arm so the next idle transition does a full pass.+            self.idle_housekeeper.notify_busy()+            return++        # This runs in a hot spin loop, so only the first pass of an idle+        # stretch (plus a rate-limited refresh) pays for the checks below.+        if not self.idle_housekeeper.should_run_housekeeping():+            self.new_token_ratio_tracker.reset()+            self.maybe_sleep_on_idle()             return          if self.enable_unified_memory:diff --git a/python/sglang/srt/managers/scheduler_components/idle_housekeeper.py b/python/sglang/srt/managers/scheduler_components/idle_housekeeper.pynew file mode 100644index 0000000000000000000000000000000000000000..ff2bc8c8d41aae0b6ea77e28ce3a26d62d80458e--- /dev/null+++ b/python/sglang/srt/managers/scheduler_components/idle_housekeeper.py@@ -0,0 +1,36 @@+from __future__ import annotations++import time++# Repeat interval for the redundant idle housekeeping pass. The first pass on an+# idle transition still runs immediately, so /get_loads and DP balancing never+# see a stale *newly* idle snapshot; only the repeats are rate limited.+IDLE_HOUSEKEEP_REPEAT_INTERVAL_S = 0.25+++class IdleHousekeeper:+    """Rate limiter for the scheduler's idle housekeeping.++    ``Scheduler.on_idle`` runs inside a hot spin loop that only blocks on the+    zmq receive poll. Running the full housekeeping pass (pool invariant checks,+    metrics, load-snapshot publish) on every iteration pins a whole CPU core and+    delays picking up the next request, while the idle snapshot it publishes+    does not change as long as the engine stays idle. This collaborator keeps+    the pass on the idle transition and rate limits the repeats.+    """++    def __init__(self, repeat_interval_s: float = IDLE_HOUSEKEEP_REPEAT_INTERVAL_S):+        self.repeat_interval_s = repeat_interval_s+        # Zero deadline: the very first idle pass always runs.+        self._next_deadline = 0.0++    def should_run_housekeeping(self) -> bool:+        now = time.monotonic()+        if now < self._next_deadline:+            return False+        self._next_deadline = now + self.repeat_interval_s+        return True++    def notify_busy(self) -> None:+        """Re-arm so the next idle transition runs a full pass immediately."""+        self._next_deadline = 0.0