bug(examples): make Codex app-server setup runnable and image-safe
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 32/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, shell
- Lĩnh vực
- devops, documentation
Hướng nghiên cứu
Start in examples/codex-app-server: read the image Dockerfile, the codex.yaml provider profile, the start-codex-app-server entry point, and the README commands. Build the image, import the profile, and create a sandbox against a local Docker gateway; the acceptance criteria act as the checklist. Done means a clean build leaves no .codex/installation_id or .codex/.tmp/plugins, each sandbox makes its own runtime ID, the profile authorizes only the Codex WebSocket path, and the sandbox reaches /readyz and completes a model request.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
User Story
I use a local, Docker-backed OpenShell gateway to run the Codex app server from examples/codex-app-server. I followed the example and directly encountered startup, credential-routing, and network-policy failures. I need the example to produce a working sandbox without embedding shared identity or plugin state in the image.
Problem Statement
The Codex app-server example does not complete a clean setup with current Codex behavior:
- Codex must initialize its SQLite schemas before the runtime Landlock boundary applies. Without that initialization, the app server does not become ready.
- Starting
codex app-serverduring the image build with default features creates/sandbox/.codex/installation_idand synchronizes plugins under.codex/.tmp/plugins. Every derived sandbox then inherits one installation identity, and the transient plugin data materially increases the image. - The example declares
CODEX_AUTH_ACCOUNT_IDas a provider credential. OpenShell injects provider credentials as opaque handles, but Codex needs the actual, non-secret account ID for account routing. - The provider profile does not authorize the WebSocket endpoint at
chatgpt.com/backend-api/codex/responses, so model traffic cannot complete.
A five-second default app-server bootstrap left about 80 MiB under /sandbox/.codex in the tested image. Disabling plugins and removing build-only artifacts reduced that state to about 1.3 MiB.
Impact / Why This Matters
Following the example does not yield a usable Codex remote session. A straightforward bootstrap workaround also creates two packaging problems: cloned sandboxes share a Codex installation identity, and each image carries a large plugin cache that Codex can recreate at runtime.
Users should not need to weaken sandbox policy, expose refresh material, or accept process-wide state baked into the image to run the example.
Acceptance Criteria
- A clean build and setup starts the Codex app server and reaches the OpenShell service readiness endpoint.
- A host Codex client can connect through the exposed WebSocket URL and complete a model request.
- The image initializes the SQLite state required before Landlock applies.
- The image contains no
.codex/installation_idand no synchronized plugin cache. - Each sandbox generates its own installation ID at runtime.
- The non-secret account ID reaches Codex as its actual value, while access and refresh tokens retain the documented OpenShell credential boundaries.
- The provider profile authorizes only the WebSocket path required for Codex responses.
- The documented commands match the verified workflow.
Reproduction Steps
- Start a local Docker-backed OpenShell gateway.
- From
examples/codex-app-server, build the image and importcodex.yaml. - Create the Codex provider from an existing host login and configure gateway-owned refresh.
- Create the sandbox with the example command and connect a host Codex client to the exposed URL.
- Observe that first-run database initialization and the provider/account/network configuration prevent a working model request.
- As a bootstrap workaround, run
codex app-serverfor five seconds during the image build. - Inspect
/sandbox/.codexin the resulting image. It contains a sharedinstallation_idand synchronized plugin data under.tmp/plugins.
Environment
- OpenShell: 0.1.9
- Codex CLI in the image: 0.171.0
- Image base: Ubuntu 24.04
- Gateway runtime: local Docker
- Host: macOS
- Repository base commit:
438e07b23
Suggested UX
Keep the documented provider boundary explicit:
openshell provider create \
--name codex \
--type codex \
--credential CODEX_AUTH_ACCESS_TOKEN
env "CODEX_AUTH_ACCOUNT_ID=..." \
openshell sandbox create \
--name codex-app-server \
--from openshell/codex-app-server:local \
--provider codex \
--env-from CODEX_AUTH_ACCOUNT_ID \
--expose 4500 \
--detach \
-- start-codex-app-server
The image build may initialize required database schemas, but build-only identity and plugin synchronization artifacts must not remain in the final image.
Verification Notes
The corrected local image was rebuilt without cache. It contained neither installation_id nor .codex/.tmp, used about 1.3 MiB for initialized Codex state, and produced a fresh runtime installation ID. A newly created OpenShell sandbox reached /readyz with HTTP 200.
- Ngôn ngữ chính
- Rust
- Star
- 21.5k
- Fork
- 2.1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/OpenShell
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failureCó thể đã có người làm @TaylorMutch đã nhận 9 ngày trước. Đang mởstate:accepted state:pr-opened
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
state:triage-needed
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Tất cả issue của NVIDIA/OpenShell
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
autofixer: follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tursodatabase/turso#12531 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug help wanted ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
userFRM/egui-charts#4292 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CHANGELOG.md out of dateĐang mởIssue-Bug Need-Review
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
PowerShell/DSC#1832 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày