Inspect · Source & workspace
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
echo <val>ls -l -a <val> <n> > <path>echo <path>Claude Fable 5.1 · Serving
Mixed interactivity 1dev · Implementation Optimization
01 / PROCESS MAP
Each row shows one agent’s tool events in its own recorded order. Colors show broad activities; bar widths do not represent duration.
Main agentClaude Fable 5.1 · 300 visible calls
02 / EVENT SEQUENCE
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.
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>.
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
echo <val>ls -l -a <val> <n> > <path>echo <path>Requested file and log inspection and workspace inspection related to task requirements.
3 calls · #0002–#0004
cat <path>cd <val>find <val> <val> <val> <val> <val> -maxdepth <n>head -n <n>Requested environment setup or inspection, workspace inspection and file and log inspection related to device memory.
1 call · #0005–#0005
env <vars>ls -l -a <val> <n> > <path>echo <flag>cat <path> <n> > <path>echo <val>Requested file and log inspection related to benchmark & validation setup.
2 calls · #0006–#0007
cd <path><command> <args>cat <val>Requested file and log inspection related to benchmark & validation setup.
1 call · #0008–#0008
cd <val>echo <path>cat <path>echoRequested file and log inspection related to task requirements.
2 calls · #0009–#0010
cd <path>echo <val>cat <val>echowc -c <val>head -c <n> <val>wc -l <val>echo <flag>head -n <n> <val>head -c <n>sed -n <val> <val>Requested file and log inspection, repository inspection and workspace inspection related to source & workspace.
2 calls · #0011–#0012
cd <path>wc -l <path> <path> <path>echo <val>cat <path>git log --oneline <flag>git status --shorthead -n <n>echo <flag>ls <path>find <path> -iname <val> -o -iname <val>Requested file and log inspection and script or workload execution related to device memory.
1 call · #0013–#0013
<command> <args>head <flag>echo <flag>python3 -c <script> <n> >& <path>head -n <n>tail -n <n>Requested environment setup or inspection and source searches related to source & workspace.
1 call · #0014–#0014
envgrep -E <val>sortecho <flag>grep -c <val>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0015–#0015
cd <path>grep -n -E <val> <path>head -n <n>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0016–#0017
cd <path>grep -n -E <val> <path>head -n <n>Requested script or workload execution related to attention kernels.
1 call · #0018–#0018
cd <val>python3 -c <script>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0019–#0019
cd <path>wc -l <path> <path> <path> <n> > <path>echo <flag>grep -n -E <val> <path>head -n <n>Requested source searches, file and log inspection and workspace inspection related to source & workspace.
2 calls · #0020–#0021
grep -n -E <val> <path>head -n <n>cd <path> <n> > <path>ls<command> <args>head -c <n> <val> <n> > <path>echoRequested file and log inspection related to runtime processes.
1 call · #0022–#0022
sed -n <val> <path>Requested file and log inspection, script or workload execution and workspace inspection related to source & workspace.
3 calls · #0023–#0025
sed -n <val> <path>date -uecho <val>python3 -c <script>echo <flag>ls -l -a <val> <n> > <path>headcat <val> <n> > <path>head -c <n>Requested source searches and file and log inspection related to benchmark & validation setup.
1 call · #0026–#0026
cd <path>grep -n -E <val> <path>head -n <n>Requested source searches, file and log inspection and workspace inspection related to batching & scheduling.
1 call · #0027–#0027
cd <path>grep -n -E <val> <path>head -n <n>echo <flag>ls <path> <n> > <path>Requested source searches and file and log inspection related to latency & request handling.
1 call · #0028–#0028
cd <path>grep -r -n -E <val> <path>head -n <n>Requested workspace inspection, source searches and file and log inspection related to attention kernels.
1 call · #0029–#0029
ls <path> <path> <n> > <path>echo <flag>grep -n -E <val> <path>head -n <n>Requested workspace file updates and script or workload execution related to benchmark & validation setup.
1 call · #0030–#0030
mkdir -p <path>cd <path>bash <script> > <path> <n> >& <path>echo <val> >> <path>Requested file and log inspection related to batching & scheduling.
3 calls · #0031–#0033
sed -n <val> <path>Requested file and log inspection related to source & workspace.
2 calls · #0034–#0035
sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0036–#0036
sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0037–#0037
sed -n <val> <path>Requested file and log inspection, workspace inspection and script or workload execution related to benchmark & validation setup.
1 call · #0038–#0038
tail -c <n> <path> <n> > <path>echo <val>ls -l -a <val> <n> > <path>python3 -c <script>Requested file and log inspection related to source & workspace.
1 call · #0039–#0039
sed -n <val> <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0040–#0040
cd <path>grep -n -E <val> <path>head -n <n>echo <path>Requested source searches, file and log inspection and script or workload execution related to task requirements.
1 call · #0041–#0041
cd <val>grep -n -E <val> <path>head -n <n>echo <val>python3 -c <script>Requested source searches and file and log inspection related to rollout generation.
1 call · #0042–#0042
cd <path>grep -n -E <val> <path>head -n <n>Requested file and log inspection related to batching & scheduling.
3 calls · #0043–#0045
sed -n <val> <path>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0046–#0046
tail -n <n> <path> <n> > <path>ls -l -a <val>echo <flag>Requested source searches and file and log inspection related to benchmark & validation setup.
2 calls · #0047–#0048
cd <path>grep -n <val> <path>headecho <val>sed -n <val> <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0049–#0049
cd <path>grep -n -E <val> <path>head -n <n>Requested file and log inspection related to benchmark & validation setup.
1 call · #0050–#0050
sed -n <val> <path>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0051–#0051
cd <path>sed -n <val> <path>echo <val>grep -n <val> <path>head -n <n>grep -r -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0052–#0052
sed -n <val> <path>Requested source searches and file and log inspection related to attention kernels.
1 call · #0053–#0053
grep -n <val> <path>head -n <n>echo <val>grep -r -n <val> <path>Requested script or workload execution and workspace file updates related to benchmark & validation setup.
1 call · #0054–#0054
cd <val>python3 -c <script>mkdir -p <path>cp <val> <path>echo <val>Requested workspace inspection, runtime inspection and file and log inspection related to benchmark & validation setup.
2 calls · #0055–#0056
ls -l -a <path> <n> > <path>echo <val>pgrep <flag> <args>head<command> <args>grep -c <val>echo <val> >> <path>Requested file and log inspection related to source & workspace.
3 calls · #0057–#0059
cat <path>cd <path>sed -n <val> <path>Requested source searches and file and log inspection related to prefix caching.
1 call · #0060–#0060
cd <path>grep -r -n <val> <path> <path> <path> <n> > <path>head -n <n>echo <val>sed -n <val> <path>Requested file and log inspection related to batching & scheduling.
1 call · #0061–#0061
cd <path>sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0062–#0062
sed -n <val> <path>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0063–#0063
tail -c <n> <path> <n> > <path>echo <val>ls -l -a <val>head -n <n>tail -n <n> <path> <n> > <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0064–#0064
grep <flag> <args>head -n <n>echo <val>grep -E <val> <path>Requested file and log inspection and source searches related to attention kernels.
1 call · #0065–#0065
cd <path>wc -l <path>grep -n -E <val> <path>head -n <n>Requested file and log inspection and source searches related to batching & scheduling.
2 calls · #0066–#0067
cd <path>sed -n <val> <path>grep -n -E <val> <path>head -n <n>Requested repository inspection and file and log inspection related to source & workspace.
1 call · #0068–#0068
cd <path>git status --shortheadecho <val>Requested file and log inspection, workspace inspection and source searches related to batching & scheduling.
1 call · #0069–#0069
tail -c <n> <path> <n> > <path>echo <val>ls <val>grep -E <val> <path> <n> > <path>tail -n <n>Requested source searches and file and log inspection related to source & workspace.
1 call · #0070–#0070
cd <path>grep -n <val> <path>headecho <val>Requested source searches, file and log inspection and workspace inspection related to batching & scheduling.
2 calls · #0071–#0072
cd <path>grep -n <val> <path> <path> <path> <n> > <path>head -n <n>echo <val>grep -r -n <val> <path> <n> > <path>ls <path> <n> > <path>grep -i -E <val>find <val> -iname <val> -o -iname <val>Requested file and log inspection related to source & workspace.
2 calls · #0073–#0074
sed -n <val> <path>cd <path>Requested file and log inspection related to attention kernels.
1 call · #0075–#0075
cd <path>sed -n <val> <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0076–#0076
cd <path>grep -r -n -i -E <val> <path> <path> <path> <path> <n> > <path>head -n <n>Requested file and log inspection, workspace inspection and source searches related to benchmark & validation setup.
1 call · #0077–#0077
tail -c <n> <path> <n> > <path>echo <val>ls <val>grep -E <val>grep <flag> <args>tail -n <n>Requested file and log inspection and workspace inspection related to source & workspace.
1 call · #0078–#0078
cd <path>head -n <n> <path>echo <val>ls <val>head -n <n>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0079–#0079
cd <path>grep -r -l -n <val> <path> <path> <n> > <path>head -n <n>Requested workspace inspection and file and log inspection related to batching & scheduling.
1 call · #0080–#0080
ls <path> <n> > <path>head -n <n>find <path> -path <path> <flag> <args>Requested file and log inspection, workspace inspection and source searches related to benchmark & validation setup.
1 call · #0081–#0081
tail -c <n> <path> <n> > <path>echo <val>ls <val>grep -c <val>grep <val>test -f <path>Requested file and log inspection related to batching & scheduling.
1 call · #0082–#0082
wc -l <path>head -n <n> <path>Requested workspace inspection, file and log inspection and source searches related to source & workspace.
2 calls · #0083–#0084
ls <path>head -n <n>echo <val>cat <path> <n> > <path>cd <path>grep -n <val> <path>sed -n <val> <path>Requested script or workload execution related to latency & request handling.
1 call · #0085–#0085
cd <val>python3 -c <script>Requested file and log inspection, workspace inspection and source searches related to benchmark & validation setup.
1 call · #0086–#0086
tail -c <n> <path>echo <val>ls <val>grep -c <val>test -f <path>date -uRequested source searches and file and log inspection related to batching & scheduling.
3 calls · #0087–#0089
grep -E <val> <path>grep <val>head -n <n>echo <val>grep <flag> <args>cd <path>grep -r -n <val> --include <path> <path>grep -n <val> <path> <path> <n> > <path>sed -n <path> <path>Requested source searches and script or workload execution related to source & workspace.
1 call · #0090–#0090
grep <flag> <args>python3 -c <script>Requested script or workload execution and workspace file updates related to benchmark & validation setup.
1 call · #0091–#0091
cd <val>python3 -c <script>cp <val> <path>cp <val> <path> <n> > <path>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0092–#0092
cd <val>python3 -c <script>Requested source searches and file and log inspection related to source & workspace.
1 call · #0093–#0093
cd <path>grep -r -n <val> <path> <path> <path> <n> > <path>head -n <n>Requested source searches and script or workload execution related to source & workspace.
1 call · #0094–#0094
cd <val>grep <flag> <args>python3 -c <script>Requested source searches and file and log inspection related to batching & scheduling.
2 calls · #0095–#0096
cd <val>echo <path>grep <flag> <args>awk <val>tail -n <n>echoecho <val>sortuniq -csort <flag>head -n <n>sed -n <val> <path>Requested source searches and file and log inspection related to latency & request handling.
1 call · #0097–#0097
cd <path>grep -r -n <val> --include <path> <path>head -n <n>echo <val>sed -n <val> <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0098–#0098
cd <val>echo <val>grep <flag> <args>sort <flag> <args>uniq -ctail -n <n>Requested file and log inspection and source searches related to attention kernels.
3 calls · #0099–#0101
sed -n <val> <path>cd <path>echo <val>grep -n -E <val> <path>head -n <n>Requested file and log inspection and source searches related to source & workspace.
1 call · #0102–#0102
cd <path>sed -n <val> <path>grep -n -E <val>Requested script or workload execution related to source & workspace.
1 call · #0103–#0103
python3 -c <script>Requested source searches and file and log inspection related to attention kernels.
1 call · #0104–#0104
cd <path>grep -n <val> <path>head -n <n>echo <val>sed -n <val> <path>sed -n <val>Requested file and log inspection related to attention kernels.
1 call · #0105–#0105
cd <path>awk <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0106–#0106
cd <path>sed -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0107–#0107
cd <path>awk <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0108–#0108
cd <path>sed -n <val> <path>Requested environment setup or inspection, file and log inspection and workspace inspection related to device memory.
1 call · #0109–#0109
env <vars>cat > <path> <script>echo <val>ls <val>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0110–#0111
grep -n <val> <path>head -n <n>cd <path>sed -n <val> <path>echo <val>Requested file and log inspection and source searches related to runtime processes.
1 call · #0112–#0112
cd <path>sed -n <val> <path>echo <val>grep -n <flag> <args>head -n <n>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0113–#0113
cd <path>wc -l <path> <path>grep -n -E <val> <path> <path>head -n <n>Requested file and log inspection related to latency & request handling.
1 call · #0114–#0114
cd <path>sed -n <val> <path>Requested source searches and file and log inspection related to attention kernels.
1 call · #0115–#0115
cd <path>grep -n -E <val> <path>head -n <n>echo <val>sed -n <val> <path>Requested source searches and file and log inspection related to benchmark & validation setup.
1 call · #0116–#0116
cd <path>grep -n -E <path> <path>head -n <n>Requested file and log inspection related to attention kernels.
1 call · #0117–#0117
cd <path>sed -n <val> <path>echo <val>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0118–#0119
grep -n -E <val> <path>head -n <n>echo <val>grep -r -n <val> <path>cd <path>sed -n <val> <path>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0120–#0120
cd <path>sed -n <val> <path>grep -n -E <val>echo <val>grep -n -E <val> <path>head -n <n>Requested file and log inspection and source searches related to source & workspace.
1 call · #0121–#0121
<command> <args>head <flag>echo <val>grep -n -E <val> <val>head -n <n>Requested source searches and file and log inspection related to attention kernels.
1 call · #0122–#0122
cd <path>grep -n <flag> <args>head -n <n>Requested workspace file updates and script or workload execution related to prefix caching.
1 call · #0123–#0123
cd <path>mkdir -p <path>nohup <val> -m <val> <flag> <args>echo <val>Requested file and log inspection related to attention kernels.
1 call · #0124–#0124
sed -n <val> <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0125–#0125
cd <path>grep -r -n <val> <path> <path>head -n <n><command> <args>head <flag>echo <val>grep -n <flag> <args>Requested source searches and file and log inspection related to source & workspace.
1 call · #0126–#0126
cd <path>grep -n <flag> <args>head -n <n>echo <val>grep -n <val> <path>Requested source searches, file and log inspection and script or workload execution related to runtime processes.
1 call · #0127–#0127
cd <path>grep -n <val> <path>head -n <n>python3 -c <script>Requested file and log inspection and script or workload execution related to rollout generation.
1 call · #0128–#0128
cd <path>cat > <path> <script>python3 <script> <n> >& <path>tail -n <n>Requested file and log inspection related to batching & scheduling.
2 calls · #0129–#0130
cd <path>sed -n <val> <path>echo <val>sed -n <path> <path>Requested workspace file updates, service requests and execution waits related to task requirements.
1 call · #0131–#0131
cd <path>mkdir -p <path><command> <args>curl -s -X <val> <url> > <path>sleep <n>python3 -m <module> <flag> <args>python3 - <script>Requested source searches and file and log inspection related to source & workspace.
1 call · #0132–#0132
cd <path>grep -n <flag> <args>head -n <n>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0133–#0133
cd <path>sed -n <val> <path>echo <val>grep -r -l -n <val> <path> <path> <n> > <path>headRequested script or workload execution, source searches and file and log inspection related to batching & scheduling.
1 call · #0134–#0134
python3 -c <script>echo <val>grep <flag> <args>sortuniq -csort <flag>head -n <n>Requested workspace file updates, environment setup or inspection and service requests related to task requirements.
1 call · #0135–#0135
mkdir -p <path>rm -f <path><command> <args>env <vars>curl -s -X <val> <url> > <path>sleep <n>python3 -m <module> <flag> <args>echo <val>python3 - <script>Requested file and log inspection and script or workload execution related to rollout generation.
1 call · #0136–#0136
cd <path>cat > <path> <script>timeout <n> <val> <path> <n> >& <path>tail -n <n>Requested file and log inspection and source searches related to attention kernels.
1 call · #0137–#0137
cd <path>sed -n <val> <path>echo <val>grep -n <val> <path>head -n <n>Requested source searches, file and log inspection and script or workload execution related to rollout generation.
1 call · #0138–#0138
grep <flag> <args>tail -n <n>echo <val>cd <path>python3 -c <script>Requested script or workload execution and file and log inspection related to task requirements.
1 call · #0139–#0139
python3 -m <module> <flag> <args>tail -n <n>Requested source searches and file and log inspection related to batching & scheduling.
2 calls · #0140–#0141
cd <path>grep -n <flag> <args>head -n <n>grep <flag> <args>tail -n <n>sortuniq -csort <flag>Requested script or workload execution related to source & workspace.
1 call · #0142–#0142
python3 -c <script>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0143–#0143
cd <path>sed -n <val> <path>echo <val>grep -n <val> <path>headRequested workspace file updates, environment setup or inspection and service requests related to task requirements.
1 call · #0144–#0144
mkdir -p <path>rm -f <path>export <vars><command> <args>env <vars>curl -s -X <val> <url> > <path>sleep <n>python3 -m <module> <flag> <args>echo <val>tail -n <n> <path>python3 - <script>Requested source searches and file and log inspection related to source & workspace.
1 call · #0145–#0145
cd <path>grep -n <val> <path>head -n <n>echo <val>sed -n <val> <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0146–#0146
cd <path>grep -n <val> <path>head -n <n>Requested script or workload execution related to source & workspace.
1 call · #0147–#0147
python3 -c <script>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0148–#0148
cd <val>echo <val>grep -n -E <val> <val>grep <flag> <args>head -n <n>echoawk <path> <val><command> <args>cut <flag> <args>sed -n <val> <val>sed <path>Requested source searches and file and log inspection related to source & workspace.
3 calls · #0149–#0151
cd <path>grep -n <val> <path>head -n <n>sed -n <val> <path>Requested file and log inspection and workspace file updates related to prefix caching.
1 call · #0152–#0152
cat > <path> <script>chmod <val> <path>echo <val>Requested repository inspection, file and log inspection and script or workload execution related to source & workspace.
1 call · #0153–#0153
cd <path>git status --shortheadpython3 -c <script>Requested file and log inspection related to attention kernels.
1 call · #0154–#0154
cd <path>sed -n <val> <path>cat -nsed <path>awk <val>head -n <n>Requested source searches and file and log inspection related to source & workspace.
1 call · #0155–#0155
grep -n <val> <path>head -n <n>Requested source searches and file and log inspection related to attention kernels.
1 call · #0156–#0156
cd <path>grep -r -n <val> <path> <path>head -n <n>echo <val>grep -n <val> <path>headRequested file and log inspection related to batching & scheduling.
1 call · #0157–#0157
cd <path>sed -n <val> <path>Requested file and log inspection and source searches related to source & workspace.
1 call · #0158–#0158
wc -l <path> <path>grep -n -E <val> <path>head -n <n>echo <val>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0159–#0159
cd <val>echo <val>grep <flag> <args>sortuniq -csort <flag> <args>echoawk <flag> <args>sort <flag>head -n <n>Requested file and log inspection related to source & workspace.
1 call · #0160–#0160
cd <path>awk <val> <path>Requested file and log inspection related to batching & scheduling.
1 call · #0161–#0161
cd <path>sed -n <val> <path>Requested script or workload execution related to source & workspace.
1 call · #0162–#0162
python3 -c <script>echo <val>Requested script or workload execution, runtime inspection and file and log inspection related to runtime processes.
1 call · #0163–#0163
python3 -c <script>pgrep -f <val>head -n <n>echo <val>curl <flag> <args>Requested source searches, file and log inspection and script or workload execution related to batching & scheduling.
1 call · #0164–#0164
cd <val>echo <val>grep <flag> <args>awk <flag> <args>awk <val>python3 -c <script>Requested script or workload execution and file and log inspection related to batching & scheduling.
1 call · #0165–#0165
timeout <n> <val> -m <val> <path> -x -q <n> >& <path>tail -n <n>Requested script or workload execution and repository inspection related to rollout generation.
1 call · #0166–#0166
python3 - <script>git diff --statRequested script or workload execution related to source & workspace.
1 call · #0167–#0167
python3 -c <script>Requested script or workload execution and file and log inspection related to source & workspace.
1 call · #0168–#0168
bash <script> <val> <n> <n> <n> >& <path>tail -n <n>Requested script or workload execution related to batching & scheduling.
1 call · #0169–#0169
cd <val>python3 -c <script>Requested script or workload execution and source searches related to batching & scheduling.
1 call · #0170–#0170
python3 -c <script> <n> >& <path>grep -v <val>Requested script or workload execution related to source & workspace.
1 call · #0171–#0171
python3 -c <script>Requested source searches and file and log inspection related to source & workspace.
1 call · #0172–#0172
cd <path>echo <val>grep -r -n <val> --include <path> <path>head -n <n>echogrep -n <val> <path>sed -n <val>Requested file and log inspection and source searches related to attention kernels.
1 call · #0173–#0173
cd <path>sed -n <val> <path>grep -n -E <val>Requested script or workload execution related to source & workspace.
2 calls · #0174–#0175
python3 -c <script>Requested source searches and file and log inspection related to attention kernels.
1 call · #0176–#0176
cd <path>echo <val>grep -n <val> <path>head -n <n>echoRequested source searches related to attention kernels.
1 call · #0177–#0177
cd <path>grep -n <val> <path> <path> <path> <path> <n> > <path>Requested workspace inspection, file and log inspection and source searches related to source & workspace.
2 calls · #0178–#0179
cd <path>find <val> -iname <val> -o -iname <val>head -n <n>echo <val>grep -r -l -n <val> <path> <path> <n> > <path>cat <path> <n> > <path>tail -n <n>Requested script or workload execution related to batching & scheduling.
1 call · #0180–#0180
<command> <args>echo <val>test -f <val>python3 -c <script> <val>Requested file and log inspection and source searches related to attention kernels.
1 call · #0181–#0181
wc -l <path>grep -n -E <val> <path>head -n <n>Requested script or workload execution related to source & workspace.
1 call · #0182–#0182
python3 -c <script>Requested workspace file updates, source restoration and repository inspection related to source & workspace.
1 call · #0183–#0183
cp <path> <path>git checkout <flag> <args>git status --shortecho <flag>bash <script> <val> <n> <n> <n> >& <path>tail -n <n>git diff --statRequested script or workload execution and workspace inspection related to source & workspace.
1 call · #0184–#0184
python3 -c <script>echo <flag>ls -l -a <path>Requested source searches and file and log inspection related to attention kernels.
1 call · #0185–#0185
grep -n -E <val> <path>tail -n <n>Requested file and log inspection related to speculative decoding.
1 call · #0186–#0186
cat > <path> <script>echo <val>wc -l <path>Requested script or workload execution related to source & workspace.
1 call · #0187–#0187
python3 -c <script>Requested file and log inspection related to source & workspace.
1 call · #0188–#0188
tail -n <n> <path> <n> > <path>echo <val>Requested file and log inspection related to attention kernels.
1 call · #0189–#0189
sed -n <val> <path>Requested process termination, execution waits and runtime inspection related to benchmark & validation setup.
1 call · #0190–#0190
pkill -f <val> <n> > <path>sleep <n>pgrep -f <val> > <path>echo <val>cd <path>git status --shortbash <script> > <path> <n> >& <path>python3 -c <script><command> <args>tail -n <n> <path>Requested repository inspection related to source & workspace.
1 call · #0191–#0191
diff -q <path> <path>echo <val>echo <flag>git diff --statgit diffRequested file and log inspection related to batching & scheduling.
1 call · #0192–#0192
sed -n <path> <path>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0193–#0193
python3 -c <script>Requested environment setup or inspection, file and log inspection and workspace inspection related to device memory.
1 call · #0194–#0194
env <vars>cat > <path> <script>echo <val>ls <val>Requested file and log inspection related to source & workspace.
1 call · #0195–#0195
cat <path> <n> > <path>tail -n <n>Requested runtime inspection, file and log inspection and workspace inspection related to device memory.
1 call · #0196–#0196
echo <val>pgrep <flag> <args>head -n <n>ls -l -a <path> <n> > <path><command> <args>grep <val>npu-smi info <n> >& <path>sed -n <val>Requested workspace inspection, file and log inspection and repository inspection related to benchmark & validation setup.
2 calls · #0197–#0198
ls -l -a <val>head -n <n>echo <val>tail -n <n> <path> <n> > <path>cd <path>git status --shortpgrep -f <val>bash <script> > <path> <n> >& <path>tail -n <n> <path>python3 -c <script>Requested file and log inspection and source searches related to source & workspace.
1 call · #0199–#0199
cd <path>sed -n <val> <path>echo <path>grep -r -n <val> <path>head -n <n>sed -n <path> <path>Requested script or workload execution related to source & workspace.
1 call · #0200–#0200
python3 -c <script>Requested script or workload execution, source searches and repository inspection related to rollout generation.
1 call · #0201–#0201
cd <path>python3 - <script>grep -c <val> <path>git diff --statRequested script or workload execution related to source & workspace.
1 call · #0202–#0202
python3 -c <script>Requested environment setup or inspection, file and log inspection and workspace inspection related to device memory.
1 call · #0203–#0203
env <vars>cat > <path> <script>echo <val>ls <val>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0204–#0204
sed -n <val> <path>echo <val>grep -c <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0205–#0205
tail -n <n> <path> <n> > <path>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0206–#0206
python3 -c <script>Requested file and log inspection, source searches and workspace inspection related to benchmark & validation setup.
1 call · #0207–#0207
tail -n <n> <path> <n> > <path>grep -v <val>echo <val>ls <val> <n> > <path>grep -c <val>test -f <path>Requested script or workload execution related to source & workspace.
1 call · #0208–#0208
python3 -c <script>Requested file and log inspection related to source & workspace.
1 call · #0209–#0209
echo <val>sed -n <val> <path>echoRequested script or workload execution, file and log inspection and source searches related to batching & scheduling.
1 call · #0210–#0210
timeout <n> <val> -m <val> <path> -q <n> >& <path>tail -n <n>echo <val>timeout <n> <val> -m <val> <path> -q -k <val> -v <n> >& <path>grep -E <val>Requested file and log inspection and source searches related to benchmark & validation setup.
1 call · #0211–#0211
tail -n <n> <path> <n> > <path>grep -v <val>echo <flag>test -f <path>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0212–#0212
python3 -c <script>Requested script or workload execution, source searches and file and log inspection related to batching & scheduling.
1 call · #0213–#0213
timeout <n> <val> -m <val> <path> -q -k <val> <flag> <args>grep -v -E <val>tail -n <n>Requested file and log inspection and source searches related to benchmark & validation setup.
1 call · #0214–#0214
tail -n <n> <path> <n> > <path>grep -v <val>echo <flag>test -f <path>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0215–#0215
python3 -c <script>Requested script or workload execution and file and log inspection related to batching & scheduling.
1 call · #0216–#0216
timeout <n> <val> -m <val> <path> -k <val> <flag> <args>sed -n <path>head -n <n>Requested script or workload execution related to prefix caching.
1 call · #0217–#0217
python3 - <script>Requested file and log inspection and source searches related to benchmark & validation setup.
1 call · #0218–#0218
tail -n <n> <path> <n> > <path>grep -v <val>echo <flag>test -f <path>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0219–#0219
python3 -c <script>Requested workspace file updates, workspace inspection and file and log inspection related to benchmark & validation setup.
1 call · #0220–#0220
mkdir -p <path>cp <path> <path> <path> <n> > <path>cp <path> <path> <n> > <path>ls <path>headecho <flag>Requested script or workload execution and file and log inspection related to batching & scheduling.
1 call · #0221–#0221
python3 - <script>timeout <n> <val> -m <val> <path> -q -p <val> <n> >& <path>tail -n <n>Requested repository inspection and script or workload execution related to source & workspace.
1 call · #0222–#0222
git status --shortgit diff --statpython3 -c <script>Requested environment setup or inspection, file and log inspection and script or workload execution related to rollout generation.
1 call · #0223–#0223
env <vars>cat > <path> <script>python3 - <script>echo <val>Requested script or workload execution, repository inspection and file and log inspection related to attention kernels.
1 call · #0224–#0224
python3 <script>git diff --statecho <val>git diff <path>echo <path>bash <script> <val> <n> <n> <n> >& <path>tail -n <n>Requested workspace inspection, file and log inspection and repository inspection related to source & workspace.
1 call · #0225–#0225
echo <val>ls -d <path>head -n <n>echogit status --shortecho <path>ls -d <path> <n> > <path>test -d <path>Requested source searches, file and log inspection and workspace inspection related to source & workspace.
1 call · #0226–#0226
grep -r -n <flag> <args>head -n <n>echo <path>find <path> -name <path> <n> > <path>grep -r -l -n <val> <path> <n> > <path>Requested script or workload execution related to source & workspace.
1 call · #0227–#0227
python3 -c <script>Requested file and log inspection related to source & workspace.
2 calls · #0228–#0229
tail -n <n> <path> <n> > <path>echo <val>cat <path> <n> > <path>head -n <n>Requested source searches and file and log inspection related to source & workspace.
1 call · #0230–#0230
echo <path>grep -r -l -n <val> <path> <n> > <path>head -n <n>echoecho <val>head -n <n> <path> <n> > <path><command> <args>head <flag>Requested file and log inspection and source searches related to source & workspace.
1 call · #0231–#0231
tail -n <n> <path> <n> > <path>grep -v -E <val>echo <val>Requested script or workload execution related to source & workspace.
2 calls · #0232–#0233
python3 -c <script>Requested file and log inspection and source searches related to source & workspace.
1 call · #0234–#0234
tail -n <n> <path> <n> > <path>grep -v -E <val>echo <val>Requested file and log inspection, source restoration and repository inspection related to prefix caching.
1 call · #0235–#0235
cat > <path> <script>git checkout <flag> <args>echo <val>git status --shortRequested script or workload execution related to source & workspace.
1 call · #0236–#0236
python3 <script>echo <val>Requested file and log inspection and source searches related to source & workspace.
1 call · #0237–#0237
tail -n <n> <path> <n> > <path>grep -v -E <val>echo <val>Requested repository inspection related to attention kernels.
1 call · #0238–#0238
git diff <path>Requested script or workload execution related to source & workspace.
2 calls · #0239–#0240
python3 -c <script>Requested file and log inspection and source searches related to source & workspace.
1 call · #0241–#0241
tail -n <n> <path> <n> > <path>grep -v -E <val>echo <val>Requested source searches and file and log inspection related to attention kernels.
1 call · #0242–#0242
echo <val>grep -n <val> <path>head -n <n>echogrep -r -n <flag> <args>sed -n <val> <path>Requested file and log inspection and workspace file updates related to benchmark & validation setup.
1 call · #0243–#0243
cat > <path> <script>chmod <val> <path>echo <val>Requested file and log inspection and source searches related to source & workspace.
1 call · #0244–#0244
tail -n <n> <path> <n> > <path>grep -v -E <val>echo <val>Requested script or workload execution and file and log inspection related to batching & scheduling.
1 call · #0245–#0245
timeout <n> <val> -m <val> <path> -q -p <val> <n> >& <path>tail -n <n>Requested script or workload execution related to source & workspace.
1 call · #0246–#0246
python3 -c <script>Requested repository inspection related to source & workspace.
1 call · #0247–#0247
git status --shortecho <flag>git diff --statRequested source searches and script or workload execution related to runtime processes.
1 call · #0248–#0248
grep -E <val> <path> <n> > <path>echo <val><command> <args>python3 - <val> <script>Requested runtime inspection, file and log inspection and process termination related to benchmark & validation setup.
1 call · #0249–#0249
echo <val>pgrep <flag> <args>head -n <n>pkill -f <val>sleep <n>bash <script> <n> >& <path>tail -n <n>Requested script or workload execution and file and log inspection related to attention kernels.
1 call · #0250–#0250
timeout <n> <val> -m <val> <path> -q -p <val> <n> >& <path>tail -n <n>Requested script or workload execution related to source & workspace.
1 call · #0251–#0251
python3 -c <script>Requested environment setup or inspection, file and log inspection and workspace inspection related to speculative decoding.
1 call · #0252–#0252
env <vars>cat > <path> <script>echo <val>ls <val>Requested file and log inspection related to source & workspace.
1 call · #0253–#0253
tail -n <n> <path> <n> > <path>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0254–#0254
python3 -c <script>Requested repository inspection, source searches and file and log inspection related to source & workspace.
2 calls · #0255–#0256
echo <val>git status --shortechogit status --short <flag> <args>grep -v -E <val>head -n <n>find <path> -name <val> <flag> <args>git status --short <val>git diff --statgit diff <path>Requested runtime inspection, source searches and file and log inspection related to device memory.
1 call · #0257–#0257
echo <val>ps -p <n> -o <val> <flag> <args>cut <flag>echopgrep <flag> <args>echo <path><command> <args>grep -E <val>npu-smi info <n> >& <path>sed -n <val>Requested file and log inspection related to source & workspace.
1 call · #0258–#0258
tail -n <n> <path> <n> > <path>cut <flag>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0259–#0259
python3 -c <script>Requested file and log inspection and source searches related to source & workspace.
1 call · #0260–#0260
tail -n <n> <path> <n> > <path>cut <flag>grep -v -E <val>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0261–#0261
python3 -c <script>Requested runtime inspection and file and log inspection related to device memory.
1 call · #0262–#0262
echo <val>pgrep <flag> <args>cut <flag>echonpu-smi info <n> >& <path>sed -n <val>cat <path> <n> > <path>Requested repository inspection, file and log inspection and workspace inspection related to runtime processes.
1 call · #0263–#0263
echo <val>git status --short <flag> <args>head -n <n>echols -d <val> <n> > <path>find <path> -maxdepth <n> -name <val> <flag> <args>ls <val>wc -lRequested file and log inspection, workspace inspection and source searches related to benchmark & validation setup.
2 calls · #0264–#0265
echo <val>tail -n <n> <path> <n> > <path>cut <flag>echodate -u <val><command> <args>test -f <path>stat -c <val> <path>ls <val>grep -c <val>Requested runtime inspection related to benchmark & validation setup.
1 call · #0266–#0266
pgrep <flag> <args>cut <flag>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0267–#0267
python3 -c <script>Requested workspace inspection, file and log inspection and source searches related to batching & scheduling.
1 call · #0268–#0268
date -u <val>echo <val>ls <path> <n> > <path>wc -lls -t <path> <n> > <path>head -n <n>xargs -r <val> -c <val>cut <flag>ls <val>grep -c <val>echo <path>grep -E <val> <path> <n> > <path>tail -n <n>grep <flag> <args>Requested script or workload execution related to source & workspace.
2 calls · #0269–#0270
python3 -c <script>date -u <val>Requested file and log inspection, source searches and runtime inspection related to batching & scheduling.
1 call · #0271–#0271
echo <val>tail -n <n> <path> <n> > <path>cut <flag>grep <flag> <args>pgrep -f <val> > <path>Requested repository inspection and script or workload execution related to attention kernels.
1 call · #0272–#0272
git status --shortecho <val>git diff --numstatecho <path>python3 -m <module> <script> <script> <script>Requested environment setup or inspection, file and log inspection and workspace inspection related to device memory.
1 call · #0273–#0273
env <vars>echo <val>cat <path>ls <val><command> <args>grep -q <val> <path>Requested file and log inspection, source searches and runtime inspection related to batching & scheduling.
1 call · #0274–#0274
echo <val>tail -n <n> <path> <n> > <path>cut <flag>grep <flag> <args>test -f <path>pgrep -f <val> > <path>Requested script or workload execution related to source & workspace.
1 call · #0275–#0275
python3 -c <script>date -u <val>Requested workspace inspection, file and log inspection and workspace file updates related to attention kernels.
1 call · #0276–#0276
find <path> -name <val> <flag> <args>head -n <n>echo <flag>rm -rf <path> <path> <path> <n> > <path>echo <val>git status --short <flag> <args>Requested execution waits, source searches and workspace inspection related to batching & scheduling.
1 call · #0277–#0277
<command> <args>sleep <n>date -u <val>echo <val>grep <flag> <args>find <val> -name <val> <flag> <args>wc -ltest -f <path>pgrep -f <val> > <path>tail -n <n> <path> <n> > <path>cut <flag>Requested script or workload execution related to source & workspace.
1 call · #0278–#0278
python3 -c <script>Requested execution waits, script or workload execution and runtime inspection related to benchmark & validation setup.
1 call · #0279–#0279
<command> <args>test -f <path>sleep <n>date -u <val>python3 -c <script>echo <val>pgrep -f <val> > <path>Requested script or workload execution related to source & workspace.
1 call · #0280–#0280
python3 -c <script>Requested workspace file updates, script or workload execution and file and log inspection related to device memory.
2 calls · #0281–#0282
cp <path> <path> <path> <n> > <path>bash <script> <n> >& <path>tail -n <n>echo <val>pgrep <flag> <args>cut <flag>echo <path>test -f <path><command> <args>grep -E <val>npu-smi info <n> >& <path>sed -n <val>git <val> <val>tail -n <val>head -n <n>git status --short <flag> <args>python3 - <script>Requested script or workload execution and file and log inspection related to batching & scheduling.
1 call · #0283–#0283
timeout <n> <val> -m <val> <path> <path> -q -p <val> <n> >& <path>tail -n <n>Requested script or workload execution related to benchmark & validation setup.
1 call · #0284–#0284
<command> <args>echo <val>python3 -c <script>Requested script or workload execution related to source & workspace.
1 call · #0285–#0285
python3 -c <script>Requested repository inspection and file and log inspection related to batching & scheduling.
1 call · #0286–#0286
echo <val>git status --short <flag> <args>echogit diff --numstatecho <path>awk <val><command> <args>Requested file and log inspection related to source & workspace.
1 call · #0287–#0287
echo <val>sed -n <val> <path> <n> > <path>cut <flag>Requested workspace inspection related to attention kernels.
1 call · #0288–#0288
echo <val>stat -c <val> <path> <path> <path>cut <flag>echodiff -q <path> <path>Requested runtime inspection, workspace inspection and file and log inspection related to benchmark & validation setup.
1 call · #0289–#0289
echo <val>pgrep <flag> <args>cut <flag>echofind <path> <val> -name <val> <flag> <args>head -n <n>truefind <path> -name <val> <flag> <args>git status --short <flag> <args>Requested script or workload execution related to source & workspace.
1 call · #0290–#0290
python3 -c <script>Requested script or workload execution and file and log inspection related to source & workspace.
1 call · #0291–#0291
bash <script> > <path> <n> >& <path>echo <val>python3 -c <script> <n> > <path>tail -n <n> <path>Requested script or workload execution and file and log inspection related to benchmark & validation setup.
1 call · #0292–#0292
bash <script> > <path> <n> >& <path>echo <val>echo <flag>tail -n <n> <path>cut <flag>Requested script or workload execution related to source & workspace.
1 call · #0293–#0293
python3 -c <script>Requested source searches, runtime inspection and file and log inspection related to device memory.
1 call · #0294–#0294
echo <val><command> <args>echo <path>test -f <path>grep -E <val>pgrep <flag> <args>cut <flag>npu-smi info <n> >& <path>sed -n <val>Requested workspace inspection, file and log inspection and source searches related to batching & scheduling.
1 call · #0295–#0295
ls <path> <n> > <path>head -n <n>echo <val>grep -n <val> <path>Requested script or workload execution related to source & workspace.
1 call · #0296–#0296
python3 -c <script>Requested environment setup or inspection, file and log inspection and repository inspection related to device memory.
1 call · #0297–#0297
env <vars>cat > <path> <script>cat >> <path> <script>echo <val>git status --short <flag> <args>Requested environment setup or inspection, file and log inspection and source searches related to device memory.
1 call · #0298–#0298
env <vars>echo <val>cat -n <path>sort <path>uniq -dhead -n <n>true<command> <args>grep -q <val> <path>Requested script or workload execution related to latency & request handling.
1 call · #0299–#0299
python3 -c <script>Requested script or workload execution related to source & workspace.
1 call · #0300–#0300
python3 -c <script>03 / CANDIDATE ARTIFACT
Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.
Base commit: 340db9201005fc64635bb25db1d2538f955761c3
@@ -430,7 +430,14 @@ class AscendAttnBackend(AttentionBackend): def init_forward_metadata(self, forward_batch: ForwardBatch): """Init the metadata for a forward pass.""" self.forward_metadata = ForwardMetadata()- seq_lens_max = forward_batch.seq_lens.max()+ # Read the slice bound from the host mirror when it exists: using a+ # device tensor as a Python slice bound forces a device->host sync on+ # every forward pass. `seq_lens_cpu` is None only on the gpu_only+ # (speculative) path, which keeps the original device read.+ if forward_batch.seq_lens_cpu is not None:+ seq_lens_max = int(forward_batch.seq_lens_cpu.max())+ else:+ seq_lens_max = forward_batch.seq_lens.max() if forward_batch.forward_mode.is_target_verify(): seq_lens_max += self.speculative_num_draft_tokens elif (@@ -459,9 +466,18 @@ class AscendAttnBackend(AttentionBackend): ) if forward_batch.extend_seq_lens is not None: self.forward_metadata.extend_seq_lens = forward_batch.extend_seq_lens- self.forward_metadata.extend_seq_lens_cpu_int = (- forward_batch.extend_seq_lens.cpu().int()- )+ # Build the host copy from the existing host list instead of a D2H+ # copy of the device tensor (same construction the cuda-graph path+ # already uses). Falls back to the device copy when the host mirror+ # is absent (gpu_only / speculative batches).+ if forward_batch.extend_seq_lens_cpu is not None:+ self.forward_metadata.extend_seq_lens_cpu_int = torch.tensor(+ forward_batch.extend_seq_lens_cpu, dtype=torch.int32+ )+ else:+ self.forward_metadata.extend_seq_lens_cpu_int = (+ forward_batch.extend_seq_lens.cpu().int()+ ) if forward_batch.seq_lens is not None: self.forward_metadata.seq_lens = forward_batch.seq_lens.int() else:@@ -865,6 +865,27 @@ class PrefillAdder: else AddReqResult.CONTINUE ) + def _fits_within_chunk_page_slack(self, cand_extend_input_len: int) -> bool:+ """Whether a request overshooting `rem_chunk_tokens` by less than one page+ should still be admitted whole instead of being split.++ Splitting off a sub-page tail costs a whole extra forward pass, and+ `_update_prefill_budget` already rounds every admission up to a page+ boundary — so a tail of fewer than `page_size` tokens is charged a full+ page anyway. Taking the small overshoot now is therefore cheaper in both+ latency and KV accounting than deferring it to its own pass.++ The overshoot is bounded by one page and only the *soft* per-batch chunk+ cap is exceeded; the hard KV-memory gates (`rem_total_tokens` /+ `cur_rem_tokens`, and the ignore-EOS reserve scan) are checked against+ the full `cand_extend_input_len` before this point, so admission cannot+ over-commit the pool. Requires a positive remaining budget so an+ exhausted chunk budget still stops admission.+ """+ if self.rem_chunk_tokens is None or self.rem_chunk_tokens <= 0:+ return False+ return cand_extend_input_len - self.rem_chunk_tokens < self.page_size+ def add_chunked_req(self, req: Req): if self.dllm_config is not None: _rem_tokens = self._get_dllm_remain_tokens()@@ -1020,6 +1041,7 @@ class PrefillAdder: elif ( self.rem_chunk_tokens is None # chunked prefill is disabled or cand_extend_input_len <= self.rem_chunk_tokens # it is the last chunk+ or self._fits_within_chunk_page_slack(cand_extend_input_len) ): # Non-chunked prefill — the whole sequence is committed this iter. req.set_extend_range(@@ -0,0 +1,152 @@+"""Unit tests for sub-page chunk tolerance in ignore-EOS prefill admission.++Covers `PrefillAdder._fits_within_chunk_page_slack`: a request that overshoots+the soft per-batch chunk budget by less than one page is admitted whole instead+of being split into a sub-page tail that would need its own forward pass.++Plain unittest module (no CI registration): registered suites live under+test/registered/, which the pre-commit guard keeps out of the shipped package.+Run directly with `python -m pytest python/sglang/test/test_prefill_adder_page_slack.py`.+"""++import unittest+from types import SimpleNamespace+from unittest.mock import MagicMock++from sglang.srt.managers.schedule_batch import Req+from sglang.srt.managers.schedule_policy import AddReqResult, PrefillAdder+from sglang.srt.mem_cache.base_prefix_cache import DecLockRefResult, IncLockRefResult+from sglang.srt.server_args import ServerArgs, set_global_server_args_for_scheduler+from sglang.srt.utils.common import Range+from sglang.test.test_utils import CustomTestCase+++class TestPrefillAdderChunkPageSlack(CustomTestCase):+ def setUp(self):+ set_global_server_args_for_scheduler(ServerArgs(model_path="dummy"))++ def create_adder(self, *, page_size, rem_chunk_tokens):+ tree_cache = MagicMock()+ tree_cache.full_evictable_size.return_value = 0+ tree_cache.swa_evictable_size.return_value = 0+ tree_cache.evictable_size.return_value = 0+ tree_cache.disable = True+ tree_cache.inc_lock_ref.return_value = IncLockRefResult()+ tree_cache.dec_lock_ref.return_value = DecLockRefResult()++ allocator = MagicMock()+ allocator.full_available_size.return_value = 0+ allocator.swa_available_size.return_value = 0+ # Ample KV so the hard memory gates never fire; these tests isolate the+ # soft per-batch chunk budget.+ allocator.available_size.return_value = 1_000_000++ running_batch = MagicMock()+ running_batch.reqs = []++ return PrefillAdder(+ page_size=page_size,+ tree_cache=tree_cache,+ token_to_kv_pool_allocator=allocator,+ running_batch=running_batch,+ new_token_ratio=1.0,+ rem_input_tokens=10_000,+ rem_chunk_tokens=rem_chunk_tokens,+ num_mixed_decode_tokens=0,+ priority_scheduling_preemption_threshold=0,+ )++ def create_req(self, *, input_len, max_new_tokens=128):+ """Mock Req on the ignore-EOS admission path.++ `origin_input_ids` must be a real sequence: the ignore-EOS reserve scan+ measures occupancy as len(origin_input_ids) + len(output_ids), and+ `set_extend_range` is wired to a real `Range` because the adder charges+ the budget from `req.extend_range.length`.+ """+ req = MagicMock(spec=Req)+ req.rid = "short"+ req.prefix_indices = []+ req.full_untruncated_fill_ids = list(range(input_len))+ req.origin_input_ids = list(range(input_len))+ req.output_ids = []+ req.sampling_params = SimpleNamespace(+ max_new_tokens=max_new_tokens, ignore_eos=True+ )+ req.retracted_stain = False+ req.host_hit_length = 0+ req.mamba_pool_idx = None+ req.finished.return_value = False+ req.needs_host_load_back.return_value = False++ def _set_extend_range(start, end):+ req.extend_range = Range(start, end)++ req.set_extend_range.side_effect = _set_extend_range+ return req++ def test_admits_whole_request_within_page_slack(self):+ """A 512-token request overshooting a 505-token budget by 7 tokens is+ admitted whole.++ This is the mixed-chunk case: `rem_chunk_tokens` is reduced by one token+ per running decode, so an exactly-page-sized request would otherwise be+ split and its sub-page tail charged a whole extra forward pass.+ """+ adder = self.create_adder(page_size=128, rem_chunk_tokens=505)+ req = self.create_req(input_len=512)++ adder.add_one_req_ignore_eos(req)++ self.assertEqual(len(adder.can_run_list), 1)+ self.assertIsNone(adder.new_chunked_req)+ self.assertEqual(req.extend_range, Range(0, 512))++ def test_splits_when_overshoot_reaches_one_page(self):+ """An overshoot of a full page is still split: the tail is a whole page+ of real work, so deferring it wastes no page charge."""+ adder = self.create_adder(page_size=128, rem_chunk_tokens=384)+ req = self.create_req(input_len=512)++ adder.add_one_req_ignore_eos(req)++ self.assertIs(adder.new_chunked_req, req)+ self.assertEqual(req.extend_range, Range(0, 384))++ def test_rejects_when_chunk_budget_exhausted(self):+ """An exhausted chunk budget still stops admission: the slack allowance+ requires a positive remaining budget."""+ adder = self.create_adder(page_size=128, rem_chunk_tokens=0)+ req = self.create_req(input_len=512)++ result = adder.add_one_req_ignore_eos(req)++ self.assertEqual(result, AddReqResult.OTHER)+ self.assertEqual(adder.can_run_list, [])+ self.assertIsNone(adder.new_chunked_req)++ def test_page_size_one_has_no_slack(self):+ """With page_size=1 there is no page rounding to exploit, so the original+ split-on-any-overshoot behavior is preserved."""+ adder = self.create_adder(page_size=1, rem_chunk_tokens=511)+ req = self.create_req(input_len=512)++ adder.add_one_req_ignore_eos(req)++ self.assertIs(adder.new_chunked_req, req)+ self.assertEqual(req.extend_range, Range(0, 511))++ def test_overshoot_stops_further_admission(self):+ """After an over-admission the chunk budget goes negative, so+ `budget_state` reports OTHER and the scheduler's admission loop breaks.+ This bounds the overshoot to one request per prefill pass."""+ adder = self.create_adder(page_size=128, rem_chunk_tokens=505)++ result = adder.add_one_req_ignore_eos(self.create_req(input_len=512))++ self.assertEqual(result, AddReqResult.OTHER)+ self.assertLessEqual(adder.rem_chunk_tokens, 0)+++if __name__ == "__main__":+ unittest.main()