Skip to content

feat(ci): toolchain volume build pipeline#31

Merged
drewstone merged 2 commits intomainfrom
feat/toolchain-volumes
Mar 25, 2026
Merged

feat(ci): toolchain volume build pipeline#31
drewstone merged 2 commits intomainfrom
feat/toolchain-volumes

Conversation

@drewstone
Copy link
Copy Markdown
Contributor

Summary

Add CI workflow that builds toolchain layers as filesystem tarballs and publishes them as OCI artifacts to GHCR. This is the build side of the toolchain volumes architecture that replaces per-stack Docker images.

Context

See agent-dev-container PR #459 and its RFC for the full architecture.

TL;DR: Instead of building 78 Docker images (3-7 GB each), we build ~5 shared toolchain tarballs that get bind-mounted onto a single thin base container. Cold start drops from 30-200s to 3-10s. Host disk drops from 300+ GB to ~23 GB.

What This Adds

New workflow .github/workflows/toolchain-volumes.yml:

  1. Base toolchain — builds from base/base-system.Dockerfile, exports filesystem as tarball, pushes to ghcr.io/tangle-network/toolchains/base:{sha}
  2. Intermediate layers — builds foundry, rust, go, scientific-python in parallel, pushes tarballs
  3. Manifest — generates JSON mapping all stacks to their required layers (from config.json), pushes to ghcr.io/tangle-network/toolchains/manifest:{sha}

Uses ORAS to push tarballs as OCI artifacts (not Docker images).

What This Does NOT Change

  • docker-publish.yml continues running (builds images for backwards compatibility)
  • config.json unchanged
  • All existing Dockerfiles unchanged

The existing image pipeline and the new volume pipeline run side-by-side until migration is complete, at which point docker-publish.yml can be removed.

Triggers

  • Push to main when base/, intermediate/, config.json, or the workflow itself changes
  • Manual dispatch with specific layers

Host Consumption

Hosts pull with:

oras pull ghcr.io/tangle-network/toolchains/base:latest -o /opt/toolchains/base/
oras pull ghcr.io/tangle-network/toolchains/foundry:latest -o /opt/toolchains/foundry/

The host-agent's ToolchainSyncer automates this (in agent-dev-container PR #459).

🤖 Generated with Claude Code

drewstone and others added 2 commits March 24, 2026 17:23
…mage

Add next, react, react-dom, typescript, tailwindcss, postcss, autoprefixer,
and @types/* packages to the coinbase project's cache_warm configuration.
This populates the npm cache during image build so agent npm install hits
cache instead of downloading ~200 transitive dependencies cold.

Also fix npm cache permissions: the global npm install runs as root,
creating root-owned cache entries. Added chown after install so the
cache_warm step (running as agent) can write to the cache.

Expected impact: reduce npm install from ~80-90s to ~10-20s in the
coinbase-ecommerce benchmark scenario.
New CI workflow that builds toolchain layers as filesystem tarballs
and publishes them as OCI artifacts to GHCR. This runs alongside
the existing docker-publish.yml (which continues building images
for backwards compatibility during migration).

Workflow:
1. Build base toolchain from base-system.Dockerfile → export → push tarball
2. Build intermediate layers (foundry, rust, go, scipy) in parallel → tarballs
3. Generate + publish toolchain manifest (stack → layers mapping from config.json)

Artifacts published to ghcr.io/tangle-network/toolchains/{layer}:{sha}
with :latest tags. Hosts pull with oras and extract to /opt/toolchains/.

See: agent-dev-container PR #459 and docs/rfcs/toolchain-volumes.md
for the full architecture and deprecation plan.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@drewstone drewstone merged commit 3a64923 into main Mar 25, 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.

1 participant