Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 51 additions & 102 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"fastest-levenshtein": "^1.0.16",
"hono": "^4.12.25",
"jira.js": "^5.3.0",
"js-yaml": "^4.2.0",
"js-yaml": "^4.3.0",
"llmist": "^16.0.4",
"marklassian": "^1.1.0",
"open": "^11.0.0",
Expand Down Expand Up @@ -138,8 +138,9 @@
"overrides": {
"lodash": "^4.18.1",
"lodash-es": "^4.18.1",
"brace-expansion": "^2.0.3",
"axios": "^1.15.0",
"brace-expansion": "^5.0.8",
"minimatch": "^10.0.3",
"axios": "^1.18.0",
"protobufjs": "^7.6.4",
"form-data": "^4.0.6"
}
Expand Down
36 changes: 36 additions & 0 deletions tests/fixtures/codex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Codex CLI JSONL fixtures

These sanitized fixtures are recordings from `codex exec --json` used to gate
worker CLI upgrades. Thread IDs are replaced with stable fixture values; event
shapes and usage counters are unchanged.

Recordings for MNG-1753 were captured on 2026-07-28:

- `exec-0.141.0.jsonl`: `@openai/codex@0.141.0`, model `gpt-5.4`, one turn.
- `exec-0.145.0.jsonl`: `@openai/codex@0.145.0`, model `gpt-5.6-sol`, followed
by `codex exec resume` for a second turn.

The 0.145.0 recording confirms that `turn.completed.usage` remains cumulative:
input/output totals advance from `15428/6` to `30875/13`. The engine replay
test therefore expects the second persisted delta to be `15447/7`.

For future upgrades, record a minimal first turn and resumed turn with both the
old and target pins, sanitize identifiers and prompt content, then replay the
fixtures through:

```bash
npx vitest run --project unit-backends \
tests/unit/backends/codex-jsonlParser.test.ts \
tests/unit/backends/codex.test.ts
```

The engine replay must produce no
`Unrecognized Codex event type — no fields extracted` log entries and no
`Codex turn.completed reported lower cumulative usage` warnings.

The `write_stdin failed: stdin is closed` detector must remain independently
pinned in `codex.test.ts`. As of this recording, upstream issue
openai/codex#18578 is still open and its stderr examples retain the
`codex_core::tools::router` module path. Upstream PR openai/codex#28895 was
merged, but it hardens retry behavior for remote exec-server writes rather than
the non-TTY process path described in #18578.
4 changes: 4 additions & 0 deletions tests/fixtures/codex/exec-0.141.0.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{"type":"thread.started","thread_id":"fixture-thread-0.141.0"}
{"type":"turn.started"}
{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"fixture-ok"}}
{"type":"turn.completed","usage":{"input_tokens":10859,"cached_input_tokens":2432,"output_tokens":16,"reasoning_output_tokens":8}}
8 changes: 8 additions & 0 deletions tests/fixtures/codex/exec-0.145.0.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{"type":"thread.started","thread_id":"fixture-thread-0.145.0"}
{"type":"turn.started"}
{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"fixture-ok"}}
{"type":"turn.completed","usage":{"input_tokens":15428,"cached_input_tokens":0,"cache_write_input_tokens":0,"output_tokens":6,"reasoning_output_tokens":0}}
{"type":"thread.started","thread_id":"fixture-thread-0.145.0"}
{"type":"turn.started"}
{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"fixture-resumed"}}
{"type":"turn.completed","usage":{"input_tokens":30875,"cached_input_tokens":15104,"cache_write_input_tokens":0,"output_tokens":13,"reasoning_output_tokens":0}}
Loading
Loading