Skip to content

fix(ci): Linux O_PATH dir-chmod panic + stale max_output_tokens PTY assertions - #254

Merged
justrach merged 3 commits into
mainfrom
hotfix/json-controls-opath-and-stale-caps
Jul 23, 2026
Merged

justrach merged 3 commits into
mainfrom
hotfix/json-controls-opath-and-stale-caps

Conversation

@justrach

Copy link
Copy Markdown
Owner

Summary

Main's zig CI job has been red since 7e08374, but the first failure masked two more behind it (the job stops at the first failed step):

  1. JSON live-control test (Linux-only panic): the kimi catalog hydration added in 7e08374 made kimi_catalog.secureDir reachable mid-session. A default openDir can yield an O_PATH handle on Linux, and fchmod on O_PATH fails EBADF — which std.Io (0.17-dev) escalates to a programmer-bug panic that catch {} cannot swallow. Once ~/.kimi/device_id exists, any /model query that may use kimi re-enters initIdentity → secureDir and the process dies (the test sees stdout EOF after the 8th event). macOS never hit it: its dir handles are always chmod-able. Fix: open with .iterate = true in both kimi_catalog.secureDir and the identical oauth.zig kimi-credentials loop.

  2. Codex WS/SSE transport test: test-pty-codex-ws.py still asserted explicit top-level 16k/4k/16k max_output_tokens caps, but fix(codex): drop top-level max_output_tokens from Responses requests #247 intentionally dropped the field (gpt-5.6 rejects it). Assert its absence instead.

  3. Title-parallel test: same stale caps assertion, same fix.

Validation

  • Debug branch (debug/json-controls-main) with these exact commits: full CI green (run 29715398686)
  • Local (zig 0.16, macOS): zig build test 231/231, test-json-controls.py 19/19, test-pty-codex-ws.py 6/6 scenarios, test-title-parallel.py ok

Co-Authored-By: Codegraff blackfloofie@codegraff.com

justrach and others added 3 commits July 20, 2026 11:51
On Linux, a default openDir can yield an O_PATH handle; fchmod on O_PATH
fails EBADF, which std.Io (0.17-dev) escalates to a programmer-bug panic
that catch {} cannot swallow. The kimi catalog hydration added in 7e08374
made this reachable mid-session: once ~/.kimi/device_id exists, any
/model query that may use kimi re-enters initIdentity -> secureDir and the
process panics (seen as the JSON live-control test losing all events after
'set_model provider/model keyless' on Linux CI; macOS never hit it because
its dir handles are always chmod-able).

Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
…utput_tokens

The midturn/transactional scenarios still expected explicit 16k/4k/16k
top-level output caps, but #247 removed the field entirely (gpt-5.6 rejects
it). CI never caught the stale expectation because the json-controls step
failed first and the job stopped. Assert the new contract: the field must be
absent from every Responses request.

Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
…st (#247)

Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
@justrach
justrach merged commit 57d8bb6 into main Jul 23, 2026
6 checks passed
@justrach
justrach deleted the hotfix/json-controls-opath-and-stale-caps branch August 4, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant