Skip to content

fix: realign cockpit worker map with gateway routing#76

Merged
electron-rare merged 1 commit into
mainfrom
fix/cockpit-worker-drift
May 19, 2026
Merged

fix: realign cockpit worker map with gateway routing#76
electron-rare merged 1 commit into
mainfrom
fix/cockpit-worker-drift

Conversation

@electron-rare
Copy link
Copy Markdown
Contributor

Contexte

Audit des câblages routeur ↔ modèles servis (demandé). Le WORKERS du cockpit (gateway_probe.py) avait dérivé du MODEL_FORCE_MAP réel de la gateway.

Constats corrigés

  • Mascarade hardware : les 10 alias kicad/spice/stm32/emc/embedded/platformio/freecad/dsp/iot/power étaient encore attribués à tower-ollama:8004. La gateway (MODEL_FORCE_MAP, PR #100/#102) les force-mappe désormais vers le worker Studio MLX bf16 :9340. → Ajout d'un worker studio-mascarade (:9340) ; tower-ollama réduit aux 2 alias qu'il sert encore (components-review, coder) + l'embed.
  • Double affectation ailiance-granite : présent à la fois sur macm1-mlx et kxkm-granite. La gateway ne le route que vers kxkm-ai :8003. → Retiré de macm1-mlx (évite le double comptage des requêtes sur /status).

Vérification

uv run pytest apps/api/tests118 passed (test test_workers_constant_matches_production_fleet mis à jour : 12 workers).

Hors périmètre — constats d'audit gateway (dépôt ailiance/ailiance)

L'audit end-to-end des 46 alias a montré que 28 ne servent pas leur modèle nommé (repli silencieux sur eu-kiki-gemma). Causes :

  • la gateway déployée est à #100 ; le MODEL_FORCE_MAP complet est déjà dans main à #102 (« post-audit alias and port drift ») mais non déployé ;
  • plusieurs workers Studio sont éteints (apertus :9322 — modèle supprimé, devstral :9316/:9330, flagship :9328, mixtral :9329, gemma4-variants :9335).

Le correctif gateway n'est pas du code à écrire : c'est déployer #102 + rallumer les workers — actions de prod laissées à décision.

The WORKERS constant drifted from the gateway's MODEL_FORCE_MAP:

- The 10 hardware mascarade aliases (kicad/spice/stm32/emc/embedded/
  platformio/freecad/dsp/iot/power) were still attributed to Tower
  Ollama :8004, but the gateway force-maps them to the Studio MLX
  bf16 worker :9340 (PR #100/#102). Added a studio-mascarade worker
  and trimmed tower-ollama to the two aliases it still backs
  (components-review, coder) plus the embed surface.
- ailiance-granite was listed on both macm1-mlx and kxkm-granite;
  the gateway force-maps it only to kxkm-ai :8003. Dropped it from
  macm1-mlx so /status request counts are not double-attributed.
Copilot AI review requested due to automatic review settings May 19, 2026 11:26
@electron-rare electron-rare merged commit 2d3b8b0 into main May 19, 2026
3 checks passed
@electron-rare electron-rare deleted the fix/cockpit-worker-drift branch May 19, 2026 11:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the cockpit’s /status worker inventory (WORKERS) with the gateway’s effective routing/force-mapping so that request counting and surfaced worker metadata reflect production reality.

Changes:

  • Added a dedicated studio-mascarade worker entry (autossh via host.docker.internal:9340) and moved the 10 “hardware mascarade” aliases to it.
  • Restricted tower-ollama to only the remaining gateway aliases it actually backs (components-review, coder, plus embed).
  • Updated the integration test to expect the new worker id and to validate its host.docker.internal URL.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
apps/api/tests/integration/test_status_endpoint.py Updates the production-fleet consistency assertion to include studio-mascarade and its tunnel URL expectation.
apps/api/src/ailiance_demo/services/gateway_probe.py Realigns WORKERS alias-to-worker mapping (adds studio-mascarade, removes duplicate Granite routing on macM1, narrows tower-ollama).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +102 to +103
# kxkm-ai :8003, not macM1. macM1 hosts a granite-4.1-30b model but
# the gateway never routes the alias to it.
# aliases the gateway still force-maps to :8004, plus the embed
# surface.
"id": "tower-ollama",
"label": "Tower · Ollama mascarade :8004",
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.

2 participants