Skip to content

feat: declarative worker model residency (protocol v3)#255

Merged
PaulFidika merged 3 commits into
masterfrom
feature/declarative-worker-residency
Jul 14, 2026
Merged

feat: declarative worker model residency (protocol v3)#255
PaulFidika merged 3 commits into
masterfrom
feature/declarative-worker-residency

Conversation

@PaulFidika

Copy link
Copy Markdown
Contributor

Summary

  • hard-cut the worker scheduler wire contract to protocol v3
  • replace ordinary model DOWNLOAD/LOAD/UNLOAD commands with full-replace ordered desired disk refs and exact hot endpoint instances
  • report accepted desired generations separately from residency convergence
  • let active RunJob work preempt background reconciliation, then resume the current desired state when idle
  • retain ModelOp only for ADOPT_COMPILE_CACHE; reserve removed enum values 1-3
  • package the matching worker as gen-worker 0.26.0

Contract

DesiredInstance reuses the existing RunJob binding path: function name plus the complete slot-to-immutable-ref map identifies the concrete runnable instance. Same-generation desired state is a valid retry/presigned-URL refresh; only lower generations are stale. Protocol field numbers match the coordinated Tensorhub schema.

This PR must land with the matching Tensorhub protocol-v3 controller change. It should not be merged or released independently.

Validation

  • focused declarative/adoption/real-gRPC suites: 85 passed
  • final focused rerun: 54 passed
  • mypy: 114 source files, zero issues
  • ruff: all changed Python files pass
  • HTTP timeout lint: pass
  • package build: gen_worker-0.26.0 sdist and wheel pass
  • full suite: 1070 passed, 13 skipped, 1 known environment-sensitive CUDA failure

The remaining full-suite failure is tests/test_content_lanes.py::test_lane_swap_moves_only_the_exclusive_module. It reproduces in isolation on the current shared GPU: the synthetic 2.3 GiB budget expects acme/a to demote to RAM, but the installed runtime keeps it in VRAM. None of this PR's touched code is on that budgeting/content-lane path.

@PaulFidika PaulFidika marked this pull request as ready for review July 14, 2026 21:00
@PaulFidika PaulFidika merged commit c2309f6 into master Jul 14, 2026
1 check passed
@PaulFidika PaulFidika deleted the feature/declarative-worker-residency branch July 14, 2026 21:00
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