Skip to content

Sync code-interpreter v1.10.15 into apro-deploy - #15

Closed
AndesBot wants to merge 99 commits into
apro-deployfrom
sync/2026-11-16
Closed

AndesBot wants to merge 99 commits into
apro-deployfrom
sync/2026-11-16

Conversation

@AndesBot

@AndesBot AndesBot commented Nov 16, 2026 •

Copy link
Copy Markdown

Upstream range

4b41f3a..e0710a8 (8 commits; tag v1.10.15)

Changes

  • Authenticate native GitHub attachment uploads.
  • Enforce matching Redis configuration for file-server uploads and readiness.
  • Add file-server storage pairing, health, and upload-record handling.
  • Apply service and worker dependency security updates, including patched deepmerge and minio, and refreshed dependency resolutions.

The prior sync was squash-merged into apro-deploy. GitHub therefore lists 99 commits in this PR, but the file diff carries only the changes since upstream 4b41f3a and retains the existing apro-deploy customizations.

Conflicts

None.

Build and tests

  • packages/code: npm test: TypeScript build passed; 997 tests passed, 2 failed, 26 skipped. The newline-dense diagnostics performance test exceeded its 3-second bound (also when run alone: 10.1 seconds). The Git LFS filter test failed because git-lfs is not installed in this environment.
  • API and service Bun suites were not run because bun is unavailable.

Needs a person

  • Rerun the package suites in CI or an environment with Bun and Git LFS installed; investigate the repeatable newline-dense diagnostics performance-bound failure if it reproduces there.

danny-avila and others added 30 commits September 11, 2026 11:10
…t-AI#179)

* fix: distinguish retryable ledger contention from scope denials

* fix: preserve error classification through marker discovery and relay

* test: exercise classified denials through gateway configuration

