CAPY.BENCH
GitHub

DeepSeek Harness / deepseek-flash

Passed all 46/46 self-authored ExUnit tests yet missed 2 specification slices in post-run live verification — while S3 (Send one bounded GET) absorbed 21.4% of total budget ($0.03, 17 calls). Read failure diagnosis ↓

Outcome
5/7 slices
Agent marked 7/7 [x] (S3, S6 failed audit) · 46/46 ExUnit tests passed
Time Elapsed
31m
Range 14m–1h 51m (28 runs)
Estimated Cost
$0.14
2026 DeepSeek Flash API - Off-Peak (98% cache off)
Verification Divergence:

Finished in 57.4 seconds (0.9s async, 56.4s sync) - 46 passed (57.2s-57.5s in JSONL at Steps 104-107; mix format --check-formatted clean; mix credo: 57 checks / mix credo --strict: 69 checks on 20 files, 197 mods/funs, 0 issues) (Agent checked off 7/7 in PLAN.md and passed 46/46 ExUnit tests; post-run holdout audit rejected S3, S6.)

Test suite & secondary run metricsTests, context, calls & commits
Test Suite
46/46
100% passed (57.4s)
Total Tokens
13.36M
99.49% cache hit · 67.5k uncached · 151.2k out
LLM & Tool Calls
126 turns
133 tool executions
Peak Context
203.0k peak
6,648 → 202,954 prompt tokens; 203,592 total; 1,048,576 window
Git Commits
9
Recorded in commit log below

