Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ jobs:

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.2
bun-version: 1.4.4

- name: Cache Bun packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-codeapi-api-bun-1.4.2-${{ hashFiles('api/bun.lock') }}
key: ${{ runner.os }}-codeapi-api-bun-1.4.4-${{ hashFiles('api/bun.lock') }}
restore-keys: |
${{ runner.os }}-codeapi-api-bun-1.4.2-
${{ runner.os }}-codeapi-api-bun-1.4.4-

- name: Install dependencies
run: bun ci
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
--workdir /work/api \
--env SANDBOX_CLEANUP_TMPFS_TEST=1 \
--env SANDBOX_LOG_LEVEL=error \
oven/bun:1.4.2-debian \
oven/bun:1.4.4-debian \
bun test src/cleanup.integration.test.ts

nsjail-ipc-tests:
Expand All @@ -171,7 +171,7 @@ jobs:
run: python3 tests/test_tool_call_pipes.py
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.2
bun-version: 1.4.4
- name: Render native sandbox policy
working-directory: api
run: |
Expand Down Expand Up @@ -278,15 +278,15 @@ jobs:

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.2
bun-version: 1.4.4

- name: Cache Bun packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-codeapi-service-bun-1.4.2-${{ hashFiles('service/bun.lock') }}
key: ${{ runner.os }}-codeapi-service-bun-1.4.4-${{ hashFiles('service/bun.lock') }}
restore-keys: |
${{ runner.os }}-codeapi-service-bun-1.4.2-
${{ runner.os }}-codeapi-service-bun-1.4.4-

- name: Install dependencies
run: bun ci
Expand Down Expand Up @@ -402,7 +402,7 @@ jobs:

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.2
bun-version: 1.4.4

- name: Install service dependencies
working-directory: service
Expand Down Expand Up @@ -474,7 +474,7 @@ jobs:
docker buildx inspect --bootstrap

- name: Build Lambda MicroVM runner image
# The target pins Bun 1.4.2 and installs api/bun.lock frozen. Building
# The target pins Bun 1.4.4 and installs api/bun.lock frozen. Building
# natively catches architecture-specific package and Docker layer
# failures without retaining a second multi-gigabyte image copy.
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ on:
- javascript-packages.txt
- launcher/**
- packages/code/src/**
- packages/extraction/**
- service/**
- shared/**
pull_request:
Expand Down Expand Up @@ -70,6 +71,8 @@ jobs:
run: |
images=$(jq -c . <<'JSON'
[
{"image": "code-interpreter-extraction", "dockerfile": "packages/extraction/Dockerfile", "target": "runtime",
"description": "Authenticated isolated PDF/DOCX extraction service", "timeout": 15},
{"image": "code-interpreter-api", "dockerfile": "service/Dockerfile", "target": "api",
"description": "Code API HTTP server (Compose service api)", "timeout": 30},
{"image": "code-interpreter-worker", "dockerfile": "service/Dockerfile", "target": "worker",
Expand Down
6 changes: 3 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ENV SANDBOX_PIPE_ADDON=/usr/local/lib/anonymous-pipes.node
COPY docker/python-runtime /python-runtime
RUN python3 /python-runtime/install.py
COPY --from=node:22.23.4-slim /usr/local/bin/node /usr/local/bin/node
COPY --from=oven/bun:1.4.2-debian /usr/local/bin/bun /usr/local/bin/bun
COPY --from=oven/bun:1.4.4-debian /usr/local/bin/bun /usr/local/bin/bun

# ============================================================================
# Stage 1b: Build language runtime packages (only consumed by sandbox-runner-baked)
Expand All @@ -65,7 +65,7 @@ FROM buildpack-deps:bookworm AS package-builder

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHON_VERSION=3.14.4
ENV BUN_VERSION=1.4.2
ENV BUN_VERSION=1.4.4

COPY docker/apt-install.sh /usr/local/bin/apt-install
RUN chmod +x /usr/local/bin/apt-install
Expand All @@ -88,7 +88,7 @@ RUN chmod +x /package-init.sh && FORCE_REBUILD=true /package-init.sh
# ============================================================================
# Stage 2: Build sandbox rootfs
# ============================================================================
FROM oven/bun:1.4.2-debian AS sandbox-build
FROM oven/bun:1.4.4-debian AS sandbox-build

ENV DEBIAN_FRONTEND=noninteractive

Expand Down
4 changes: 2 additions & 2 deletions api/src/package-init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ for (const oldRuntimeExists of [false, true]) {
args: ['hello world', '--version'],
},
{
directory: 'bun/1.4.2',
directory: 'bun/1.4.4',
binary: 'bun',
args: ['run', 'hello world', '--version'],
},
Expand Down Expand Up @@ -131,7 +131,7 @@ for (const oldRuntimeExists of [false, true]) {
FORCE_REBUILD: 'false',
PYTHON_VERSION: '3.14.4',
NODE_VERSION: '24.22.1',
BUN_VERSION: '1.4.2',
BUN_VERSION: '1.4.4',
BASH_PACKAGE_VERSION: '5.2.0',
JS_PACKAGE_MANIFEST: manifest,
};
Expand Down
4 changes: 2 additions & 2 deletions build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Environment Variables:
# PYTHON_VERSION=3.14.4 # Python version to install
# NODE_VERSION=24.22.1 # Node.js version to install
# BUN_VERSION=1.4.2 # Bun version to install
# BUN_VERSION=1.4.4 # Bun version to install
# BASH_PACKAGE_VERSION=5.2.0 # Bash package registration version (semver-like x.y.z)
# SKIP_PYTHON_PACKAGES=1 # Skip Python pip packages
# SKIP_JS_PACKAGES=1 # Skip JavaScript npm packages for Node/Bun
Expand All @@ -28,7 +28,7 @@ cd "$SCRIPT_DIR"

PYTHON_VERSION="${PYTHON_VERSION:-3.14.4}"
NODE_VERSION="${NODE_VERSION:-24.22.1}"
BUN_VERSION="${BUN_VERSION:-1.4.2}"
BUN_VERSION="${BUN_VERSION:-1.4.4}"
PACKAGES_DIR="./data/pkgs"
JS_PACKAGE_MANIFEST="${JS_PACKAGE_MANIFEST:-${SCRIPT_DIR}/javascript-packages.txt}"

Expand Down
8 changes: 4 additions & 4 deletions docker/Dockerfile.worker-sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ FROM buildpack-deps:bookworm AS package-builder

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHON_VERSION=3.14.4
ENV BUN_VERSION=1.4.2
ENV BUN_VERSION=1.4.4

COPY docker/apt-install.sh /usr/local/bin/apt-install
RUN chmod +x /usr/local/bin/apt-install
Expand All @@ -92,7 +92,7 @@ RUN chmod +x /package-init.sh && FORCE_REBUILD=true /package-init.sh
# ============================================================================
# Stage 2: Build worker
# ============================================================================
FROM oven/bun:1.4.2 AS worker-builder
FROM oven/bun:1.4.4 AS worker-builder
WORKDIR /app
COPY service/package.json service/bun.lock ./
RUN bun install --frozen-lockfile
Expand All @@ -105,7 +105,7 @@ RUN bun build ./src/worker-server.ts --minify --outdir .build --target bun --ext
# ============================================================================
# Stage 3: Build sandbox API
# ============================================================================
FROM oven/bun:1.4.2 AS sandbox-builder
FROM oven/bun:1.4.4 AS sandbox-builder
WORKDIR /app
COPY api/package.json ./
RUN bun install --frozen-lockfile
Expand All @@ -118,7 +118,7 @@ RUN bun build ./src/index.ts --minify --outdir .build --target bun --external '@
# ============================================================================
# Stage 4: Build sandbox rootfs (full OS layer for the microVM guest)
# ============================================================================
FROM oven/bun:1.4.2-debian AS sandbox-rootfs
FROM oven/bun:1.4.4-debian AS sandbox-rootfs

ENV DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 1 addition & 1 deletion docker/package-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PYTHON_ALIAS="python${PYTHON_SITE_VERSION}"
PYTHON_PACKAGE_INSTALLER="${PYTHON_PACKAGE_INSTALLER:-uv}"
UV_VERSION="${UV_VERSION:-0.11.26}"
NODE_VERSION="${NODE_VERSION:-24.22.1}"
BUN_VERSION="${BUN_VERSION:-1.4.2}"
BUN_VERSION="${BUN_VERSION:-1.4.4}"
BASH_PACKAGE_VERSION="${BASH_PACKAGE_VERSION:-5.2.0}"
INSTALL_FAILED=false
JS_PACKAGE_MANIFEST="${JS_PACKAGE_MANIFEST:-${SCRIPT_DIR}/javascript-packages.txt}"
Expand Down
4 changes: 2 additions & 2 deletions docs/SECURITY-MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ does not mount. The namespace-disabled native policy tests cover those APIs
when shared memory exists, not their availability in the default jail.

With runtime packages built by `build-packages.sh` (or a compatible `/pkgs`
tree containing Python 3.14.4 and Bun 1.4.2), run from the repository root:
tree containing Python 3.14.4 and Bun 1.4.4), run from the repository root:

```sh
bun service/scripts/dump-pipe-preamble.ts > /tmp/codeapi-pipe-client.py
Expand Down Expand Up @@ -180,7 +180,7 @@ Remaining service audit findings at this change:
- `braces` (GHSA-vfj7-8cjw-p6xm): development-only dependency with no published
fix. Do not feed untrusted patterns to build tooling; track an upstream fix.

Bun 1.4.2 subprocess spawning with piped stdio also uses socketpairs and is
Bun 1.4.4 subprocess spawning with piped stdio also uses socketpairs and is
denied by this policy. Basic JS/TS execution remains supported. Replacing Bun
subprocess IPC requires a separate runtime change; do not re-enable socketpairs
to provide that compatibility.
Expand Down
50 changes: 50 additions & 0 deletions docs/fork/patches.md
Original file line number Diff line number Diff line change
Expand Up @@ -1019,3 +1019,53 @@ not a prose-pinning CI test.
v1.10.10 as the ancestor. Upstream-only additions are no longer fork patches.
Rebuild path ownership at the final reviewed commit; source CI and review
qualify the candidate separately from image publication and runtime rollout.


### Re-audit basis: upstream v1.10.13 continuation

- Fork baseline: `80810a0934e96eb1dd9bbca84f288fb345791f65`.
- Upstream release commit: `2fa9f0d43e8e38b7d6240bc76e2483c6a47c64c7`;
previous upstream ancestor: `77bcd2ec2e63be523bfab2dfa11159a2ceec0088`.
- Adopt upstream workspace-import parent creation and root race prevention,
extraction gateway/credential isolation, response-close outcome accounting
and Bun 1.4.4 alignment. The optional extraction package stays outside the
primary deployment. The public execution contract is unchanged.
- All incoming paths match upstream except the existing shared CI, sandbox
Dockerfiles, launcher Dockerfile and chart values. Their incoming changes
only advance Bun pins; preserve the fork's native lifecycle checks,
spec-guard permissions, external ownership and chart settings.
- No fork behavior is retired in this continuation. Retain issuer-keyed trust,
values-free sinks, nonfatal telemetry, missing-bucket readiness, bounded
refusal-only retry, caller cancellation and guest cleanup ownership,
selected default-disabled lifecycle observation and restricted metrics peers.
Existing behavioral tests remain the semantic proof for these shared seams.
- The fork release job remains disabled. The existing seven-image publication
workflow remains the delivery mechanism; upstream release ancestry is
retained without creating fork stable tags or releases.
- The execution and recovery contract is in the
[release plan](../project/2026-10-25-upstream-v1.10.13-plan.md).
Recompute both final-tree comparisons at the reviewed candidate; unexplained
paths or unsupported retirement claims hold qualification.

### Qualification and consumer-fixture path accounting

`scripts/qualification/codeapi.mjs` and `scripts/qualification/codeapi.test.mjs`
own the independent bounded operator API/artifact, resource and sustained-load
verification controls. They do not change service admission or deployment.
Retain their budget, ownership, guard, terminality and cleanup tests. Drop when
an upstream operator suite provides equivalent bounded qualification.

`tests/librechat/consumer-e2e.patch`, `tests/librechat/prepare.mjs` and
`tests/librechat/prepare.test.mjs` own the disposable consumer harness. It keeps
custom operational verification out of the LibreChat application fork while
preserving its upstream E2E coverage. This fixture is test-only, with no
production consumer or service activation. Drop when upstream supplies the
same isolated consumer acceptance path.

Additional execution references, not replay units:

- `docs/project/2026-10-24-codeapi-capabilities.md`
- `docs/project/2026-10-24-codeapi-capacity-contract-plan.md`
- `docs/project/2026-10-24-codeapi-sustained-load-plan.md`
- `docs/project/2026-10-25-codeapi-production-qualification-plan.md`
- `docs/project/2026-10-25-upstream-v1.10.13-plan.md`
Loading
Loading