From 60f66bbc63526012b57271f4223d22fd6960f576 Mon Sep 17 00:00:00 2001 From: h1994st Date: Tue, 1 Sep 2026 21:20:45 -0700 Subject: [PATCH 1/3] build: run the dev container on arm64 hosts The universal image publishes a linux/amd64 manifest only, so the Dev Container cannot start natively on arm64 hosts. Use the Ubuntu Noble base image, which is multi-arch, and supply Node.js, Python, and Docker through Dev Container features. Node ships a corepack shim for pnpm, so installing pnpm with npm fails on an existing file. Install the release pinned by packageManager through corepack instead, matching how the workflows resolve pnpm. Move the dependency steps into a script the Dev Container and the Ona install task share, and run it when the container is created. pnpm cannot hard link across the workspace mount, so it falls back to a store inside the repository. Ignore that directory. --- .devcontainer/devcontainer-lock.json | 19 +++++++++++++++++++ .devcontainer/devcontainer.json | 14 +++++++++++++- .devcontainer/install.sh | 27 +++++++++++++++++++++++++++ .gitignore | 1 + .ona/automations.yml | 13 +------------ 5 files changed, 61 insertions(+), 13 deletions(-) create mode 100644 .devcontainer/devcontainer-lock.json create mode 100644 .devcontainer/install.sh diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json new file mode 100644 index 000000000..08e9384a4 --- /dev/null +++ b/.devcontainer/devcontainer-lock.json @@ -0,0 +1,19 @@ +{ + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:4": { + "version": "4.1.0", + "resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:7d979c4a36d595eb4ab79909caa3f396daf3b6152dcf38e8328ea4eff42206c7", + "integrity": "sha256:7d979c4a36d595eb4ab79909caa3f396daf3b6152dcf38e8328ea4eff42206c7" + }, + "ghcr.io/devcontainers/features/node:2": { + "version": "2.1.0", + "resolved": "ghcr.io/devcontainers/features/node@sha256:586c9a6f7dd40bd3ba2cd41e7f2f88dcc31fbe5d1442afcbf07ffbc66b686857", + "integrity": "sha256:586c9a6f7dd40bd3ba2cd41e7f2f88dcc31fbe5d1442afcbf07ffbc66b686857" + }, + "ghcr.io/devcontainers/features/python:1": { + "version": "1.8.0", + "resolved": "ghcr.io/devcontainers/features/python@sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511", + "integrity": "sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511" + } + } +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5ebdf0383..b6df0e2b5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,16 @@ { "name": "Ona", - "image": "mcr.microsoft.com/devcontainers/universal:4.0.1-noble" + // devcontainers/universal publishes a linux/amd64 manifest only, so it cannot + // run natively on arm64 hosts. base:noble keeps the Ubuntu Noble userland the + // Ona automations expect and supplies the toolchains through features. + "image": "mcr.microsoft.com/devcontainers/base:noble", + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:4": { "moby": false }, + "ghcr.io/devcontainers/features/node:2": { + "version": "22", + "pnpmVersion": "none" + }, + "ghcr.io/devcontainers/features/python:1": { "version": "3.12" } + }, + "onCreateCommand": "sh .devcontainer/install.sh" } diff --git a/.devcontainer/install.sh b/.devcontainer/install.sh new file mode 100644 index 000000000..951c9ae6a --- /dev/null +++ b/.devcontainer/install.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -eu + +# Install the development dependencies for the Node.js and Python workflows. +# Shared by .devcontainer/devcontainer.json and .ona/automations.yml so editors +# and Ona environments install the same toolchain. + +cd "$(dirname "$0")/.." + +# Install the pnpm release pinned by packageManager in package.json. Node ships +# a corepack shim for pnpm, so installing it with npm collides with that shim. +COREPACK_ENABLE_DOWNLOAD_PROMPT=0 +export COREPACK_ENABLE_DOWNLOAD_PROMPT +corepack install + +# Keep bun aligned with the version pinned in .github/workflows/node-ci.yml. +npm install --global bun@1.3.14 --no-audit --no-fund + +if ! command -v rg >/dev/null 2>&1; then + sudo apt-get update + sudo apt-get install --yes ripgrep +fi + +pnpm --dir sdk/typescript install --frozen-lockfile +pnpm --dir plugins/codex-security/mcp-app install --frozen-lockfile +python -m pip install --disable-pip-version-check --no-input -e 'plugins/codex-security[test]' diff --git a/.gitignore b/.gitignore index d6b8b94b5..0b4df76dd 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ __pycache__/ /codex-security.json /findings.json /*.sarif +.pnpm-store/ # Never publish internal-only plugin data. .internal/ diff --git a/.ona/automations.yml b/.ona/automations.yml index 1024108ae..1599817a8 100644 --- a/.ona/automations.yml +++ b/.ona/automations.yml @@ -1,18 +1,7 @@ tasks: install: name: Install dependencies - command: | - pnpm_package="$(node -p 'require("./package.json").packageManager.split("+")[0]')" - npm install --global "$pnpm_package" bun@1.3.14 --no-audit --no-fund - if ! command -v rg >/dev/null 2>&1; then - sudo apt-get update \ - -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/ubuntu.sources \ - -o Dir::Etc::sourceparts=- - sudo apt-get install --yes ripgrep - fi - pnpm --dir sdk/typescript install --frozen-lockfile - pnpm --dir plugins/codex-security/mcp-app install --frozen-lockfile - python -m pip install --disable-pip-version-check --no-input -e 'plugins/codex-security[test]' + command: sh .devcontainer/install.sh triggeredBy: - manual - prebuild From 4ab0f3170146304db4816f3823a54cfa522b688e Mon Sep 17 00:00:00 2001 From: h1994st Date: Wed, 2 Sep 2026 08:07:04 -0700 Subject: [PATCH 2/3] build: limit the ripgrep APT refresh to Ubuntu sources --- .devcontainer/install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.devcontainer/install.sh b/.devcontainer/install.sh index 951c9ae6a..f27386239 100644 --- a/.devcontainer/install.sh +++ b/.devcontainer/install.sh @@ -18,7 +18,12 @@ corepack install npm install --global bun@1.3.14 --no-audit --no-fund if ! command -v rg >/dev/null 2>&1; then - sudo apt-get update + # Refresh only the Ubuntu sources. Dev container features add APT sources of + # their own, and apt-get update exits 100 when any configured source fails + # validation, which would stop this script before ripgrep installs. + sudo apt-get update \ + -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/ubuntu.sources \ + -o Dir::Etc::sourceparts=- sudo apt-get install --yes ripgrep fi From 08b557c4da5502b2cfa1adb700c743fef3801083 Mon Sep 17 00:00:00 2001 From: h1994st Date: Wed, 2 Sep 2026 08:23:28 -0700 Subject: [PATCH 3/3] build: add the github-cli feature to the dev container --- .devcontainer/devcontainer-lock.json | 5 +++++ .devcontainer/devcontainer.json | 1 + 2 files changed, 6 insertions(+) diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json index 08e9384a4..736b0a42e 100644 --- a/.devcontainer/devcontainer-lock.json +++ b/.devcontainer/devcontainer-lock.json @@ -5,6 +5,11 @@ "resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:7d979c4a36d595eb4ab79909caa3f396daf3b6152dcf38e8328ea4eff42206c7", "integrity": "sha256:7d979c4a36d595eb4ab79909caa3f396daf3b6152dcf38e8328ea4eff42206c7" }, + "ghcr.io/devcontainers/features/github-cli:1": { + "version": "1.1.2", + "resolved": "ghcr.io/devcontainers/features/github-cli@sha256:7c409bf6316ffd85f04fd92fba85a744282639e603417dd4796409866bdb6805", + "integrity": "sha256:7c409bf6316ffd85f04fd92fba85a744282639e603417dd4796409866bdb6805" + }, "ghcr.io/devcontainers/features/node:2": { "version": "2.1.0", "resolved": "ghcr.io/devcontainers/features/node@sha256:586c9a6f7dd40bd3ba2cd41e7f2f88dcc31fbe5d1442afcbf07ffbc66b686857", diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b6df0e2b5..82a0cdedd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,6 +6,7 @@ "image": "mcr.microsoft.com/devcontainers/base:noble", "features": { "ghcr.io/devcontainers/features/docker-in-docker:4": { "moby": false }, + "ghcr.io/devcontainers/features/github-cli:1": {}, "ghcr.io/devcontainers/features/node:2": { "version": "22", "pnpmVersion": "none"