Skip to content

Sync code-interpreter 4b41f3a into apro-deploy - #14

Merged
busla merged 91 commits into
apro-deployfrom
sync/2026-11-11
Nov 12, 2026
Merged

busla merged 91 commits into
apro-deployfrom
sync/2026-11-11

Conversation

@AndesBot

@AndesBot AndesBot commented Nov 11, 2026 •

Copy link
Copy Markdown

Changelog against apro-deploy

This PR brings the accumulated upstream work into APRÓ's deploy branch: 289 files changed, 38,723 insertions and 3,762 deletions across 91 commits (including the sync merge). The changelog below describes the net changes from apro-deploy at 8e60715492bf13d7bbadc460915ae8fe4ccbdba9 to this PR at 369d70f9fa66b82e866112e95815f68f9c3dc1a0. The npm release work is only the newest part of this update.

Worker setup and reconnection

  • Guided setup and saved profiles: operators can choose a workspace and its permissions through the setup CLI, save those choices, and start subsequent sessions from the profile. Browser enrollment binds approval to the machine's key and verification code; interrupted setup can resume with the original key and access choices. See packages/code/src/setup-cli.ts, browser-setup.ts, and worker-profile.ts.
  • Recovery after outages: enrolled workers can obtain fresh short-lived credentials using their existing machine key, including at startup, instead of requiring another manual pairing whenever transport credentials expire. The server checks durable enrollment and revocation state; recovery does not clear quarantines or assignment fences. See packages/code/src/credential-recovery.ts and service/src/bridge/pairing.ts.

Parallel coding and reliable requests

  • Independent Git worktree lanes: an opt-in worker setting lets sibling linked worktrees run concurrently within the worker's slot limit. Operations on their parent checkout exclude its lanes, so checkout-wide Git changes cannot race lane work. Registration validates Git metadata; commands protect linked-worktree control files, and results can report the lane's branch and HEAD. Stale managed worktrees gain a guarded retirement lifecycle. See linked-worktrees.ts, linked-worktree-git-guard.ts, lane-git.ts, and worktree-retirement.ts under packages/code/src/.
  • Durable workspace requests: new submit/status/cancel endpoints persist accepted requests in Redis so clients can reconnect after an API restart or a lost response. Repeating the same request ID recovers the submission; reusing it for different work is rejected. Accepted work is not cancelled merely because the client disconnects. Legacy synchronous execution remains available. See service/src/workspace-tools/requests.ts.
  • Queue and command diagnostics: callers can request a bounded queue wait beyond the default 30 seconds, separately from execution time. Capacity failures distinguish work that never started from execution failures. Missing worker commands receive targeted diagnostics, and long command output retains both its beginning and end so final errors survive truncation. See docs/byom-worker-admission.md, command-diagnostics.ts, and output.ts.

Workspace files and edits

  • Import chat uploads directly into a workspace: the new binary-safe import_file operation transfers an upload owned by the caller using a short-lived, single-object egress grant. It verifies size and SHA-256, creates safe missing parents, installs atomically, and refuses conflicting contents unless overwrite is requested. Workers do not receive storage credentials. See packages/code/src/workspace-import.ts and service/src/workspace-tools/import.ts.
  • Bounded file reads and clearer edit failures: workspace reads stream with limits; missing paths return NOT_FOUND. Writes can create missing parents under a held root descriptor, with checks against root replacement and symlink escapes. Failed edit batches report every failing edit and, where read permission allows, the current nearby text. Negotiated tolerant matching and replace-all support reduce retries caused by whitespace differences while preserving atomic batch rejection. See packages/code/src/workspace.ts, root-access.ts, and edits.ts.

Faster environment preparation with storage controls

  • Reuse verified preparation: explicitly declared setup inputs and a readiness check allow a prepared checkout to skip repeated installation. Optional private dependency snapshots restore isolated copies into fresh checkouts on clone-capable filesystems. Operators can grant specific shared npm/uv download caches and Playwright browser stores without sharing entire mutable installations. See environment-preparation.ts, dependency-snapshots.ts, and environment-resources.ts.
  • Bound managed storage growth: free-space checks can reject new setup before it fills the disk; snapshot retention and a preview/apply maintenance command reclaim eligible inactive snapshots while preserving active or unknown data. These are admission and cache-lifecycle controls, not hard disk quotas for arbitrary commands. See snapshot-lifecycle.ts.
  • Trusted-worker GitHub access: an explicit installation-wide token option permits cross-repository operations within the resolved GitHub App installation; repository-scoped tokens remain the default. See packages/code/src/github.ts.

