Skip to content

Add commissioner league division migration hooks#45

Merged
KyleHerndon merged 1 commit into
mainfrom
kyle/commissioner-division-migrations
Jun 17, 2026
Merged

Add commissioner league division migration hooks#45
KyleHerndon merged 1 commit into
mainfrom
kyle/commissioner-division-migrations

Conversation

@KyleHerndon

@KyleHerndon KyleHerndon commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add commissioner protocol messages for league migration config and migration PMEvents
  • include optional previous_name on division config so Metta can perform explicit division renames
  • let ruleset commissioners declare their division topology from image config
  • populate every bundled ruleset YAML with explicit Qualifiers and Competition migration divisions, including Daily -> Competition as a rename with no PMEvents
  • move legacy Dirt/Wood collapse into the commissioner migration hook

Companion 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.py
  • uv run pytest tests/test_commissioner_strategies.py -q

@KyleHerndon KyleHerndon force-pushed the kyle/commissioner-division-migrations branch from 5d2b7cf to 9cb3012 Compare June 16, 2026 22:51
@KyleHerndon KyleHerndon force-pushed the kyle/commissioner-division-migrations branch from 9cb3012 to 152fbdf Compare June 16, 2026 23:08
@KyleHerndon KyleHerndon merged commit 516de4c into main Jun 17, 2026
7 checks passed
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`).
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