core-agent-ide/codex-rs/app-server/tests/suite
jif-oai 3cc9122ee2
feat: experimental flags (#10231)
## Problem being solved
- We need a single, reliable way to mark app-server API surface as
experimental so that:
  1. the runtime can reject experimental usage unless the client opts in
2. generated TS/JSON schemas can exclude experimental methods/fields for
stable clients.

Right now that’s easy to drift or miss when done ad-hoc.

## How to declare experimental methods and fields
- **Experimental method**: add `#[experimental("method/name")]` to the
`ClientRequest` variant in `client_request_definitions!`.
- **Experimental field**: on the params struct, derive `ExperimentalApi`
and annotate the field with `#[experimental("method/name.field")]` + set
`inspect_params: true` for the method variant so
`ClientRequest::experimental_reason()` inspects params for experimental
fields.

## How the macro solves it
- The new derive macro lives in
`codex-rs/codex-experimental-api-macros/src/lib.rs` and is used via
`#[derive(ExperimentalApi)]` plus `#[experimental("reason")]`
attributes.
- **Structs**:
- Generates `ExperimentalApi::experimental_reason(&self)` that checks
only annotated fields.
  - The “presence” check is type-aware:
    - `Option<T>`: `is_some_and(...)` recursively checks inner.
    - `Vec`/`HashMap`/`BTreeMap`: must be non-empty.
    - `bool`: must be `true`.
    - Other types: considered present (returns `true`).
- Registers each experimental field in an `inventory` with `(type_name,
serialized field name, reason)` and exposes `EXPERIMENTAL_FIELDS` for
that type. Field names are converted from `snake_case` to `camelCase`
for schema/TS filtering.
- **Enums**:
- Generates an exhaustive `match` returning `Some(reason)` for annotated
variants and `None` otherwise (no wildcard arm).
- **Wiring**:
- Runtime gating uses `ExperimentalApi::experimental_reason()` in
`codex-rs/app-server/src/message_processor.rs` to reject requests unless
`InitializeParams.capabilities.experimental_api == true`.
- Schema/TS export filters use the inventory list and
`EXPERIMENTAL_CLIENT_METHODS` from `client_request_definitions!` to
strip experimental methods/fields when `experimental_api` is false.
2026-02-02 11:06:50 +00:00
..
v2 feat: experimental flags (#10231) 2026-02-02 11:06:50 +00:00
archive_thread.rs chore: unify conversation with thread name (#8830) 2026-01-07 17:04:53 +00:00
auth.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
codex_message_processor_flow.rs Fix flakey conversation flow test (#9784) 2026-01-26 15:58:14 +00:00
config.rs fix: added test helpers for platform-specific paths (#7954) 2025-12-13 00:14:12 +00:00
create_thread.rs Add text element metadata to protocol, app server, and core (#9331) 2026-01-15 17:26:41 -08:00
fork_thread.rs feat: fork conversation/thread (#8866) 2026-01-08 12:54:20 -08:00
fuzzy_file_search.rs file-search: improve file query perf (#9939) 2026-01-28 10:54:43 -08:00
interrupt.rs Add text element metadata to protocol, app server, and core (#9331) 2026-01-15 17:26:41 -08:00
list_resume.rs Support end_turn flag (#9698) 2026-01-22 17:27:48 +00:00
login.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
mod.rs feat: fork conversation/thread (#8866) 2026-01-08 12:54:20 -08:00
output_schema.rs Add text element metadata to protocol, app server, and core (#9331) 2026-01-15 17:26:41 -08:00
send_message.rs feat(core) RequestRule (#9489) 2026-01-28 08:43:17 +00:00
set_default_model.rs feat: arcticfox in the wild (#6906) 2025-11-19 16:31:06 +00:00
user_agent.rs fix(app-server): set originator header from initialize (re-revert) (#8988) 2026-01-09 12:09:30 -08:00
user_info.rs chore: use anyhow::Result for all app-server integration tests (#5836) 2025-10-28 08:10:23 -07:00