Sandbox security and runtime reliability

  • Replace internal Unix-socket transports with anonymous pipes: tool calls, subprocess stdio and the patched NsJail startup handshake use pipe-based transports. Runner supervisor filtering denies Unix socket creation, descriptor-passing calls and io_uring entry points. Python runtime support and packaged native helpers change with this transport. See api/src/pipe-process.ts, supervisor-policy.c, tool-call-pipe-broker.ts, and docker/nsjail-anonymous-control.patch.
  • Tighten filesystem and runtime boundaries: native commands gain additional protection for Git metadata; root handling rejects pathname replacement races. Runtime/package initialization preserves restored modules, guest startup resolves the packaged pipe addon, and KVM guests can reach host loopback DNS through a bounded relay. See native-sandbox.ts, api/src/entrypoint.sh, docker/package-init.sh, and launcher/entrypoint.sh.
  • Wait for cleanup and expose retained resources: execution responses now wait for job cleanup. Runner metrics and structured logs report retained memory, tmpfs allocation, workspace counts and cleanup outcomes. Optional Helm PodMonitors and explicitly configured scraper ingress expose these samples. Persistent session workspaces remain intentionally preserved. See api/src/job.ts, cleanup-metrics.ts, and helm/codeapi/.

New extraction service and release tooling

  • Standalone PDF/DOCX text extraction: adds a separate authenticated service with structured PDF-page and DOCX-body output, bounded input/output and concurrency, isolated extraction, and network/credential boundary checks. It supports the documented text structures; it is not OCR and rejects unsupported structures. See packages/extraction/.
  • Prebuilt container images: adds GHCR image builds for the API, worker, file server, egress gateway, tool-call server and both runner modes, with commit-specific tags and image revision checks. The README documents how to use matching prebuilt images with Compose. See .github/workflows/images.yml.
  • Verified npm worker releases: builds a single package candidate, checks version/channel and CI on the source commit, then smoke-tests that tarball on Linux and Windows. Opt-in upstream publishing uses the protected npm environment and trusted publishing without rebuilding the candidate. The CLI is presented as lc-code, retaining librechat-code as an alias. See .github/workflows/code-package.yml and scripts/code-package-release.mjs.
  • OpenShell evaluation only: adds a pinned lifecycle probe and security/compatibility criteria. It does not add a production backend or change execution routing. See docs/openshell/README.md.

Upgrade considerations

  • The worker now requires Node.js 22.21 or newer; Node.js 20 is unsupported.
  • Update LibreChat to a version supporting import_file before advertising that capability. Older LibreChat versions must use --no-workspace-imports / LIBRECHAT_CODE_ALLOW_WORKSPACE_IMPORTS=false.
  • Enable credential recovery only after every Code API replica supports it, using a stable recovery server ID and durable Redis state. Compose adds AOF and a named Redis volume; an empty new volume does not migrate an existing in-memory database.
  • Pipe transport changes require matching rebuilt runner images and regenerated snapshots. Hosted-app admission requires the documented legacy IPv4/IPv6 netfilter support.
  • Dependency snapshots require APFS clones or Linux reflinks; keep snapshots disabled on unsupported filesystems.
  • The extraction service and optional worker features need their documented deployment/configuration. This PR does not by itself enable them for APRÓ tenants.

Comparison scope

The review baseline is 8e60715492bf13d7bbadc460915ae8fe4ccbdba9...369d70f9fa66b82e866112e95815f68f9c3dc1a0, matching GitHub's 289-file diff. Commit history alone includes upstream commits whose behavior was already carried into the deploy branch; the changelog is grounded in the resulting diff.

Upstream head incorporated: 4b41f3a97d9cafaf11498b62b1ec6cb9e91c68f0 (no tag). Since the superseded PR #13, upstream advanced only from 2fa9f0d43e8e38b7d6240bc76e2483c6a47c64c7 to that head. That one-commit increment is not the scope of this deployment PR.

Merge and conflicts

The merge had 53 conflicted files. I carried forward the prior sync/2026-11-02 resolutions to preserve APRÓ's deploy customizations. In the four files where the new upstream release and CLI changes overlapped, I retained the deploy changes and applied the upstream additions:

  • packages/code/package.json — applied upstream version, binary names, pack preparation, and provenance metadata.
  • packages/code/src/cli.ts — applied the lc-code command name while preserving the compatibility alias.
  • packages/code/src/cli.test.ts and packages/code/src/projects.test.ts — applied upstream CLI help and usage assertions.

The other 49 conflicted files use their carried-forward resolutions from the prior sync.

Build and tests

  • packages/code: npm ci && npm test; TypeScript build passed. 1,023 tests: 995 passed, 2 failed, 26 skipped.
  • Failures: edits.test.ts newline-dense diagnostic performance threshold; native-sandbox.test.ts trusted Git LFS filter restoration returned empty values.
  • node --test scripts/code-package-release.test.mjs: 25 passed.
  • API and service build/tests not run because Bun is unavailable.
  • npm ci reported 3 high severity audit findings.
  • git diff --check reports whitespace in docker/nsjail-anonymous-control.patch.

Needs a person

Review the two failing package tests and confirm whether they reproduce in CI; review the three npm audit findings, the patch-file whitespace report, and the carried-forward conflict resolutions.

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 23 commits October 5, 2026 09:14
* feat: replace job-visible tool-call sockets with anonymous pipes

* test: Observe Broker Cancellation Through TCP Peer

* fix: Align Bun 1.4.2 and Verify Packaged Pipe Runtime

* chore: Drop Node 20 Support

* fix: Bound Pipe Failure Paths and Package Launcher Runtime
…#312)

* fix: deny socketpairs with pipe-only Python runtime IPC

* test: document and verify Bun socketpair spawn denial

* fix: refresh mutable package-init images during runtime rollout

* test: render runtime rollout chart without optional dependencies

* fix: preserve offline package-init image policy
…-AI#311)

* feat: Report Lane Git Branch And Head On Command Results

The worker reads the checked-out branch and HEAD of the lane a command ran in and attaches them to execute_command results as laneGit. Code API validates the value and forwards it only when CODEAPI_BRIDGE_LANE_GIT is enabled and the worker advertised lane_git.

* fix: Address Review Findings on Lane Git Reporting

Compare a retried settlement with the stored one before replica-local lane Git sanitization, and skip the Git probe until lane_git is negotiated at registration.

* fix: Bound Lane Git Probe and Pass Flag Through Compose

Cap the post-command Git probe to the budget the command left, reserving settlement time, and pass CODEAPI_BRIDGE_LANE_GIT to the api and service-worker compose services.

* fix: Harden Lane Git Probe Bounds and Reported Values

Bound root resolution with the probe limit, enable the probe from the worker's active registration, require HEAD to peel to a commit, and reject Unicode control and format characters in branch names.

* fix: Trust Only Probed Lane Git and Use the Worker Deadline

Assign the lane Git worker on the normal startup path, budget the probe from the worker's assignment deadline, and drop any laneGit supplied by the command executor.

* fix: Reuse Settlement Reads and Preserve Branch Whitespace

Fold lane Git sanitization into the settle path's existing reads instead of a separate pre-pass, and strip only Git's trailing newline from probe output.

* fix: Report Null for Non-UTF-8 Branch Names

Read the lane branch as bytes and decode it strictly, so a ref name that is not valid UTF-8 is reported as null instead of a lossy copy.

* fix: Revalidate Source Git Metadata Before Probing

Probe a source or conversation checkout only while its .git is its own plain directory, so a command that rewrites .git to point at another repository cannot make the host-side probe report that repository's branch and head.

* fix: Reject Linked Refs Before Probing Source Git

Walk refs/ and require every entry to be a plain file or directory before the host-side probe runs, so a ref symlinked to another checkout cannot be followed.

* fix: Guard Linked Lane Refs and Report Full Branch Names

Check a linked lane's metadata HEAD and the shared refs before probing, read the branch from the full symbolic ref instead of --short, and avoid Dirent.parentPath so the refs walk works on Node 20.11.

* fix: Stop the Git Refs Walk When the Probe Aborts

Pass the probe signal into the source and linked worktree metadata checks and check it between directory operations, so an abandoned walk does not keep running after the command result is returned.

* fix: Report Lane Git Only From a Stable Branch Read

Read the branch before and after the head and omit laneGit when it changed in between, so a concurrent checkout cannot pair one branch with another branch's commit.

* fix: Own Object Storage and Pin the Head Before Probing

Require a link-free refs tree and object store with no alternates or reftable before the host-side probe, ignore replacement refs, and read the head from the branch ref the first read named.

* fix: Disable Transports and Lazy Fetch in the Lane Git Probe

Run the probe with no allowed protocols and lazy fetch disabled, so a rewritten .git/config cannot make a missing object trigger a fetch or a transport command on the host.
* 🧭 fix: Relay Loopback Resolvers Into KVM Guests

The KVM launcher forwards the runner's /etc/resolv.conf into the libkrun guest.
Under Docker Compose that names the embedded resolver 127.0.0.11, but the TSI
guest kernel keeps loopback traffic on its own loopback device, so every
service-name lookup in the guest failed. Generated-file uploads and session
marker reads to egress_gateway were dropped with ConnectionRefused or
FailedToOpenSocket, while connections by IP worked.

When the runner has a loopback nameserver, relay it over UDP and TCP port 53
from the runner's own IPv4 address with socat and hand the guest that address
instead. Further loopback nameservers are dropped, routable resolvers such as
Kubernetes cluster DNS are forwarded unchanged, and startup fails if the relay
cannot listen or the runner has no routable address.

* 🧭 fix: Bound the Guest DNS Relay and Relay IPv6 Loopback

Give both relays an idle timeout and cap concurrent TCP children. socat 1.8
fails every UDP-RECVFROM child given max-children, so the UDP relay relies on its
short idle timeout. Treat a `::1` nameserver as loopback too, relaying it over
IPv6 from the same runner address instead of forwarding an address the guest
would only answer locally.

* 🧭 fix: Recognize Every Loopback Resolver Spelling

Classify nameservers as loopback by value rather than by the canonical `::1`
string: zero-padded or compressed IPv6 loopback and IPv4-mapped 127.0.0.0/8 are
relayed too, forwarding over IPv6 to the address exactly as written. Routable
IPv6 resolvers stay untouched.

* 🧭 fix: Parse Nameserver Addresses Before Loopback Detection

Replace string matching with real parsing. IPv6 addresses are expanded to their
eight groups (compressed zeros, dotted IPv4 tails), and IPv4 addresses are read
in the inet_aton(3) forms glibc accepts in resolv.conf. Then ::1 and
IPv4-mapped or plain 127.0.0.0/8 are relayed in any spelling. Mapped addresses
are relayed over IPv4 to their canonical form. Spellings of the same resolver
collapse into one relayed entry, and addresses glibc rejects are forwarded
unchanged.
* 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>
Co-Authored-By: Paperclip <noreply@paperclip.ing>
@stigall195-png

Copy link
Copy Markdown

Looking at the changes around .github/scripts/image-revision.sh for Sync code-interpreter 4b41f3a into apro-deploy, watch out for race conditions and ungraceful state teardown under load. Enforcing an explicit guard pattern before initializing the worker layer prevents silent drops:

  livenessProbe:
    exec:
      command: ['sh', '-c', 'pg_isready -U postgres -h 127.0.0.1']
    initialDelaySeconds: 15
    periodSeconds: 5

If you want to compare against a complete production harness with automated retry isolation and health probes, I packaged our reference implementation here: https://stigall8.gumroad.com/l/d50_s1_go_golang_postgresql_high_availability_cluster_1ed4?utm_source=github_pr&utm_medium=radar_scout&utm_campaign=d50_s1_go_golang_postgresql_high_availability_cluster_1ed4

@busla
busla marked this pull request as ready for review November 12, 2026 14:14
@busla
busla merged commit f3750ed into apro-deploy Nov 12, 2026
43 of 46 checks passed
@busla
busla deleted the sync/2026-11-11 branch November 12, 2026 14:25
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.

9 participants