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)
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 metrics
- 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
Plan Completion / 5 of 7 Slices
+67 prep/wrap-up calls · $0.06 ↓- S1: PassedLaunch the CLI
- S2: PassedValidate arguments
- S3: MissedSend one bounded GET
- S4: PassedRun a paced five-second loop
- S5: PassedReport outcomes and exit codes
- S6: MissedReport timing
- S7: PassedHandle Ctrl-C
Field Notes / 4 Observations
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 (
31m13sNote vs.31m 12.2sSession Log) Following the pre-runinitcommit (b95a4feat06:07:25 WIB),session-97fcf525-ded1-40bc-b346-9aea960da3a8opened at2026-11-19T23:08:23.038Z(2026-11-20 06:08:23.038 WIB) and completedturn/end(reason: completed) at06:39:35.211 WIBfor an exact active duration of31m 12.17s(1,872.17s/31m). Projected20261119T230822Z.events.jsonl(657 events) matches the exact token totals via its126statusstep_endusagerecords, while losslessrecords/sessions/.../session.v4.jsonl.zstd(1,045 events) supplies per-event wall-clock timestamps andrequest/headermetadata (model,reasoningEffort,contextWindow, advertisedtools). - Native Harness Mode (
dsh v0.2.2-rc.5) & 9 Agent Commitsrequest/header(seq 15) confirmsprovider: "deepseek-official",model: "deepseek-flash",reasoningEffort: "high",contextWindow: 1,048,576, and24native tools (bash,read,write,edit,glob,grep,job_*,subagent*,todo_write,web_*,workflow, etc.) withAGENTS.mdand workspace skills auto-injected. Starting fromb95a4fe(init), the agent produced9organic commits (7ba7562S1 through04899b1S7,411a4c9release verification, and9ee659aswitchingkill -USR2to portablekill -s USR2incb),885production LoC across 6 modules (lib/capy_bench/*.ex), and1,362test LoC across 15 files. - Test Suite & Credo Parity: Manual
mix test(46/46passed in57.4s[0.9s async, 56.4s sync]) matches the in-session backgrounded runs (57.5sat Step 104 and57.2sat Step 106-107),mix format --check-formattedpassed cleanly, and Credo passed with0issues (57default checks /69--strictchecks across20files,197 mods/funs).
- Exact Wall-Clock Alignment (
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/2Recursion Bug) When streaming a fixed-length body or HTTP/1.1 chunk size across multiple socket reads,discard_exact/2receivesdatasmaller thanremainingand recurses withdiscard_exact(%{conn | buffer: data}, remaining - byte_size(data))instead of%{conn | buffer: <<>>}. Becausebyte_size(data)is simultaneously subtracted fromremainingAND retained inconn.buffer, the next recursive frame counts those bytes a second time. The bug was written in Step 62 and survived Step 70'sbinary_part/3buffer-slicing patch untouched. - Live HTTPS & Multi-Packet Holdout Failures (S3 & S6) Against live
https://rizafahmi.com(Transfer-Encoding: chunked),discard_exact/2terminates mid-chunk leaving body bytes inconn.buffer, causingexpect_crlf/1to return{:error, :invalid_response}on every single request (./cb https://rizafahmi.comexited1withStarted: 26, HTTP responses: 0, Transport failures: 26, whereas./cb http://rizafahmi.compassed with49/49HTTP301andhttps://example.comsucceeded only because its tiny response fit in one TLS record). On a local multi-packetContent-Length: 20server sending10bytes, sleeping500 ms, then sending the final10bytes,CapyBench.HTTP.get/2returned{: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 becausehttp_test.exs's chunked test sent tiny 5-byte chunks ("hello"," ","world") in single TCP writes.
- Root Cause at
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) Unlike
omp-deepseek-v4-flash'sSIGTERM:erl_signal_handlerbug,dshchoseemu_args: "+Bi"withcbforwardingINTaskill -s USR2 "$child"intoSystem.trap_signal(:sigusr2, ...)inCapyBench.CLI.main/1. Every post-boot foreground PTY probe exited130with a single valid partial summary onstdout, emptystderr, and intactstarted == responses + failures:0.8spacing (Started: 6, 200: 6),0.4sand0.8sduring a1.5sslow request (Elapsed: 1.51-1.52s, Started: 1, 200: 1), and0.8sand1.2sduring a3.5sstalled request (Elapsed: 2.00s, Started: 1, Transport failures: 1). - Cold Boot-Window
Ctrl-CExit159Race & Step 99-103 Test Fixes Becausecbruns"$here/cb_escript" "$@" &without( trap '' USR2; exec ... )or a readiness handshake, sending\x03during the first50-250msof cold BEAM startup killscb_escriptwith default POSIXSIGUSR2disposition (User defined signal 2: 31, exit159, matchingomp-gemini-4-argonandagy-gemini-4-hydrogen). The agent actually hit exit159at Step 99 whenctrl_c_test.exssentCtrl-Cat300-350ms, and worked around it at Step 101 by bumping test delays to900-1,000ms(then fixed a Python-escaped\\\\dregex typo at Step 103). - False
PLAN.mdClaim on TLS Diagnostics (stdoutvs.stderr)PLAN.mdrelease verification claimed"argument errors and TLS diagnostics were on stderr", but Step 112's own log showsCapyBench.HTTP.tls_opts/1omittedlog_level: :none, causing OTP:sslto dump49[notice] TLS :client: ... generated CLIENT ALERT: Fatal - Unknown CAblocks ontostdoutahead ofTarget:whilestderrstayed empty.
- All Post-Boot Foreground PTY Ctrl-C Probes Passed (S7 Verified) Unlike
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 Running Thu23:08-23:39 UTC(DeepSeek Off-Peak window:$0.15 / $0.003 / $0.60USD =¥1.00 / ¥0.02 / ¥4.00CNY per 1M),deepseek-flashconsumed67,508uncached input ($0.0101),13,144,832cached input ($0.0394,99.49%hit rate - highest on the leaderboard with125/125post-Step-1 cache hits and zero evictions across monotonic6,648 -> 202,954prompt growth), and151,208output tokens ($0.0907,64.7%of spend;dshbundles reasoning tokens insideoutputTokens, streaming367,506reasoning chars across all 126 steps). Exact totals:$0.140285($0.14Off-Peak /¥0.9352CNY;$0.28Peak equivalent;$2.0726Off-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/turnavg,0.65savg TTFT; peaking at58.3s/12,078output tokens on Step 46 inspecting:public_key.pkix_test_dataand49.4s/13,091output tokens on Step 62 synthesizinghttp.ex), while tool execution took1,080.1s(57.7%). Spending49steps (7m 01s,$0.04/28%of spend) on upfront PKI/SAN and+Bi/SIGUSR2probes paid off in S1-S7 (only59steps for all seven slices) but added~9mvs.omp-deepseek-v4-flash. - Zero
write/editCalls Despite 24 Native Tools & Tool-Error Audit Despitedsh --nativeexposingwrite,edit,glob, andgrep, the model made126bash,4read,2job_output, and1job_killcalls (1.06tools/turn,7multi-tool turns), creating files via12cat >heredocs and patching code via36inlinepython3scripts.dshflagged0isError: trueresults, while bash output contained3non-zero probe exits (Steps12,13,29),1hung background probe killed viajob_kill(Steps25-27,60s),2backgrounded full-suite test runs awaited viajob_output(Steps104-107),2compile warnings/errors (Steps63,79),3mix credo --strictcatches (Steps73,74,82), and3red-phase/test-fixmix testfailures (Steps89,99,101).
- Off-Peak Unit Economics & Record
Slice / Phase Breakdown
Slice / Phase Breakdown / 9 Phases
Step Range spans transcript events (LLM + tool + system turns) · LLM Calls count completed model inference turns
| Slice / Phase | Step Range | LLM Calls | Estimated 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 steps | 126 | $0.14 |
Tokens, Cache & Cost
Tokens, Cache & Cost / 2026 DeepSeek Flash API - Off-Peak (98% cache off)
| Component | Tokens | Rate | Estimated Cost |
|---|---|---|---|
| Uncached Input | 67,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 |
| Total | 13,363,548 | — | $0.14 ($0.140285) |
Calls & Tool Breakdown
Calls & Tool Breakdown / Tool Loop
- LLM Inference Turns
- 126completed agent_response steps
- Tool Executions
- 133133 succeeded
- tool/bash126(95% · 126 ok)
- tool/read4(3% · 4 ok)
- tool/job_output2(2% · 2 ok)
- tool/job_kill1(1% · 1 ok)
Command & Interface Used
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 Commits
Git Commits / 10 Checkpoints
Author: Riza Fahmi · Timestamps relative to post-run capture
9ee659aUse portable kill syntax in launcher411a4c9Verify V1 releaseb95a4feinit