Commit Graph
60 Commits
Author SHA1 Message Date
Roy Han 57bed0446f rebase 2026-03-31 18:30:58 -07:00
Roy Han df1900cf14 rebase 2026-03-31 18:30:45 -07:00
Roy Han e2e534280a fmt 2026-03-31 15:15:15 -07:00
Roy Han ba125df5bd rebase 2026-03-31 15:07:23 -07:00
Roy Han 81b4ff7937 timestamps 2026-03-31 14:15:33 -07:00
rhan-oai e8de4ea953 [codex-analytics] thread events (#15690)
- add event for thread initialization
- thread/start, thread/fork, thread/resume
- feature flagged behind `FeatureFlag::GeneralAnalytics`
- does not yet support threads started by subagents

PR stack:
- --> [[telemetry] thread events
#15690](https://github.com/openai/codex/pull/15690)
- [[telemetry] subagent events
#15915](https://github.com/openai/codex/pull/15915)
- [[telemetry] turn events
#15591](https://github.com/openai/codex/pull/15591)
- [[telemetry] steer events
#15697](https://github.com/openai/codex/pull/15697)
- [[telemetry] queued prompt data
#15804](https://github.com/openai/codex/pull/15804)


Sample extracted logs in Codex-backend
```
INFO     | 2026-03-29 16:39:37 | codex_backend.routers.analytics_events | analytics_events.track_analytics_events:398 | Tracked analytics event codex_thread_initialized thread_id=019d3bf7-9f5f-7f82-9877-6d48d1052531 product_surface=codex product_client_id=CODEX_CLI client_name=codex-tui client_version=0.0.0 rpc_transport=in_process experimental_api_enabled=True codex_rs_version=0.0.0 runtime_os=macos runtime_os_version=26.4.0 runtime_arch=aarch64 model=gpt-5.3-codex ephemeral=False thread_source=user initialization_mode=new subagent_source=None parent_thread_id=None created_at=1774827577 | 
INFO     | 2026-03-29 16:45:46 | codex_backend.routers.analytics_events | analytics_events.track_analytics_events:398 | Tracked analytics event codex_thread_initialized thread_id=019d3b84-5731-79d0-9b3b-9c6efe5f5066 product_surface=codex product_client_id=CODEX_CLI client_name=codex-tui client_version=0.0.0 rpc_transport=in_process experimental_api_enabled=True codex_rs_version=0.0.0 runtime_os=macos runtime_os_version=26.4.0 runtime_arch=aarch64 model=gpt-5.3-codex ephemeral=False thread_source=user initialization_mode=resumed subagent_source=None parent_thread_id=None created_at=1774820022 | 
INFO     | 2026-03-29 16:45:49 | codex_backend.routers.analytics_events | analytics_events.track_analytics_events:398 | Tracked analytics event codex_thread_initialized thread_id=019d3bfd-4cd6-7c12-a13e-48cef02e8c4d product_surface=codex product_client_id=CODEX_CLI client_name=codex-tui client_version=0.0.0 rpc_transport=in_process experimental_api_enabled=True codex_rs_version=0.0.0 runtime_os=macos runtime_os_version=26.4.0 runtime_arch=aarch64 model=gpt-5.3-codex ephemeral=False thread_source=user initialization_mode=forked subagent_source=None parent_thread_id=None created_at=1774827949 | 
INFO     | 2026-03-29 17:20:29 | codex_backend.routers.analytics_events | analytics_events.track_analytics_events:398 | Tracked analytics event codex_thread_initialized thread_id=019d3c1d-0412-7ed2-ad24-c9c0881a36b0 product_surface=codex product_client_id=CODEX_SERVICE_EXEC client_name=codex_exec client_version=0.0.0 rpc_transport=in_process experimental_api_enabled=True codex_rs_version=0.0.0 runtime_os=macos runtime_os_version=26.4.0 runtime_arch=aarch64 model=gpt-5.3-codex ephemeral=False thread_source=user initialization_mode=new subagent_source=None parent_thread_id=None created_at=1774830027 | 
```

Notes
- `product_client_id` gets canonicalized in codex-backend
- subagent threads are addressed in a following pr
2026-03-31 12:16:44 -07:00
rhan-oai 28a9807f84 [codex-analytics] refactor analytics to use reducer architecture (#16225)
- rework codex analytics crate to use reducer / publish architecture
- in anticipation of extensive codex analytics
2026-03-30 14:27:12 -07:00
Michael Bolin 61dfe0b86c chore: clean up argument-comment lint and roll out all-target CI on macOS (#16054)
## Why

`argument-comment-lint` was green in CI even though the repo still had
many uncommented literal arguments. The main gap was target coverage:
the repo wrapper did not force Cargo to inspect test-only call sites, so
examples like the `latest_session_lookup_params(true, ...)` tests in
`codex-rs/tui_app_server/src/lib.rs` never entered the blocking CI path.

This change cleans up the existing backlog, makes the default repo lint
path cover all Cargo targets, and starts rolling that stricter CI
enforcement out on the platform where it is currently validated.

## What changed

- mechanically fixed existing `argument-comment-lint` violations across
the `codex-rs` workspace, including tests, examples, and benches
- updated `tools/argument-comment-lint/run-prebuilt-linter.sh` and
`tools/argument-comment-lint/run.sh` so non-`--fix` runs default to
`--all-targets` unless the caller explicitly narrows the target set
- fixed both wrappers so forwarded cargo arguments after `--` are
preserved with a single separator
- documented the new default behavior in
`tools/argument-comment-lint/README.md`
- updated `rust-ci` so the macOS lint lane keeps the plain wrapper
invocation and therefore enforces `--all-targets`, while Linux and
Windows temporarily pass `-- --lib --bins`

That temporary CI split keeps the stricter all-targets check where it is
already cleaned up, while leaving room to finish the remaining Linux-
and Windows-specific target-gated cleanup before enabling
`--all-targets` on those runners. The Linux and Windows failures on the
intermediate revision were caused by the wrapper forwarding bug, not by
additional lint findings in those lanes.

## Validation

- `bash -n tools/argument-comment-lint/run.sh`
- `bash -n tools/argument-comment-lint/run-prebuilt-linter.sh`
- shell-level wrapper forwarding check for `-- --lib --bins`
- shell-level wrapper forwarding check for `-- --tests`
- `just argument-comment-lint`
- `cargo test` in `tools/argument-comment-lint`
- `cargo test -p codex-terminal-detection`

## Follow-up

- Clean up remaining Linux-only target-gated callsites, then switch the
Linux lint lane back to the plain wrapper invocation.
- Clean up remaining Windows-only target-gated callsites, then switch
the Windows lint lane back to the plain wrapper invocation.
2026-03-27 19:00:44 -07:00
rhan-oai fbd1ebbd15 Merge branch 'rhan/oob-turn-metadata' into rhan/oob-turn-steer 2026-03-27 15:17:38 -07:00
Roy Han a85835dd0b test patches 2026-03-27 15:14:35 -07:00
Roy Han 9362550e3d rebase 2026-03-27 14:41:58 -07:00
Roy Han 8c2fdee57a rebase 2026-03-27 13:41:33 -07:00
Roy Han ed327248a2 various fixes 2026-03-27 11:15:51 -07:00
Roy Han 7afe91c1df add client metadata 2026-03-27 11:00:11 -07:00
Roy Han a1e506f17d rename client to connection 2026-03-27 10:43:05 -07:00
Roy Han 2e725aa97c connection cleanup 2026-03-27 10:38:08 -07:00
Roy Han 4381ebb4f4 lint 2026-03-27 10:35:00 -07:00
Roy Han b8615d471f shift towards app-server stream consumption 2026-03-27 10:25:52 -07:00
Roy Han 9ae940f704 rebase onto client response changes 2026-03-26 22:38:10 -07:00
Roy Han 36ecc2047a add response to turn facts 2026-03-26 21:59:22 -07:00
Roy Han 4b48495351 rebase 2026-03-26 15:43:02 -07:00
Roy Han 29693182c1 rebase 2026-03-26 15:14:18 -07:00
Roy Han 9c504c7f47 fix for tests too 2026-03-26 15:04:00 -07:00
Roy Han 2d6ec4c94b address enum size issue 2026-03-26 15:03:19 -07:00
Roy Han 960bd3e028 normalize event input name 2026-03-26 15:02:53 -07:00
Roy Han 9d034360fa emigrate subagent source logic and tests 2026-03-26 14:53:59 -07:00
Roy Han c278d0ab61 rebase 2026-03-26 14:52:40 -07:00
Roy Han bb61e20675 introduce generic enum for app-server-protocol constructs 2026-03-26 14:32:55 -07:00
Roy Han fd58c486dc thread initialize refactoring 2026-03-26 11:09:01 -07:00
Roy Han 5567bf4aed pivot to consuming from app-event stream 2026-03-26 10:56:26 -07:00
Roy Han 450d2c49c1 accumulate steer count 2026-03-26 00:37:14 -07:00
Roy Han 33c8e44e37 turn steer rejection semantics 2026-03-26 00:26:30 -07:00
Roy Han 9a9e044121 rebase 2026-03-26 00:01:29 -07:00
Roy Han 5a449cd2d0 turn start and complete 2026-03-25 23:13:22 -07:00
Roy Han 8c5c77dd72 expand schema and rename event 2026-03-25 23:02:33 -07:00
Roy Han 10d271b79b steer event 2026-03-25 23:00:30 -07:00
Roy Han 59a6864af3 expand schema 2026-03-25 23:00:28 -07:00
Roy Han ce5991d844 expand schema 2026-03-25 18:54:44 -07:00
Roy Han d6f4b1a888 rebase 2026-03-25 18:45:08 -07:00
Roy Han f2e417d8a1 rebase 2026-03-25 18:38:59 -07:00
Roy Han f9ce9ba6f1 rebase 2026-03-25 18:33:59 -07:00
Roy Han 6348ffd706 expand schema and rename event 2026-03-25 18:29:32 -07:00
Roy Han 71d88a63c2 strengthen naming 2026-03-25 18:10:36 -07:00
Roy Han 2c012d44cf rebase 2026-03-25 17:32:01 -07:00
Roy Han e04ceaa2eb update thread event imports 2026-03-25 16:38:06 -07:00
Roy Han 6f6f5064b2 remove now dead code 2026-03-25 16:13:10 -07:00
Roy Han 80367abdf1 imports 2026-03-25 15:59:23 -07:00
Roy Han fdd3eaa93d diff cleanup 2026-03-25 15:43:36 -07:00
Roy Han e53084273d rebase 2026-03-25 15:40:25 -07:00
Roy Han 6aa5461d30 int 2026-03-25 15:36:23 -07:00