Add ephemeral runtime registration and signed assertions (#55402)

## What changed

Extend `codex-runtime-agent-instance` with a registration client and an in-memory assertion signer. Pending registrations retain their signing key and idempotency key across caller-driven retries; registered runtimes generate fresh versioned assertions with a timestamp and unique ID.

Bound registration requests and responses, reject unsafe endpoints, disable redirects and request logging, and preserve network policy errors. Report server rejections using only the status and recognized error codes.

## Testing

Add HTTP-backed tests for retry stability, assertion signatures and freshness, policy revocation, endpoint and response validation, redirect refusal, and error redaction.

GitOrigin-RevId: a6dab0900459dfb75f72652a0a2ee1e4b65ca322
This commit is contained in:
cooper-oai
2026-10-19 23:01:54 +00:00
committed by copyberry
parent 431185b78b
commit 79a19cbb30
6 changed files with 564 additions and 3 deletions
+10 -1
View File
@@ -1,6 +1,8 @@
//! OpenAI runtime registration types, independent of credential storage and model providers.
//! Ephemeral OpenAI runtimes: composite registration and per-request assertions.
mod bootstrap;
mod registration;
mod runtime;
pub use bootstrap::ActorInfo;
pub use bootstrap::AgentHostAuthorization;
@@ -9,3 +11,10 @@ pub use bootstrap::RuntimeRegistrationMetadata;
pub use bootstrap::RuntimeRegistrationRequest;
pub use bootstrap::RuntimeRegistrationResponse;
pub use bootstrap::RuntimeRole;
pub use registration::DEFAULT_REGISTRATION_URL;
pub use registration::RegistrationError;
pub use registration::RegistrationErrorCode;
pub use registration::RuntimeRegistrationClient;
pub use runtime::RuntimeAgentInstance;
pub use runtime::RuntimeRegistration;