Repository navigation
feat: upload, freeze, and export context bundles for Moca - #52
Merged
Merged
Conversation
Moca creates a Context, gives the client a one-time upload capability, freezes the uploaded revision, and downloads that frozen revision as a portable bundle. Context Service stores the bytes and never creates sandboxes. Ported from #50 without the PVC attachment endpoint, which bundle delivery does not need. Adds the frozen-bundle export endpoint, aborts a failed export instead of returning a truncated 200, and starts without a helper image (upload and export are then unavailable). Part of the work split out of rossoctl/moca#455. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Jeremy Cohn <Jeremy.Cohn@ibm.com>
This was referenced Oct 9, 2026
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.
Part of the work split out of rossoctl/moca#455 (the original context-delegation PR). Ports the upload and freeze work from #50 (the original upload/freeze PR, kept open as a reference) onto
mainafter #51 (removed sandbox pools).Moca delivers context to its shared, long-running sandboxes as a bundle. This PR adds what it needs:
POST /internal/v1/contextsPOST {ctx}/upload-capabilitiesPUT /v1/uploads/{id}.contextbundle; a short-lived helper Pod validates it and writes a revisionPOST /internal{ctx}/freezeGET /internal{ctx}/revisions/{sha}/bundleDELETE /internal{ctx}{ctx}is/v1/namespaces/{ns}/contexts/{name}. Trusted calls require Moca's service token (CS_CONTROL_PLANE_TOKEN) and the user Moca acts for (X-Context-Subject).docs/context-upload.mdhas the flow diagram and the limits.Differences from #50:
200.Known limits:
🤖 Generated with Claude Code