Add commissioner league division migration hooks#45
Merged
Conversation
5d2b7cf to
9cb3012
Compare
9cb3012 to
152fbdf
Compare
nishu-builder
pushed a commit
to Metta-AI/coworld
that referenced
this pull request
Jun 24, 2026
## Summary - add commissioner migration protocol types to the platform package, including optional `previous_name` for explicit division renames - track the last applied commissioner migration fingerprint on leagues - run idempotent commissioner migration when the selected runtime/config changes: create/rename declared divisions, pass all memberships to the commissioner, apply PMEvents, then archive undeclared divisions - keep scheduling backward-compatible with old commissioner images: unsupported migration config skips migration, unsupported migration events are treated as an empty PMEvent list - stop seed from creating/updating Coworld league divisions or doing the legacy Dirt/Wood membership restructure - add coworld protocol coverage for the new migration request/response message types Commissioner companion: Metta-AI/commissioners#45 ## Validation - `/home/kyleherndon/metta/.venv/bin/ruff check packages/coworld/tests/test_commissioner_protocol.py packages/coworld/src/coworld/commissioner/protocol.py app_backend/src/metta/app_backend/v2/pipeline.py app_backend/tests/v2/test_commissioner_driver.py` - `/home/kyleherndon/metta/.venv/bin/ruff format --check app_backend/src/metta/app_backend/v2/pipeline.py packages/coworld/tests/test_commissioner_protocol.py` - `PYTHONPATH=/home/kyleherndon/worktrees/metta-declared-divisions/app_backend/src:/home/kyleherndon/worktrees/metta-declared-divisions/packages/coworld/src /home/kyleherndon/metta/.venv/bin/pytest packages/coworld/tests/test_commissioner_protocol.py app_backend/tests/test_coworld_commissioner_runtime_config.py app_backend/tests/v2/test_commissioner_driver.py -q` - `NIX_CONFIG='experimental-features = nix-command flakes\naccept-flake-config = true' nix develop .#ci --command bazel test //app_backend/src/metta/app_backend:app_backend_ruff_test --test_output=errors` - `NIX_CONFIG='experimental-features = nix-command flakes\naccept-flake-config = true' nix develop .#ci --command bazel test //packages/coworld/tests:test_commissioner_protocol` - `NIX_CONFIG='experimental-features = nix-command flakes\naccept-flake-config = true' nix develop .#ci --command bazel test //app_backend/tests:v2_test_commissioner_driver_typecheck --test_output=errors --verbose_failures` - `/home/kyleherndon/metta/.venv/bin/alembic -c app_backend/alembic.ini heads` ## Validation blocker - `env METTA_USE_NIX=0 metta lint` could not complete because uv ran out of disk while extracting CUDA/Torch dependencies into `/home/kyleherndon/.cache/uv` (`No space left on device`; latest attempt failed extracting `nvidia-cudnn-cu12==9.10.2.21`).
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
previous_nameon division config so Metta can perform explicit division renamesQualifiersandCompetitionmigration divisions, includingDaily -> Competitionas a rename with no PMEventsCompanion Metta PR: https://github.com/Metta-AI/metta/pull/15956
Validation
/home/kyleherndon/metta/.venv/bin/ruff check commissioners/common/protocol.py commissioners/common/models.py commissioners/common/commissioners.py commissioners/common/adapters.py commissioners/common/server.py commissioners/common/ruleset_strategy/config.py commissioners/common/ruleset_strategy/commissioner.py tests/test_commissioner_strategies.pyuv run pytest tests/test_commissioner_strategies.py -q