* fix: honor bounded gateway retry hints during object downloads
…ic (LibreChat-AI#180)

* perf: reuse authorized input versions and make egress accounting atomic

* perf: resolve authorized input manifests once per execution

* test: preserve fetch signature in revocation fixture

* fix: isolate shared-grant failures and prevent ledger replay
* fix: evict stale file-object index entries

Forget cached locators after successful deletion and missing-object downloads so replacement keys resolve immediately. Reuse exact resolver matching in the delete route to avoid prefix collisions.

Fixes LibreChat-AI#181

* fix: keep file-object deletion storage-authoritative

* fix: retire superseded upload objects

* fix: canonicalize replacement object keys

* fix: collapse legacy object-key siblings

* fix: recover reads from stale locators

* fix: namespace canonical object identities
* fix: helm egress deployment getting stuck on install

* only wait for redis if the ledger is required

* Update helm/codeapi/templates/egress-gateway-deployment.yaml

Co-authored-by: Danny Avila <danacordially@gmail.com>

---------

Co-authored-by: Danny Avila <danacordially@gmail.com>
* 🛰️ feat: Add trusted VM command policy

* docs: clarify trusted VM socket boundary
…Chat-AI#188)

A clean atomic workspace mutation rejection was settled with retries cut off at the original execution deadline. When Stop arrived near that deadline, process-tree termination finished after it, so the first settlement attempt was aborted immediately while Code API was still draining the cancellation. The client received ASSIGNMENT_EXPIRED and the durable mutation guard stayed armed.

Route clean workspace mutation rejections through the known-clean rejection recovery path: a transient-retrying heartbeat and settlement retries through the rejection acknowledgement grace, floored at the bridge cancellation settlement grace. Worker shutdown still fails closed. Share the grace constant from the protocol module so the bridge and worker stay aligned.

Closes LibreChat-AI#173
…Chat-AI#191)

* fix: Exit Cleanly When Native Executor Shuts Down Concurrently

A native BYOM worker under systemd KillMode=control-group receives SIGTERM
at the same time as its forked SRT executor. The child ignores IPC once it
is shutting down, so the parent's close handshake is left pending until the
child exits, which rejects it with 'Native executor is unavailable'. That
rejection escaped the CLI finally block and turned an idle administrative
stop into exit status 1.

Treat the close handshake as best-effort: the executor is terminated in
finally regardless, and the active command has already drained, so a lost
or stalled reply carries no mutation risk. Also make the child report exit
status 0 when its own SRT teardown succeeded.

Closes LibreChat-AI#190

* fix: Surface Explicit Executor Cleanup Failures During Close

Only a lost, refused, or stalled close handshake is benign at shutdown.
A negative close reply from the executor is a real cleanup failure and
still rejects so pool shutdown can aggregate it.
* feat: run PTC in selected BYOM workspaces

* fix: harden native workspace PTC replay

* fix: preserve replay isolation and bridge limits

* test: tolerate hosts without filesystem cloning

* test: surface copy-on-write clone faults

* fix: harden native workspace PTC admission

* fix: close native replay effect and finalization boundaries
* feat: report truncated output artifacts

* fix: classify omitted artifacts precisely

* fix: preserve artifact scan invariants

* fix: bound depth truncation probes

* fix: bound capped directory enumeration

* fix: constrain truncation probes across the job

* fix: stop exhausted artifact probes
* fix: cancel replay jobs across API and worker processes

* fix: drain worker cancellation watches promptly

* fix: close programmatic cancellation races

* fix: preserve cancellation response ordering

* fix: close distributed cancellation races

* fix: harden cancellation under concurrent load

* fix: make cancellation ownership durable through completion

* fix: recover durable replay outcomes across lost replies

* fix: return atomic cancellation outcomes with aligned retention

* fix: commit native results inside the workspace mutation fence

* fix: claim programmatic execution before stalled-job redelivery
* fix: report deleted persisted files

* fix: reconcile deletions across code runtimes

* fix: preserve protected session inputs

* fix: classify reserved runtime paths
* feat: declare named worker project environments

* fix: preserve environment trust and negotiated action boundaries

* Harden environment loading and executor identity

* Protect environment root traversal and exact config bytes

* Reject self-controlled environment root aliases

* Check filesystem identities at environment trust boundaries

* Validate environment containment across Linux mount aliases

* Handle stacked mounts conservatively without blocking unrelated paths
* fix: Allow Trusted Own-Root Environment Symlinks

* fix: Check Alias Parent Ownership by Filesystem Identity

* fix: Enforce Parent Ownership Across Every Environment Path
* fix: Retain Quarantine After Failed Environment Setup

* test: Run Native Environment Setup Lifecycle in CI

* fix: Document and Verify Local Setup Quarantine Recovery
* fix: decouple repository release versions

* ci: automate releases after successful main builds
danny-avila and others added 26 commits October 6, 2026 01:21
* Harden runner supervisors with anonymous pipes and inherited seccomp

* Load hosted-app netfilter modules in native CI and retain diagnostics

* Keep relay idle on buffered pipe EOF and assert owned descriptor cleanup

* Preserve supervisor DNS resolution without descriptor-send syscalls
* 🧭 feat: Add Guided Worker Setup And Saved Profiles

* 🔒 fix: Keep Pairing Codes Out Of Terminal History

* 🔒 fix: Isolate Secret Prompt Editing State

---------

Co-authored-by: Lia <lia@librechat.ai>
…at-AI#342)

* 🪪 feat: Add Key-Bound Browser Enrollment And Resumable Setup

* 🛡️ fix: Protect Setup State And Legacy Enrollment Fences

* 🔐 fix: Remove Completed Setup Secrets And Bind Pending State To Identity

* 🛡️ fix: Bind Setup Recovery State Across Startup Modes

* 🗝️ fix: Protect The Entire Setup Journal Namespace

---------

Co-authored-by: Lia <lia@librechat.ai>
* 📑 feat: Add Standalone File Extraction Service

* fix: Restrict Worker Control and Preserve Nested Document Text

* fix: Preserve Parser Policy Failures and Startup Restrictions

* fix: Reject Unsupported DOCX Content and Validate OPC XML Parts

* fix: Enforce Complete DOCX Content Structure

* fix: Extract Merged DOCX Cells Once

* fix: Reject Unmappable PDF Font Text

* fix: Normalize Optional PDF Font Encodings

---------

Co-authored-by: Lia <lia@librechat.ai>
* fix: Diagnose Unavailable Worker Commands Without Logging Payloads

* fix: Preserve Diagnostic Correlation And Isolate Async Log Sinks

* fix: Preserve Failure Diagnostics Across Cleanup And Log Boundaries
…-AI#352)

* test: handle descendant adoption races in orphan cleanup

* test: bound asynchronous pipe descriptor cleanup wait
* 📥 feat: Import Chat Uploads Into Attached Workspaces

Add the additive `import_file` workspace operation so a chat's uploaded
files, binaries included, land in an attached BYOM workspace.

Code API verifies the caller owns the stored object with the download
route's session rule, mints a one-object, read-only, short-lived egress
grant, and relays opaque handles to the worker. The worker streams the
object through its file relay upstream into a same-directory temporary
file, enforces the declared size and SHA-256, refuses `.git` paths and
symlinked parents, and installs it atomically as 0644. Identical bytes
are an idempotent no-op; different bytes conflict unless `overwrite`.

The operation is negotiated: Code API offers it only with an egress
gateway, and workers advertise it only with writes enabled and a relay
upstream configured.

* 🛡️ fix: Harden Imports and Make Advertisement Opt-In

- Verify size and SHA-256 on the synced staged file, not just the stream.
- Set created parent directories to 0755 regardless of umask.
- Install disconnect listeners before ownership and grant minting, and
  never dispatch for a caller that already left.
- Authorize durable imports only for new request IDs so retries of an
  existing request stay idempotent after the upload expires.
- Gate worker advertisement behind LIBRECHAT_CODE_ALLOW_WORKSPACE_IMPORTS,
  since older LibreChat releases reject unknown operations.

* 🧹 fix: Tighten Import Cleanup, Stall Timing, and Durable Grants

- Roll back a created parent only while it is still the inode the import
  created; otherwise report a possibly committed mutation.
- Report an unremovable staging file as a possibly committed mutation.
- Arm the stall timer only while waiting on the source, not during writes.
- Revoke a durable import's grant when the queue does not adopt it.

* 🔒 fix: Refuse NTFS Stream Aliases of .git in Import Paths

Compare only the part of each segment before an NTFS stream separator, so
`.git::$INDEX_ALLOCATION` and similar aliases are refused like `.git`.

* ⚡ feat: Advertise Workspace Imports by Default With an Explicit Opt-Out

The code bridge is experimental, so import_file is now on whenever a worker
can perform it (writes enabled and a relay upstream configured). Operators
opt out with LIBRECHAT_CODE_ALLOW_WORKSPACE_IMPORTS=false or
--no-workspace-imports; any other value fails startup.
…AI#347)

* 🔗 fix: Refresh Runtime Module Links After Upgrades

* fix: Preserve Canonical User Module Links

* test: Isolate Input-Cache Route Setup

* fix: Complete Runtime Module Link Migration Paths

* fix: Update Patched Node Runtimes And Align Rollout Defaults

---------

Co-authored-by: Lia <lia@librechat.ai>
* fix(codeapi): pin proxy-addr to 2.0.8 (#4534)

Source: ClickHouse/ai@4215c459945b0de73db0f99d6d86d8b470b96572

* ci(codeapi): mirror upstream node runtime versions

Source: ClickHouse/ai@5f963906ee74d3247802b52ac2cdb8f85a9fcfda

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ibreChat-AI#360)

A root registered by path alone (--worker-dir, --workspace, --environment)
holds no descriptor, so write_file and import_file never created a missing
parent there and reported NOT_FOUND. Yet the worker advertised import_file
on every writable root, so LibreChat's first write of
.librechat/attachments/.gitignore failed on such roots and no chat upload
was ever copied.

A write or import whose parent is missing now borrows a root descriptor for
that one request and runs exactly as it does on a selected project root:
mkdirat anchored to the held fd, root ancestry checked per level, rollback
of directories an import created. A root the worker cannot hold by
descriptor is no longer advertised import_file.
…at-AI#361)

A pathname-only root replaced between its identity capture and its open is
refused as INVALID_PATH instead of rerunning the mutation unanchored against
the replacement.
…ore It Is Held (LibreChat-AI#364)

Source: ClickHouse/ai@183de78d601012ae94f4887c06c06aee77c3bff3

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: danny-avila <110412045+danny-avila@users.noreply.github.com>
* 📦 feat: Add Verified npm Worker Releases

* ⌨️ feat: Use lc-code As The Primary CLI Command

---------

Co-authored-by: Lia <lia@librechat.ai>
…other Redis (LibreChat-AI#398)

The API registers each upload session in Redis and the file server reads it
back to write the `upload:` record that later authorizes the object. Nothing
enforced that the two share a Redis. A file server on another Redis found no
session, stored the object anyway under `upload:null…`, and reported success;
every later download, execution input and `import_file` was then refused.

- File server: refuse an upload whose session is not in its Redis with
  `409 UPLOAD_SESSION_UNKNOWN`, store nothing, and log the cause.
- API: check at startup that `FILE_SERVER_URL` sees a short-lived random key
  written to the API's Redis, through the authenticated
  `POST /internal/store-probe`. A confirmed mismatch makes `/v1/health`
  answer 503 until a re-check passes. An unreachable or older file server is
  inconclusive: one warning, background retries, never a failure.
- Document the pairing requirement in the remote-bridge guide.
Bumps [lxml](https://github.com/lxml/lxml) from 6.0.2 to 6.1.0.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](lxml/lxml@lxml-6.0.2...lxml-6.1.0)

---
updated-dependencies:
- dependency-name: lxml
  dependency-version: 6.1.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Bumps [pypdf](https://github.com/py-pdf/pypdf) from 6.19.0 to 6.21.4.
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](py-pdf/pypdf@6.19.0...6.21.4)

---
updated-dependencies:
- dependency-name: pypdf
  dependency-version: 6.21.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ibreChat-AI#381)

Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.4.0 to 1.4.3.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](digitalbazaar/forge@v1.4.0...v1.4.3)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.4.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…AI#367)

Bumps [body-parser](https://github.com/expressjs/body-parser) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](expressjs/body-parser@v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-version: 2.4.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#400)

* fix: patch remaining service dependency vulnerabilities

* fix: include dependency patches in worker sandbox stages
@busla

busla commented Nov 20, 2026

Copy link
Copy Markdown

Superseded by #16, which carries upstream v1.11.0 (this one stops at v1.10.15) and targets a new branch cut at the upstream tag, aproorg/v1.11.0, instead of merging into apro-deploy. The head branch is left in place.

@busla busla closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants