Repository navigation
feat: record models, adapters, benchmarks and promotions in MLflow - #36
Merged
Merged
Conversation
Sync the governed catalog into an MLflow model registry and tracking store, verify it for drift, and keep an append-only promotion history. Governance flows one way: the gateway never reads MLflow. Adds the MLflow server manifest with its own credentials and network policy, renders the governance plan in CD, and documents the external provider path. Co-Authored-By: Claude Opus 5.5 <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.
What
Closes the MLflow gap in the spec (§6, §7.5, §17): "MLflow stores models, adapters, benchmark evidence and lifecycle state" and "tracks artifacts, benchmarks, stages and promotion history". Also documents the external provider path from #35, which shipped without a README section.
How
llm_router.governancesyncs the reviewed catalog into an MLflow model registry and tracking store.staging/productionaliasplanis a pure diff between catalog and store;syncapplies it;verifyexits 3 on drift;historyprints promotions for one subject.deprecated, never deleted, so rollback targets stay on record.deploy/kubernetes/mlflow.yaml: MLflow server with proxied artifacts, its ownExternalSecret(the gateway is never given the database or object-store credentials), and a network policy admitting only the delivery pipeline namespace.governance-plan.jsonalongside the canary plan.Tests
tests/unit/test_governance.py: plan, idempotence, promotion history, supersession, removal, immutability, metadata updates, drift repair, CLI.tests/integration/test_governance_mlflow.py: the same behaviour against a real MLflow client on SQLite, including alias movement on promotion and demotion.Local: ruff and mypy clean, 369 tests pass, 98% coverage, Playwright 9/9.
Limits
syncagainst a live server stays disabled in CD with the rest of deploy.devnow installsmlflow-skinny,sqlalchemyandalembicso CI exercises the real client.🤖 Generated with Claude Code