Skip to content

Sync upstream v1.11.0: our patch stack onto aproorg/v1.11.0 - #16

Merged
busla merged 7 commits into
aproorg/v1.11.0from
sync/v1.11.0
Nov 20, 2026
Merged

busla merged 7 commits into
aproorg/v1.11.0from
sync/v1.11.0

Conversation

@busla

@busla busla commented Nov 20, 2026 •

Copy link
Copy Markdown

Upstream v1.11.0 (c7bf37d) with our patches replayed on top. The base branch aproorg/v1.11.0 is cut at the upstream tag, so this pull request shows only what we carry: 7 commits, 20 files.

This replaces the old flow of merging upstream into apro-deploy and squashing. It supersedes #15 (v1.10.15).

What to check

  • The resulting tree is byte-identical to a plain git merge v1.11.0 into sync/2026-11-16 (the branch behind Sync code-interpreter v1.10.15 into apro-deploy #15), which merged without conflicts. Nothing was resolved by hand beyond that merge result.
  • CI on this pull request is the real verification. I did not run the test suites locally.

Stack

Commit Author Note
fix(runner): strip clone_newcgroup when cgroups are disabled Jón Levy
fix(runner): exec bun by absolute path in the entrypoint Jón Levy also carries the smoke-dir chown fix (fbb455c)
fix(file-server): resolve S3 credentials through the AWS SDK default chain Jón Levy also carries the minio Client import fix (#5, aacee18)
feat(redis): cluster-safe keys for the api, worker and file-server paths Jón Levy
feat(runner): add pandoc and WeasyPrint for offline PDF rendering (#2) Tómas Pálsson also carries office rendering and OCR (#6, 380589e)
fix(service): hash-tag job cancellation keys for Redis Cluster (#7) Tómas Pálsson
🎟️ fix: Never Reuse MicroVM Launch Tokens After a Counter Reset (#9) Tómas Pálsson

Three of the original ten commits conflicted with upstream changes to the same file and were folded into the commit before them; each absorbing commit says so in its message.

Our fork vs. upstream after the merge (re-checked 2026-11-30)

  • aproorg/v1.11.0 (c4ba504) = upstream tag v1.11.0 (c7bf37d) + the 7 commits above: 20 files, +341 / −91. Nothing else. Unchanged since the merge on 2026-11-20.
  • The merged tree (d19c5a7) is byte-identical to this PR's head (4a4470e), so nothing changed during the merge.
  • apro-deploy (f3750ed, last moved by Sync code-interpreter 4b41f3a into apro-deploy #14 on 2026-11-12) has no commits that are missing from aproorg/v1.11.0. Every + from git cherry is either folded into the stack above or is an old upstream-merge/sync commit.
  • v1.11.0 is still the newest upstream release, so no newer sync is due. services.yaml already points code-interpreter at deploy_branch: aproorg/v1.11.0.
  • The fork's main is identical to upstream main (c7bf37d).

Merging and adopting

  • Merge with Rebase and merge, not squash, so each patch stays its own commit.
  • apro-deploy stays untouched as the previous version.
  • Adopting this version is one line in vitinn-infra: deploy_branch: aproorg/v1.11.0 for code-interpreter in services.yaml. Done.

🤖 Generated with Claude Code

busla and others added 7 commits November 20, 2026 10:51
With SANDBOX_USE_CGROUPV2=false (required on AWS Lambda MicroVMs) the
entrypoint removed cgroup_* limits but left clone_newcgroup: true, so
nsjail tried to create cgroup v1 directories under /sys/fs/cgroup and
exited 255, killing the smoke test and the MicroVM image build.

(cherry picked from commit ff4e922)
The Lambda MicroVM guest does not carry the image's PATH, so the final
exec of the sandbox API failed and the hookless image build reported
'An unknown error occurred'.

(cherry picked from commit c4b562f)

Also carries: fix(runner): do not abort the boot when the smoke-dir chown fails (fbb455c), folded in when replaying onto v1.11.0.
…chain

minio's IamAwsProvider cannot fetch ECS/Fargate container credentials
(169.254.170.2 request fails with an undefined status), so file-server
could never reach S3 with a task role. When no static MINIO_ACCESS_KEY
is set and IRSA is not configured, wrap the AWS SDK default credential
chain as the minio credentialsProvider instead.

(cherry picked from commit 84be06a)

Also carries: fix(file-server): import minio Client as a value again (#5, aacee18), folded in when replaying onto v1.11.0.
ElastiCache Serverless (Valkey) is always cluster mode, so every multi-key
script, MULTI/EXEC and MGET must stay in one hash slot. Follows the key shapes
of upstream PR #17 so this can be dropped when that lands:

- redis-connection.ts: isClusterMode (USE_REDIS_CLUSTER), bullmqPrefix
  ('{codeapi}' in cluster mode, BullMQ's default otherwise), hashTag.
- runtime-session registry: rtsx:{sess,lock,gen,ckptseq}:{<id>} so the
  record+lock scripts are single-slot (not covered by PR #17).
- replay state: exec_state/exec_lock/exec_result/tool_history:{<id>};
  the stale-execution sweep reads with pipelined GETs instead of a
  cross-slot MGET.
- BullMQ prefix on every Queue/Worker/QueueEvents, including hosted apps.

Bridge, egress ledger and tool-call server are not covered (not used by
this deployment).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wzy53QgK2dCkSKvEFTySD1
(cherry picked from commit f3d54ae)
Static pandoc 3.11 (sha256-pinned), WeasyPrint's Pango/HarfBuzz runtime libs,
and weasyprint + mermaidx in /pkgs, so the apro-pdf skill can render branded
PDFs inside the jail without Chrome or network.

(cherry picked from commit d4fd61d)

Also carries: feat(runner): render office documents and OCR text in the sandbox (#6, 380589e), folded in when replaying onto v1.11.0.
Programmatic jobs failed with CROSSSLOT on cluster-mode Redis: the
claim/commit/cancel scripts touch a job's marker, :result and :execution
keys, which hashed to different slots. The worker failed the job but the
API waited out JOB_TIMEOUT (~5 min) before returning a bare error.

Wrap the per-job part of the key in a hash tag, and reconcile active jobs
with one GET per job instead of a cross-slot MGET.

(cherry picked from commit ad213ba)
Stateful runtime sessions launch with clientToken sess-<rt>-<generation>.
The rtsx:gen counter expires with the session record (max duration + 10
minutes), and the next allocation returned the fixed config-derived seed
again. A user returning after an idle night therefore resent the token of
their first launch. AWS still remembers it and rejects the reuse with
"The provided clientToken was used with different request parameters",
even for a byte-identical request. That validation failure is not
transient, so the PENDING intent kept the token and every later request
replayed it until AWS forgot the token (about 24h in eu-west-1).

- Salt the session and hosted-app generation seeds with random bytes so a
  reset counter always starts at a new generation. Token shape, range and
  length are unchanged; the allocate script still never lowers a live
  counter.
- Retire a PENDING intent when AWS rejects its token as reused. AWS
  launched nothing, so the next request allocates a fresh generation.
- Tests: registry loss on an unchanged config must not resend the token,
  and a reuse rejection must not be replayed. Fixtures that used the seed
  as a constant compute it once; seed tests assert the salt.

(cherry picked from commit cfd373d)
(cherry picked from commit 8e60715)
@busla
busla merged commit c4ba504 into aproorg/v1.11.0 Nov 20, 2026
38 checks passed
@busla
busla deleted the sync/v1.11.0 branch November 20, 2026 11:34
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.

2 participants