Refactor session summary: mesh-seed model corrections #48

Closed
opened 2026-03-20 02:38:38 +00:00 by Mark · 0 comments
Owner

Current State (as of 2026-03-19)

What we cleaned up this session

Deleted (3 files):

  • runtime/provisioning_orchestrator.py — wrong model, orchestrator should not register as worker_factory
  • runtime/mesh_orchestrator.py — wrong model, mesh nodes collectively negotiate orchestration
  • docker/deployment_worker.py — workers are not docker containers

Fixed docker-compose:

  • Removed worker containers (worker-factory, deployment-worker, mesh-node)
  • Mesh-seed instances now run docker.mesh_node (infrastructure peers)
  • Added second peer for multi-node testing

Correct Mesh-Seed Model

Intent lifecycle:

Gateway: intent.discovered (on Redis bus)
  → all mesh-seed peers see it
  → node propagates to capability-matching intent channels
  → workers whose contracts match → bid against each other
  → first valid claim recorded in ledger → contract issued
  → execution → result.committed
  → node propagates unconsumed results to ledger/registry
  → output layer delivers to callback_url

Key principles:

  • Workers are ephemeral execution agents — not docker containers, not long-running
  • Nodes are infrastructure peers that propagate signals they don't consume
  • Nodes route on capabilities (hardware/software/environment features)
  • Workers bid on contracts (intent terms like budget, deadline, outcome)
  • First valid claim wins — recorded immutably in ledger
  • mesh_federation handles multi-node coordination

What docker defines:

  • Redis (backplane)
  • Gateway (HTTP entrypoint)
  • Mesh-seed instances (infrastructure peers)

What docker does NOT define:

  • Workers (ephemeral, via intent bus)
  • Orchestrators (mesh nodes collectively handle this)

docker/mesh_node.py changes

  • Subscribes to intent channels per capability (intent.discovered.{capability})
  • Capacity-aware routing: if local workers saturated, forwards to mesh.intent.route
  • Updated docstring

docker/README.md updated

Reflects correct model: workers are ephemeral, nodes propagate, workers bid and claim.

Still needs work

  • test_mesh_native_provisioning.py references deleted orchestrator — update or remove
  • test_provision_worker_flow.py references deleted orchestrator — update or remove
  • test_multi_node.py references deleted MeshOrchestrator — update to use MeshFederation
  • test_intent_messaging_simple.py, test_intent_messaging_unit.py — orphaned, clean up
  • k8s/operator.py uses deleted MeshOrchestrator — update or flag
  • runtime/auto_scaler.py line 37 references non-existent runtime/mesh_node.py — fix to docker.mesh_node
  • runtime/ingress_coordinator.py uses deleted runtime/mesh_node.py — fix imports
  • runtime/mesh_worker.py has LSP errors on SeedBackplane.consume — verify this exists
  • Need ingress capability / ingress coordinator worker definition
  • Need provision_worker intent handler that actually provisions workers
  • docker/mesh_node.py _has_local_capacity uses list_agents() — verify this method exists
  • capabilities/_muscle/worker_factory/ changes from earlier session may need review

Tests still referencing deleted files

tests/integration/test_multi_node.py — MeshOrchestrator
tests/chaos/test_network_partitions.py — MeshOrchestrator
test_provision_worker_flow.py — orphaned
test_intent_messaging_simple.py — orphaned
test_intent_messaging_unit.py — orphaned
test_mesh_native_provisioning.py — orphaned

Open architectural questions

  1. How does provision_worker intent actually work — who handles it and how?
  2. What's the relationship between worker_factory capability and provisioning?
  3. Ingress coordinator — separate worker or part of mesh-seed node?
  4. How should capabilities be defined/enabled on mesh-seed nodes?
## Current State (as of 2026-03-19) ### What we cleaned up this session **Deleted (3 files):** - `runtime/provisioning_orchestrator.py` — wrong model, orchestrator should not register as `worker_factory` - `runtime/mesh_orchestrator.py` — wrong model, mesh nodes collectively negotiate orchestration - `docker/deployment_worker.py` — workers are not docker containers **Fixed docker-compose:** - Removed worker containers (`worker-factory`, `deployment-worker`, `mesh-node`) - Mesh-seed instances now run `docker.mesh_node` (infrastructure peers) - Added second peer for multi-node testing ### Correct Mesh-Seed Model **Intent lifecycle:** ``` Gateway: intent.discovered (on Redis bus) → all mesh-seed peers see it → node propagates to capability-matching intent channels → workers whose contracts match → bid against each other → first valid claim recorded in ledger → contract issued → execution → result.committed → node propagates unconsumed results to ledger/registry → output layer delivers to callback_url ``` **Key principles:** - Workers are **ephemeral execution agents** — not docker containers, not long-running - Nodes are infrastructure peers that **propagate** signals they don't consume - **Nodes route on capabilities** (hardware/software/environment features) - **Workers bid on contracts** (intent terms like budget, deadline, outcome) - First valid claim wins — recorded immutably in ledger - mesh_federation handles multi-node coordination **What docker defines:** - Redis (backplane) - Gateway (HTTP entrypoint) - Mesh-seed instances (infrastructure peers) **What docker does NOT define:** - Workers (ephemeral, via intent bus) - Orchestrators (mesh nodes collectively handle this) ### docker/mesh_node.py changes - Subscribes to intent channels per capability (`intent.discovered.{capability}`) - Capacity-aware routing: if local workers saturated, forwards to `mesh.intent.route` - Updated docstring ### docker/README.md updated Reflects correct model: workers are ephemeral, nodes propagate, workers bid and claim. ### Still needs work - [ ] `test_mesh_native_provisioning.py` references deleted orchestrator — update or remove - [ ] `test_provision_worker_flow.py` references deleted orchestrator — update or remove - [ ] `test_multi_node.py` references deleted MeshOrchestrator — update to use MeshFederation - [ ] `test_intent_messaging_simple.py`, `test_intent_messaging_unit.py` — orphaned, clean up - [ ] `k8s/operator.py` uses deleted MeshOrchestrator — update or flag - [ ] `runtime/auto_scaler.py` line 37 references non-existent `runtime/mesh_node.py` — fix to `docker.mesh_node` - [ ] `runtime/ingress_coordinator.py` uses deleted `runtime/mesh_node.py` — fix imports - [ ] `runtime/mesh_worker.py` has LSP errors on `SeedBackplane.consume` — verify this exists - [ ] Need ingress capability / ingress coordinator worker definition - [ ] Need provision_worker intent handler that actually provisions workers - [ ] docker/mesh_node.py `_has_local_capacity` uses `list_agents()` — verify this method exists - [ ] `capabilities/_muscle/worker_factory/` changes from earlier session may need review ### Tests still referencing deleted files ``` tests/integration/test_multi_node.py — MeshOrchestrator tests/chaos/test_network_partitions.py — MeshOrchestrator test_provision_worker_flow.py — orphaned test_intent_messaging_simple.py — orphaned test_intent_messaging_unit.py — orphaned test_mesh_native_provisioning.py — orphaned ``` ### Open architectural questions 1. How does `provision_worker` intent actually work — who handles it and how? 2. What's the relationship between `worker_factory` capability and provisioning? 3. Ingress coordinator — separate worker or part of mesh-seed node? 4. How should capabilities be defined/enabled on mesh-seed nodes?
Mark 2026-06-16 15:06:41 +00:00
  • closed this issue
  • removed the
    quickfix
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#48
No description provided.