bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timings

Open Beginner friendly
#669 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bash, shell
Domain
tooling

Research direction

Open bench/api.sh and find the exec step that runs under hyperfine --ignore-failure and POSTs the exec start body with AttachStdout. Confirm the failure by running that step alone against a Kiri Unix socket in WSL2 and checking curl's exit code (52 = empty reply on the upgraded stream). The reporter's workaround is to send {"Detach":true} in the exec start body and to drop --ignore-failure so a failed run is reported rather than timed; done means all 20 iterations pass and a deliberate failure stops the benchmark with an error.

Written by the indexing model from the issue text.

Description

bug
Kiri version and system

Kiri 0.2.1, Windows 11, daemon inside WSL2 (Unix socket)

What you did

Ran the unmodified bench/api.sh against Kiri's Unix socket inside WSL2: 3 warmup + 20 runs.

What happened
All 20 exec iterations fail with curl exit 52. Kiri returns HTTP 101 UPGRADED (AttachStdout:true, exec start body {}), but curl does not complete the upgraded stream.

Because the exec step runs under `hyperfine --ignore-failure`, these failed runs are still timed, so the "API exec" number may measure time-to-failure, not a completed exec.
What you expected instead

The exec step completes successfully, or, if it fails, the benchmark reports the failure instead of timing it.

Anything else

Workaround: sending {"Detach":true} in the exec start body makes all 20 iterations pass (median 27.45 ms, p95 35.21 ms).
Suggestion: use Detach:true (or handle the upgraded stream) and drop --ignore-failure for this step.
bench/api.sh is unchanged on main as of today.

Dominant language
Rust
Stars
7.5k
Forks
329
Avg merge
14h 18m
Merged PRs (30d)
204

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libracoder/kiri

All issues in libracoder/kiri

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.