Gemini 3.7 Flash · Serving

S06 · Repeated context

Valid

Repeated context 1dev · Implementation Optimization

0.97×PERFORMANCE RATIO
170TOOL 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 agentGemini 3.7 Flash · 170 visible calls

InspectEditValidateExecuteBuildProfileRollbackOther
150Inspect
5Edit
5Validate
1Rollback
9Other

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 timeline90 groups · 170 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 · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0001–#0001

    echo <val>ls -l -a <val>
  2. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    2 calls · #0002–#0003

    Read <path>
  3. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0004–#0004

    Read <path>
  4. Inspect · Source & workspace

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

    9 calls · #0005–#0013

    Read <path>Search <pattern> <path>
  5. Inspect · Runtime processes

    Requested source searches related to runtime processes.

    1 call · #0014–#0014

    Search <pattern> <path>
  6. Inspect · Source & workspace

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

    3 calls · #0015–#0017

    Read <path>Search <pattern> <path>
  7. Inspect · Benchmark & validation setup

    Requested source searches related to benchmark & validation setup.

    1 call · #0018–#0018

    Search <pattern> <path>
  8. Inspect · Source & workspace

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

    2 calls · #0019–#0020

    Read <path>git status
  9. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0021–#0021

    bash <script>
  10. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0022–#0022

    Read <path>
  11. Inspect · Benchmark & validation setup

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

    1 call · #0023–#0023

    Read <path>
  12. Validate · Benchmark & validation setup

    Requested environment setup or inspection related to benchmark & validation setup.

    1 call · #0024–#0024

    env <vars> bash <script>
  13. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0025–#0025

    Manage task <task>
  14. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    2 calls · #0026–#0027

    List <path>
  15. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0028–#0028

    Manage task <task>
  16. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0029–#0029

    Read <path>
  17. Inspect · Benchmark & validation setup

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

    1 call · #0030–#0030

    Read <path>
  18. Validate · Benchmark & validation setup

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

    1 call · #0031–#0031

    bash <script>
  19. Inspect · Source & workspace

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

    3 calls · #0032–#0034

    Search <pattern> <path>Read <path>
  20. Inspect · Benchmark & validation setup

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

    1 call · #0035–#0035

    Read <path>
  21. Other · Benchmark & validation setup

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

    1 call · #0036–#0036

    bash <script>
  22. Inspect · Source & workspace

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

    2 calls · #0037–#0038

    Search <pattern> <path>List <path>
  23. Inspect · Benchmark & validation setup

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

    1 call · #0039–#0039

    Read <path>
  24. Inspect · Source & workspace

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

    2 calls · #0040–#0041

    Read <path>List <path>
  25. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0042–#0042

    Manage task <task>
  26. Inspect · Source & workspace

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

    2 calls · #0043–#0044

    Read <path>List <path>
  27. Inspect · Batching & scheduling

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

    4 calls · #0045–#0048

    Read <path>Search <pattern> <path>
  28. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0049–#0049

    Read <path>
  29. Inspect · Batching & scheduling

    Requested source searches related to batching & scheduling.

    1 call · #0050–#0050

    Search <pattern> <path>
  30. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    5 calls · #0051–#0055

    Read <path>
  31. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0056–#0056

    Read <path>
  32. Inspect · Source & workspace

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

    5 calls · #0057–#0061

    Search <pattern> <path>Read <path>List <path>
  33. Inspect · Benchmark & validation setup

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

    1 call · #0062–#0062

    Read <path>
  34. Inspect · Source & workspace

    1 tool error

    Requested file and log inspection related to source & workspace.

    4 calls · #0063–#0066

    Read <path>
  35. Inspect · Batching & scheduling

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

    2 calls · #0067–#0068

    Search <pattern> <path>Read <path>
  36. Inspect · Attention kernels

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

    10 calls · #0069–#0078

    Search <pattern> <path>Read <path>
  37. Inspect · Source & workspace

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

    4 calls · #0079–#0082

    Search <pattern> <path>Read <path>
  38. Inspect · Attention kernels

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

    4 calls · #0083–#0086

    Read <path>Search <pattern> <path>
  39. Inspect · Source & workspace

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

    2 calls · #0087–#0088

    Read <path>Search <pattern> <path>
  40. Inspect · Device memory

    Requested file and log inspection related to device memory.

    3 calls · #0089–#0091

    Read <path>
  41. Inspect · Source & workspace

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

    2 calls · #0092–#0093

    Search <pattern> <path>Read <path>
  42. Inspect · Batching & scheduling

    Requested source searches related to batching & scheduling.

    1 call · #0094–#0094

    Search <pattern> <path>
  43. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0095–#0095

    Read <path>
  44. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0096–#0096

    Read <path>
  45. Inspect · Prefix caching

    Requested source searches related to prefix caching.

    1 call · #0097–#0097

    Search <pattern> <path>
  46. Inspect · Source & workspace

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

    3 calls · #0098–#0100

    Search <pattern> <path>Read <path>
  47. Inspect · Batching & scheduling

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

    2 calls · #0101–#0102

    Search <pattern> <path>Read <path>
  48. Inspect · Source & workspace

    Requested source searches related to source & workspace.

    1 call · #0103–#0103

    Search <pattern> <path>
  49. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    2 calls · #0104–#0105

    Read <path>
  50. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0106–#0107

    Read <path>
  51. Inspect · Prefix caching

    Requested source searches related to prefix caching.

    1 call · #0108–#0108

    Search <pattern> <path>
  52. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0109–#0109

    Read <path>
  53. Inspect · Source & workspace

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

    4 calls · #0110–#0113

    Search <pattern> <path>Read <path>
  54. Inspect · Batching & scheduling

    Requested source searches related to batching & scheduling.

    2 calls · #0114–#0115

    Search <pattern> <path>
  55. Inspect · Source & workspace

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

    3 calls · #0116–#0118

    Read <path>Search <pattern> <path>
  56. Inspect · Prefix caching

    Requested file and log inspection related to prefix caching.

    1 call · #0119–#0119

    Read <path>
  57. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0120–#0120

    Read <path>
  58. Inspect · Source & workspace

    Requested source searches related to source & workspace.

    1 call · #0121–#0121

    Search <pattern> <path>
  59. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0122–#0122

    Read <path>
  60. Inspect · Source & workspace

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

    2 calls · #0123–#0124

    Search <pattern> <path>Read <path>
  61. Inspect · Device memory

    Requested file and log inspection related to device memory.

    2 calls · #0125–#0126

    Read <path>
  62. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    3 calls · #0127–#0129

    Read <path>
  63. Inspect · Device memory

    Requested file and log inspection related to device memory.

    1 call · #0130–#0130

    Read <path>
  64. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0131–#0131

    Read <path>
  65. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0132–#0132

    Edit <path>
  66. Inspect · Device memory

    Requested file and log inspection related to device memory.

    1 call · #0133–#0133

    Read <path>
  67. Edit · Device memory

    Requested code edits related to device memory.

    1 call · #0134–#0134

    Edit <path>
  68. Validate · Benchmark & validation setup

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

    1 call · #0135–#0135

    bash <script>
  69. Other · Benchmark & validation setup

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

    1 call · #0136–#0136

    bash <script>
  70. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0137–#0137

    Read <path>
  71. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    4 calls · #0138–#0141

    Read <path>
  72. Edit · Batching & scheduling

    Requested code edits related to batching & scheduling.

    1 call · #0142–#0142

    Edit <path>
  73. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0143–#0143

    Read <path>
  74. Edit · Batching & scheduling

    Requested code edits related to batching & scheduling.

    1 call · #0144–#0144

    Edit <path>
  75. Inspect · Attention kernels

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

    6 calls · #0145–#0150

    Search <pattern> <path>Read <path>
  76. Validate · Benchmark & validation setup

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

    1 call · #0151–#0151

    bash <script>
  77. Other · Benchmark & validation setup

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

    1 call · #0152–#0152

    bash <script>
  78. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0153–#0153

    Read <path>
  79. Edit · Batching & scheduling

    Requested code edits related to batching & scheduling.

    1 call · #0154–#0154

    Edit <path>
  80. Inspect · Source & workspace

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

    5 calls · #0155–#0159

    Search <pattern> <path>Read <path>
  81. Inspect · Dependencies & build setup

    Requested file and log inspection related to dependencies & build setup.

    1 call · #0160–#0160

    Read <path>
  82. Inspect · Source & workspace

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

    2 calls · #0161–#0162

    Search <pattern> <path>Read <path>
  83. Other · Benchmark & validation setup

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

    1 call · #0163–#0163

    bash <script>
  84. Inspect · Source & workspace

    Requested repository inspection related to source & workspace.

    1 call · #0164–#0164

    git diff
  85. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0165–#0165

    Read <path>
  86. Rollback · Batching & scheduling

    Requested source restoration related to batching & scheduling.

    1 call · #0166–#0166

    git checkout <path>
  87. Inspect · Source & workspace

    Requested repository inspection related to source & workspace.

    1 call · #0167–#0167

    git status
  88. Validate · Benchmark & validation setup

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

    1 call · #0168–#0168

    bash <script>
  89. Other · Benchmark & validation setup

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

    1 call · #0169–#0169

    bash <script>
  90. Inspect · Source & workspace

    Requested repository inspection related to source & workspace.

    1 call · #0170–#0170

    git diff

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/schedule_policy.py b/python/sglang/srt/managers/schedule_policy.pyindex 39bc02b780f94cb356d7314798203b7c4136dc00..5a78075f44bf2e98bc8e20838496e289ac61448d 100644--- a/python/sglang/srt/managers/schedule_policy.py+++ b/python/sglang/srt/managers/schedule_policy.py@@ -237,9 +237,6 @@ class SchedulePolicy:                 raise ValueError(f"Unknown CacheAgnostic Policy: {policy=}")      def _determine_active_policy(self, waiting_queue: List[Req]) -> Policy:-        if self.policy == CacheAwarePolicy.LPM and len(waiting_queue) > 128:-            # Turn off the expensive prefix matching and sorting when the #queue is large.-            return CacheAgnosticPolicy.FCFS         return self.policy      def _validate_and_adjust_policy(@@ -248,13 +245,14 @@ class SchedulePolicy:         """         Validates the policy and adjusts it if necessary based on tree cache settings.         """+        if getattr(tree_cache, "disable", True):+            return CacheAgnosticPolicy.FCFS+         try:-            policy_enum = CacheAwarePolicy(policy)-            if getattr(tree_cache, "disable", True):-                # If tree_cache is disabled, using CacheAgnosticPolicy policy-                return CacheAgnosticPolicy.FCFS-            return policy_enum+            return CacheAwarePolicy(policy)         except ValueError:+            if policy == "fcfs":+                return CacheAwarePolicy.LPM             try:                 return CacheAgnosticPolicy(policy)             except ValueError:@@ -314,12 +312,13 @@ class SchedulePolicy:     def _sort_by_longest_prefix(         waiting_queue: List[Req], temporary_deprioritized: Set[int]     ) -> None:-        """Sorts the waiting queue based on the longest prefix match."""+        """Sorts the waiting queue based on the longest prefix match and common tree nodes."""         waiting_queue.sort(             key=lambda r: (-                -r.num_matched_prefix_tokens-                if r.rid not in temporary_deprioritized-                else float("inf")+                1 if r.rid in temporary_deprioritized else 0,+                -r.num_matched_prefix_tokens,+                id(r.last_node) if r.last_node is not None else 0,+                r.rid,             )         ) diff --git a/python/sglang/srt/mem_cache/allocator/paged.py b/python/sglang/srt/mem_cache/allocator/paged.pyindex 9cfdfa06948d137e9512d1b03d3c61fdf68b00c4..502d794114ac4bebbff383602c7c90eb514d8335 100755--- a/python/sglang/srt/mem_cache/allocator/paged.py+++ b/python/sglang/srt/mem_cache/allocator/paged.py@@ -200,7 +200,7 @@ class PagedTokenToKVPoolAllocator(BaseTokenToKVPoolAllocator):             last_loc,             self.free_pages,             out_indices,-            next_power_of_2(bs),+            max(64, next_power_of_2(bs)),             self.page_size,         ) @@ -240,7 +240,7 @@ class PagedTokenToKVPoolAllocator(BaseTokenToKVPoolAllocator):             last_loc,             self.free_pages,             out_indices,-            next_power_of_2(bs),+            max(64, next_power_of_2(bs)),             self.page_size,         )