Field Notes / 4 Observations

  1. Manual Note vs. Lossless Session Audit: 31m 12.2s Wall-Clock (31m13s Note), dsh v0.2.2-rc.5 --native Mode, 9 Agent Commits & 46/46 Clean Credo Suite(3 points)Exact Wall-Clock Alignment (31m13s Note vs. 31m 12.2s Session Log) · Native Harness Mode (dsh v0.2.2-rc.5) & 9 Agent Commits · Test Suite & Credo Parity
    • Exact Wall-Clock Alignment (31m13s Note vs. 31m 12.2s Session Log) Following the pre-run init commit (b95a4fe at 06:07:25 WIB), session-97fcf525-ded1-40bc-b346-9aea960da3a8 opened at 2026-11-19T23:08:23.038Z (2026-11-20 06:08:23.038 WIB) and completed turn/end (reason: completed) at 06:39:35.211 WIB for an exact active duration of 31m 12.17s (1,872.17s / 31m). Projected 20261119T230822Z.events.jsonl (657 events) matches the exact token totals via its 126 status step_end usage records, while lossless records/sessions/.../session.v4.jsonl.zstd (1,045 events) supplies per-event wall-clock timestamps and request/header metadata (model, reasoningEffort, contextWindow, advertised tools).
    • Native Harness Mode (dsh v0.2.2-rc.5) & 9 Agent Commits request/header (seq 15) confirms provider: "deepseek-official", model: "deepseek-flash", reasoningEffort: "high", contextWindow: 1,048,576, and 24 native tools (bash, read, write, edit, glob, grep, job_*, subagent*, todo_write, web_*, workflow, etc.) with AGENTS.md and workspace skills auto-injected. Starting from b95a4fe (init), the agent produced 9 organic commits (7ba7562 S1 through 04899b1 S7, 411a4c9 release verification, and 9ee659a switching kill -USR2 to portable kill -s USR2 in cb), 885 production LoC across 6 modules (lib/capy_bench/*.ex), and 1,362 test LoC across 15 files.
    • Test Suite & Credo Parity: Manual mix test (46/46 passed in 57.4s [0.9s async, 56.4s sync]) matches the in-session backgrounded runs (57.5s at Step 104 and 57.2s at Step 106-107), mix format --check-formatted passed cleanly, and Credo passed with 0 issues (57 default checks / 69 --strict checks across 20 files, 197 mods/funs).
  2. Why S3 & S6 Failed Holdout (5/7 vs. 7/7 Claimed): discard_exact/2 Double-Counted Partial recv Chunks, Breaking Live Chunked HTTPS (0/26) & Early-Returning Multi-Packet Bodies(2 points)Root Cause at lib/capy_bench/http.ex:340 (discard_exact/2 Recursion Bug) · Live HTTPS & Multi-Packet Holdout Failures (S3 & S6)
    • Root Cause at lib/capy_bench/http.ex:340 (discard_exact/2 Recursion Bug) When streaming a fixed-length body or HTTP/1.1 chunk size across multiple socket reads, discard_exact/2 receives data smaller than remaining and recurses with discard_exact(%{conn | buffer: data}, remaining - byte_size(data)) instead of %{conn | buffer: <<>>}. Because byte_size(data) is simultaneously subtracted from remaining AND retained in conn.buffer, the next recursive frame counts those bytes a second time. The bug was written in Step 62 and survived Step 70's binary_part/3 buffer-slicing patch untouched.
    • Live HTTPS & Multi-Packet Holdout Failures (S3 & S6) Against live https://rizafahmi.com (Transfer-Encoding: chunked), discard_exact/2 terminates mid-chunk leaving body bytes in conn.buffer, causing expect_crlf/1 to return {:error, :invalid_response} on every single request (./cb https://rizafahmi.com exited 1 with Started: 26, HTTP responses: 0, Transport failures: 26, whereas ./cb http://rizafahmi.com passed with 49/49 HTTP 301 and https://example.com succeeded only because its tiny response fit in one TLS record). On a local multi-packet Content-Length: 20 server sending 10 bytes, sleeping 500 ms, then sending the final 10 bytes, CapyBench.HTTP.get/2 returned {:ok, 200, 21ms} without reading the second half - violating both S3 (stream and discard complete body) and S6 (latency ends at body completion). Local tests missed the bug because http_test.exs's chunked test sent tiny 5-byte chunks ("hello", " ", "world") in single TCP writes.
  3. Clean Post-Boot S7 Ctrl-C via +Bi + SIGUSR2 (Boot-Window Exit 159 Race) & Unnoticed OTP TLS [notice] Pollution on stdout(3 points)All Post-Boot Foreground PTY Ctrl-C Probes Passed (S7 Verified) · Cold Boot-Window Ctrl-C Exit 159 Race & Step 99-103 Test Fixes · False PLAN.md Claim on TLS Diagnostics (stdout vs. stderr)
    • All Post-Boot Foreground PTY Ctrl-C Probes Passed (S7 Verified) Unlike omp-deepseek-v4-flash's SIGTERM :erl_signal_handler bug, dsh chose emu_args: "+Bi" with cb forwarding INT as kill -s USR2 "$child" into System.trap_signal(:sigusr2, ...) in CapyBench.CLI.main/1. Every post-boot foreground PTY probe exited 130 with a single valid partial summary on stdout, empty stderr, and intact started == responses + failures: 0.8s pacing (Started: 6, 200: 6), 0.4s and 0.8s during a 1.5s slow request (Elapsed: 1.51-1.52s, Started: 1, 200: 1), and 0.8s and 1.2s during a 3.5s stalled request (Elapsed: 2.00s, Started: 1, Transport failures: 1).
    • Cold Boot-Window Ctrl-C Exit 159 Race & Step 99-103 Test Fixes Because cb runs "$here/cb_escript" "$@" & without ( trap '' USR2; exec ... ) or a readiness handshake, sending \x03 during the first 50-250ms of cold BEAM startup kills cb_escript with default POSIX SIGUSR2 disposition (User defined signal 2: 31, exit 159, matching omp-gemini-4-argon and agy-gemini-4-hydrogen). The agent actually hit exit 159 at Step 99 when ctrl_c_test.exs sent Ctrl-C at 300-350ms, and worked around it at Step 101 by bumping test delays to 900-1,000ms (then fixed a Python-escaped \\\\d regex typo at Step 103).
    • False PLAN.md Claim on TLS Diagnostics (stdout vs. stderr) PLAN.md release verification claimed "argument errors and TLS diagnostics were on stderr", but Step 112's own log shows CapyBench.HTTP.tls_opts/1 omitted log_level: :none, causing OTP :ssl to dump 49 [notice] TLS :client: ... generated CLIENT ALERT: Fatal - Unknown CA blocks onto stdout ahead of Target: while stderr stayed empty.
  4. Leaderboard-Record 99.49% Prefix Cache Hit ($0.14 Off-Peak / ¥0.94 vs. $0.28 Peak), 49-Step Upfront Recon & Zero write/edit Tool Usage (36 Inline Python Patches)(3 points)Off-Peak Unit Economics & Record 99.49% Cache Stability · 42.2% Inference vs. 57.7% Tool Wall-Clock Split & 49-Step Upfront Recon · Zero write/edit Calls Despite 24 Native Tools & Tool-Error Audit
    • Off-Peak Unit Economics & Record 99.49% Cache Stability Running Thu 23:08-23:39 UTC (DeepSeek Off-Peak window: $0.15 / $0.003 / $0.60 USD = ¥1.00 / ¥0.02 / ¥4.00 CNY per 1M), deepseek-flash consumed 67,508 uncached input ($0.0101), 13,144,832 cached input ($0.0394, 99.49% hit rate - highest on the leaderboard with 125/125 post-Step-1 cache hits and zero evictions across monotonic 6,648 -> 202,954 prompt growth), and 151,208 output tokens ($0.0907, 64.7% of spend; dsh bundles reasoning tokens inside outputTokens, streaming 367,506 reasoning chars across all 126 steps). Exact totals: $0.140285 ($0.14 Off-Peak / ¥0.9352 CNY; $0.28 Peak equivalent; $2.0726 Off-Peak uncached counterfactual = 93.2% cache savings).
    • 42.2% Inference vs. 57.7% Tool Wall-Clock Split & 49-Step Upfront Recon LLM inference took 790.6s (6.27s/turn avg, 0.65s avg TTFT; peaking at 58.3s / 12,078 output tokens on Step 46 inspecting :public_key.pkix_test_data and 49.4s / 13,091 output tokens on Step 62 synthesizing http.ex), while tool execution took 1,080.1s (57.7%). Spending 49 steps (7m 01s, $0.04 / 28% of spend) on upfront PKI/SAN and +Bi/SIGUSR2 probes paid off in S1-S7 (only 59 steps for all seven slices) but added ~9m vs. omp-deepseek-v4-flash.
    • Zero write/edit Calls Despite 24 Native Tools & Tool-Error Audit Despite dsh --native exposing write, edit, glob, and grep, the model made 126 bash, 4 read, 2 job_output, and 1 job_kill calls (1.06 tools/turn, 7 multi-tool turns), creating files via 12 cat > heredocs and patching code via 36 inline python3 scripts. dsh flagged 0 isError: true results, while bash output contained 3 non-zero probe exits (Steps 12, 13, 29), 1 hung background probe killed via job_kill (Steps 25-27, 60s), 2 backgrounded full-suite test runs awaited via job_output (Steps 104-107), 2 compile warnings/errors (Steps 63, 79), 3 mix credo --strict catches (Steps 73, 74, 82), and 3 red-phase/test-fix mix test failures (Steps 89, 99, 101).
Slice / Phase Breakdown9 phases · 126 LLM calls · $0.14 · peak in S3

Slice / Phase Breakdown / 9 Phases

Step Range spans transcript events (LLM + tool + system turns) · LLM Calls count completed model inference turns

Per-stage slice breakdown of step ranges, LLM calls, thinking tokens, and cost
Slice / PhaseStep RangeLLM CallsEstimated Cost
PrepPreparation & OTP 28 SIGUSR2 / PKI reconnaissance
1–49(49 steps)49
$0.04 (29%)Peak
S1 PassS1: CLI help, +Bi escript & SIGUSR2 launcher (7ba7562)
50–57(8 steps)8
$0.01 (7%)
S2 PassS2: Strict CLI argument & URL validation (d25e80f)
58–61(4 steps)4
$0.00
S3 MissS3: Raw :gen_tcp/:ssl GET client, TLS & test servers (b610c85)
62–78(17 steps)17
$0.03 (21%)
S4 PassS4: Paced 5s single-flight runner & deterministic tests (91f30fe)
79–86(8 steps)8
$0.01 (7%)
S5 PassS5: Status summary formatting & exit codes (e86634d)
87–93(7 steps)7
$0.01 (7%)
S6 MissS6: Elapsed time & completed-response p50/p95 latencies (eda03c8)
94–98(5 steps)5
$0.01 (7%)
S7 PassS7: Foreground PTY Ctrl-C partial summary & exit 130 (04899b1)
99–108(10 steps)10
$0.01 (7%)
PostRelease verification & portable kill -s USR2 fix (411a4c9, 9ee659a)
109–126(18 steps)18
$0.02 (14%)
Total (9 phases)126 steps126$0.14
Tokens, Cache & Cost13.36M tokens · 99.49% cache hit · 2026 DeepSeek Flash API - Off-Peak (98% cache off)

Tokens, Cache & Cost / 2026 DeepSeek Flash API - Off-Peak (98% cache off)

Total Tokens
13.36M(67.5k uncached · 151.2k out)
Cache Hit Rate
99.49%(13.14M / 13.21M prompt)
Peak Context
203.0k peak(6,648 → 202,954 prompt tokens; 203,592 total; 1,048,576 window)
Cache Savings
-$1.93 (93.2%)(vs $2.07 uncached)
Unit Economics
$0.03 / slice(2.67M tok/slice)
Tool Precision
100% ok(0 err / 133 calls)
Token volume and estimated cost breakdown
ComponentTokensRateEstimated Cost
Uncached Input67,508$0.15 / 1M$0.010126
Cached Input (cacheReadTokens)13,144,832$0.003 / 1M (98% off)$0.039434
Output (reasoning bundled by dsh)151,208$0.60 / 1M$0.090725
Total13,363,548—$0.14 ($0.140285)
Calls & Tool Breakdown126 LLM turns · 133 tool executions

Calls & Tool Breakdown / Tool Loop

LLM Inference Turns
126completed agent_response steps
Tool Executions
133133 succeeded
  • tool/bash
    126(95% · 126 ok)
  • tool/read
    4(3% · 4 ok)
  • tool/job_output
    2(2% · 2 ok)
  • tool/job_kill
    1(1% · 1 ok)
Command & Interface UsedCLI · Single-prompt workflow

Command / Interface Used / CLI

dsh headless --patch <native-bench-patch.yml> --permission-mode danger-full-access --approval-policy never --json < PROMPT.md (via run_dsh.fish -m deepseek-flash -t high --native)

Run window: 06:08:23-06:39:35 WIB (31m 12.2s / 1,872.2s wall-clock in session.v4.jsonl.zstd; 31m13s in manual note, 06:07:25 git init) • Session session-97fcf525-ded1-40bc-b346-9aea960da3a8 (deepseek-official / deepseek-flash, reasoningEffort: high, dsh v0.2.2-rc.5 --native mode with 24 tools advertised, 126 LLM steps, 0 compactions)

Git Commits10 checkpoints · Riza Fahmi

Git Commits / 10 Checkpoints

Author: Riza Fahmi · Timestamps relative to post-run capture

  1. 9ee659aUse portable kill syntax in launcher
    -2 hours
  2. 411a4c9Verify V1 release
    -2 hours
  3. 04899b1S7S7: handle Ctrl-C with partial summary
    -2 hours
  4. eda03c8S6 MissS6: report timing
    -2 hours
  5. e86634dS5S5: report outcomes and exit codes
    -2 hours
  6. 91f30feS4S4: run paced five-second loop
    -2 hours
  7. b610c85S3 MissS3: send bounded GET requests
    -2 hours
  8. d25e80fS2S2: validate CLI arguments
    -3 hours
  9. 7ba7562S1S1: launch cb CLI
    -3 hours
  10. b95a4feinit
    -3 hours