Skip to content
This repository was archived by the owner on Oct 16, 2026. It is now read-only.

ci(bench): cover every command's startup path - #70

Merged
kody-bot merged 2 commits into
mainfrom
cursor/bench-matrix-009e
Oct 16, 2026
Merged

kody-bot merged 2 commits into
mainfrom
cursor/bench-matrix-009e

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

The bench from #32 timed --version, status and the three execute --local cases. It now also times help, whoami, search, git-credential get and dev, each with its expected exit code declared on the scenario (replacing the status-only special case). The login-gated commands run with no config and an empty KODY_API_TOKEN so they stop at the "not logged in" error after loading everything the real call needs, which is exactly the import cost worth guarding; nothing touches the network. Budgets (ms over node baseline) cover the new rows. No source or behavior changes.

Budget note (same pattern as #32): Devin's laptop-calibrated budgets (whoami/search/git-credential 160, dev 220) failed on GHA ubuntu-latest Node 24.21 — whoami/search ~169 over baseline, git-credential ~159, dev ~228. Raised the new rows to 240 / 300 (~75ms headroom over observed CI p50); --version / status / help / execute budgets unchanged.

Baseline on main 1.26.2 (Node 24.21, 20 runs, p50 / p95 ms, loopback API; cold = fresh npm cache, 3 runs):

scenario 1.26.2 main with bundle PR earlier reference
--version 41 / 46 43 / 46 (interleaved A/B: 42.3 vs 42.8) ~40
status 44 / 47 45 / 48 (A/B: 45.4 vs 43.9) ~44
help 43 / 47 44 / 46
whoami (MCP session path) 121 / 136 95 / 101 new
search 120 / 125 95 / 106 new
git-credential get 119 / 129 92 / 94 new
dev (no app entry) 154 / 167 121 / 128 new
execute --local empty 112 / 126 110 / 122 ~120
execute --local kody:@ import 112 / 115 110 / 113
execute --local runtime call 117 / 129 117 / 131
cold npx --version 2.47 to 2.52 s 1.01 to 1.10 s 2.30 s on 1.22.0
cold npm install 1.83 to 1.88 s 0.95 to 1.09 s
install size / packages 38.2 MB / 47 pkgs (60 package.json) 17.9 MB / 6 pkgs 1.15.3 shipped 6 deps
modules loaded by --version 28 files + keyring 1 chunk + keyring

Authored by Devin (performance audit v2); applied via git am with authorship preserved. Budget bump added after GHA evidence.

Open in Web Open in Cursor 

Note

Low Risk
Benchmark and CI budget config only; no CLI runtime or product behavior changes.

Reviewed by Cursor Bugbot for commit ee2ca93. Bugbot is set up for automated code reviews on this repo. Configure here.

The benchmark only timed --version, status and execute --local. Commands that reach the MCP session (whoami, search, git-credential) and kody dev load several times more code than --version, and nothing caught it. Each scenario now states its expected exit code, the login-gated commands run without any config so they stop at the "not logged in" error after loading everything the real call needs, and budgets cover the new scenarios.

Co-Authored-By: bot_apk <apk@cognition.ai>
GitHub Actions ubuntu-latest Node 24.21 measured whoami/search at ~169ms
over baseline, git-credential at ~159ms, and dev at ~228ms — Devin's
160/220 budgets (laptop-calibrated) fail the same way the original
execute budgets did in #32. Raise the new rows to 240/300 (~75ms
headroom over observed CI p50); leave --version/status/help/execute
unchanged.

Co-Authored-By: bot_apk <apk@cognition.ai>

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kentcdodds

Copy link
Copy Markdown
Owner Author

bugbot run

@kody-bot
kody-bot merged commit 72865cd into main Oct 16, 2026
7 checks passed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ee2ca93. Configure here.

Comment thread scripts/bench.mjs
whoami: { args: ['whoami'], env: noConfig, exit: 1 },
search: { args: ['search', 'kody'], env: noConfig, exit: 1 },
'git-credential get': { args: ['git-credential', 'get'], env: noConfig },
'dev (no app entry)': { args: ['dev'], env: noConfig, exit: 1 },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bench misses OS credential stores

Medium Severity

noConfig only overrides XDG_CONFIG_HOME and KODY_API_TOKEN, so login-gated scenarios still load OS keychain sessions and macOS/Windows file stores. whoami and search then hit the real network or exit 0, and status fails the new exit: 1 check for anyone already logged in.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ee2ca93. Configure here.

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.26.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants