feat(gateway): bake commonly-bundled-skills/ into image at /opt/#4
Merged
lilyshen0722 merged 1 commit intorebase-2026.3.29from May 6, 2026
Merged
Conversation
Adds an unconditional COPY of `commonly-bundled-skills/` from the build context into `/opt/commonly-bundled-skills/` on the gateway image. Orchestrators stage their bundled skills into that subdirectory before docker build; the image then ships the full content (SKILL.md plus any sub-files) ready for local cp at agent-provision time. Why bake at image-build instead of stream at provision: the agent provisioner has been hitting kubectl exec ARG_MAX (~256KB) when bundles carry sub-files (officecli specialized sub-skills, morph-ppt style refs). Stream-via-stdin doesn't reliably close in @kubernetes/client-node v0.21 (EOF doesn't reach the websocket close frame; remote cat hangs). Pre-baking sidesteps the problem entirely — local cp inside the gateway has no argv cost regardless of size. Consumers without bundled skills should create an empty `commonly-bundled-skills/` directory in the build context to satisfy the COPY (the orchestrator will simply see an empty /opt/.../ at provision time — no behavioral change). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an unconditional COPY of
commonly-bundled-skills/from the build context into/opt/commonly-bundled-skills/on the gateway image.Companion to ADR-013 (Team-Commonly/commonly#287). Orchestrators stage their bundled skills into that subdirectory before docker build; the image then ships the full content (SKILL.md + any sub-files + LICENSE) ready for local
cpat agent-provision time.Why bake at image-build
The agent provisioner has been hitting kubectl exec ARG_MAX (~256KB) when bundles carry sub-files — officecli specialized sub-skills, morph-ppt style refs, etc. Streaming via Exec stdin doesn't reliably close EOF in
@kubernetes/client-node v0.21(EOF doesn't translate to the websocket close frame; remotecathangs forever).Pre-baking sidesteps the problem entirely. The orchestrator emits a tiny
cp -r /opt/commonly-bundled-skills/<id> /workspace/<account>/skills/<id>line per bundled skill, no argv cost regardless of bundle size.Consumer impact
Consumers without bundled skills should create an empty
commonly-bundled-skills/directory in the build context to satisfy the COPY. The orchestrator will simply see an empty/opt/commonly-bundled-skills/at provision time — no behavioral change.For commonly's own deploy: the workflow stages
backend/commonly-bundled-skills/into the build context and removes it after build (Team-Commonly/commonly main).Test plan
commonly-bundled-skills/officecli/SKILL.mdin the build contextkubectl exec gateway -- ls /opt/commonly-bundled-skills/officecli/shows the bundled content/workspace/<account>/skills/officecli/is populated bycp -rwith the full bundled treeofficecli load_skill officecli-pitch-deckand the deck-template guidance loadscommonly-bundled-skills/dir succeeds (no behavioral change)🤖 Generated with Claude Code