feat(headroom): add compress worker#4197
Draft
jeanduplessis wants to merge 3 commits into
Draft
Conversation
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 a Worker-gated Cloudflare Container deployment for Headroom compression only.
Why this change is needed
Headroom needs a restricted Cloudflare-hosted compression endpoint that can be benchmarked without exposing chat, retrieval, dashboard, or stats surfaces. Compress-only traffic does not need durable CCR retrieval storage, so the deployment can stay stateless and route requests through a Worker guard layer.
How this is addressed
headroom-compressWorker service with a Container binding on port8787and a pinned Cloudflare Registry image reference.POST /v1/compressandGET /readyz; rejects chat, messages, responses, retrieve, dashboard, stats, and other routes before container fetch.Verification
Manual testing performed
headroom-compressto Cloudflare Workers with the pinned Headroom container image.GET https://headroom.kiloapps.io/readyzreturns200.POST /v1/compressreturns401.POST /v1/compressreturns200.404at the Worker layer.logscase compressed9243tokens to333tokens and passed thresholds.Visual Changes
N/A
Reviewer Notes
Human Reviewer
v0.27.0amd64 digest is acceptable until a native amd64 source builder is available. Local arm64 Docker could not build the amd64 Rust extension under QEMU.Code Reviewer Agent
Code Reviewer Notes
/v1/compressand/readyzshould reach behavior paths..dev.vars, threshold failure exit codes, and JSON report output.