Skip to content

feat: add CLEF-Flash SystemOne runtime - #75

Open
geier wants to merge 4 commits into
mainfrom
feature/issue-70
Open

geier wants to merge 4 commits into
mainfrom
feature/issue-70

Conversation

@geier

@geier geier commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a FastAPI runtime that loads the released CLEF joint-schema module instead of the Qwen generation path
  • validate SystemOne question schemas, serialize GPU inference, bound request bodies, and expose live/ready probes during background model loading
  • add a locked non-root container package and no-CUDA tests for startup, validation, safe failures, concurrency, and adapter loading

Testing

  • uv run ruff format --check .
  • uv run ruff check .
  • uv run pytest (16 passed)
  • uv lock --check
  • uv build

Limitations

  • the real 19 GB model, CUDA execution, and full container run require the H200 deployment task and were not exercised locally
  • this Tetris runtime accepts text or JSON state; HTTP image decoding is intentionally out of scope

Closes #70
Related to #69

@geier
geier requested a balanced review from Copilot October 1, 2026 18:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several schema definitions accept malformed SystemOne questions instead of rejecting them before inference.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds a production-oriented FastAPI runtime for serving CLEF-Flash through its native SystemOne decision interface.

Changes:

  • Adds validated SystemOne endpoints, health probes, bounded requests, and serialized inference.
  • Loads the released joint-schema model through an injectable adapter.
  • Adds locked packaging, a non-root container, documentation, and no-CUDA tests.
File Description
.dockerignore Excludes development artifacts.
Dockerfile Builds and runs the non-root server image.
README.md Documents setup, execution, and probes.
pyproject.toml Defines dependencies and tooling.
uv.lock Locks runtime and model dependencies.
src/​clef_server/​__init__.py Declares the package.
src/​clef_server/​adapter.py Loads and invokes the released model module.
src/​clef_server/​app.py Implements HTTP serving and lifecycle management.
src/​clef_server/​schemas.py Defines request validation schemas.
tests/​test_adapter.py Tests adapter loading failures and invocation.
tests/​test_app.py Tests endpoints, safety, readiness, and concurrency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The liveness endpoint incorrectly fails when model loading fails, creating a potential Kubernetes restart loop.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)

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.

Add a SystemOne runtime for CLEF-Flash

2 participants