mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
## Why
Remote-control runtime enablement and persisted enrollment preference
were represented by separate flags. That made startup rehydration, RPC
persistence, and new-enrollment seeding race with one another, and it
did not cleanly distinguish runtime-only CLI or daemon starts from
durable app-server RPC changes.
## What Changed
- Replace the parallel enablement, seed, and rehydration flags with one
transport-owned `RemoteControlDesiredState`.
- Add nullable enrollment-scoped persistence and preserve existing
preferences during enrollment upserts.
- Rehydrate plain startup only after auth and client scope resolve,
without overwriting a concurrent RPC transition.
- Make ordinary `remoteControl/enable` and `remoteControl/disable`
durable while retaining `ephemeral: true` for runtime-only callers.
- Have the daemon explicitly request ephemeral enablement and regenerate
the app-server schemas.
## Verification
- Covered migration and `NULL`/`0`/`1` persistence round trips.
- Covered plain-start rehydration and runtime-only versus durable
enrollment seeding.
- Covered durable enable, durable disable, and ephemeral enable through
app-server RPC.
- Covered the daemon's exact `{ "ephemeral": true }` request payload.
Related issue: N/A (internal remote-control persistence architecture
change).
30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
mod outgoing_message;
|
|
mod transport;
|
|
|
|
pub use outgoing_message::ConnectionId;
|
|
pub use outgoing_message::OutgoingError;
|
|
pub use outgoing_message::OutgoingMessage;
|
|
pub use outgoing_message::OutgoingResponse;
|
|
pub use outgoing_message::QueuedOutgoingMessage;
|
|
pub use transport::AppServerStartupLock;
|
|
pub use transport::AppServerTransport;
|
|
pub use transport::AppServerTransportParseError;
|
|
pub use transport::CHANNEL_CAPACITY;
|
|
pub use transport::ConnectionOrigin;
|
|
pub use transport::REMOTE_CONTROL_DISABLED_ENV_VAR;
|
|
pub use transport::RemoteControlHandle;
|
|
pub use transport::RemoteControlStartConfig;
|
|
pub use transport::RemoteControlStartupMode;
|
|
pub use transport::RemoteControlUnavailable;
|
|
pub use transport::TransportEvent;
|
|
pub use transport::acquire_app_server_startup_lock;
|
|
pub use transport::app_server_control_socket_path;
|
|
pub use transport::app_server_startup_lock_path;
|
|
pub use transport::auth;
|
|
pub use transport::prepare_control_socket_path;
|
|
pub use transport::start_control_socket_acceptor;
|
|
pub use transport::start_remote_control;
|
|
pub use transport::start_stdio_connection;
|
|
pub use transport::start_websocket_acceptor;
|
|
pub use transport::take_remote_control_disabled_env;
|