Skip to content

mosaic-compass: fork-specific changes for Porter deployment#4

Merged
EdgarBabajanyan merged 1 commit into
mainfrom
mosaic-fork
May 20, 2026
Merged

mosaic-compass: fork-specific changes for Porter deployment#4
EdgarBabajanyan merged 1 commit into
mainfrom
mosaic-fork

Conversation

@EdgarBabajanyan
Copy link
Copy Markdown
Contributor

  • Add Bearer-token auth middleware (COMPASS_API_KEY env var). All routes except /health require Authorization: Bearer . Constant-time comparison to avoid timing leaks. When the env var is unset the server starts in unauthenticated dev mode with a loud warning.
  • Fix broken healthcheck on both Dockerfiles by installing curl in the runtime stage (docker-compose.yml healthcheck command relies on it).
  • Add scripts/download-models.sh: idempotent pre-deploy job that fetches BGE-small from HuggingFace into the persistent volume. Uses plain curl so no Python is needed at runtime.
  • Add porter.yaml: web service on port 4001, predeploy hook for model download, default env (DATA_DIR, telemetry off).
  • Add MOSAIC.md documenting the fork's divergence from upstream.

Description

Briefly describe the changes in this PR.

Related issue

Fixes #(issue number) or closes #(issue number)

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change
  • Documentation update
  • Performance improvement

Testing

How have you tested these changes? Include steps to reproduce.

Checklist

  • cargo fmt --all is clean
  • cargo clippy --workspace -- -D warnings passes
  • cargo test --workspace passes
  • CHANGELOG.md updated under [Unreleased] section
  • Public API changes have rustdoc comments
  • Behavior changes have a regression test

Before/after (if applicable)

Performance benchmarks, screenshots, or other evidence of the change:

(paste before/after data here)

- Add Bearer-token auth middleware (COMPASS_API_KEY env var). All routes
  except /health require Authorization: Bearer <key>. Constant-time
  comparison to avoid timing leaks. When the env var is unset the server
  starts in unauthenticated dev mode with a loud warning.
- Fix broken healthcheck on both Dockerfiles by installing curl in the
  runtime stage (docker-compose.yml healthcheck command relies on it).
- Add scripts/download-models.sh: idempotent pre-deploy job that fetches
  BGE-small from HuggingFace into the persistent volume. Uses plain curl
  so no Python is needed at runtime.
- Add porter.yaml: web service on port 4001, predeploy hook for model
  download, default env (DATA_DIR, telemetry off).
- Add MOSAIC.md documenting the fork's divergence from upstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@EdgarBabajanyan EdgarBabajanyan merged commit 07c3d2c into runcaptain:main May 20, 2026
5 of 6 checks passed
EdgarBabajanyan added a commit that referenced this pull request May 20, 2026
Revert "Merge pull request #4 from runcaptain/mosaic-fork"
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