Skip to content

Derive worker card label from head's live model (fail-closed) - #79

Open
a2001eric-web wants to merge 1 commit into
MiaAI-Lab:mainfrom
a2001eric-web:feat/worker-derived-label
Open

Derive worker card label from head's live model (fail-closed)#79
a2001eric-web wants to merge 1 commit into
MiaAI-Lab:mainfrom
a2001eric-web:feat/worker-derived-label

Conversation

@a2001eric-web

Copy link
Copy Markdown

Summary

Worker cards showed a hand-maintained workerLabel that went stale on every topology switch (e.g. 02 still said DeepSeek 0731 after moving to GLM-5.3-Flash EXL3). The snapshot now carries workerDerivedLabel, a display-only mirror of the head's live served model.

  • Mirror only when ALL hold: role is worker, workerHeadId resolves to another spark, and the head probe entry is available === true with a non-empty modelId
  • Unavailable/protected entries are skipped (they can retain a stale modelId), so a dead head never yields a stale model — fail-closed
  • A non-empty manual workerLabel still takes display priority; nothing writes back to config/sparks.json
  • Frontend (Overview + Spark header): manual > derived > fallback

Test plan

  • New server/sparks/__tests__/worker-derived-label.test.js: 8 tests (override priority, head-offline, standalone, self/unresolvable head, stale-entry skip pins)
  • Full suite: 180/180 pass
  • tsc --noEmit clean, vite build succeeds
  • Live-verified on a 2-node TP=2 deployment (head + worker): worker card mirrors head's live model; clearing manual label engages auto mode

Worker cards showed a hand-maintained workerLabel that went stale on
every topology switch. The snapshot now carries workerDerivedLabel, a
display-only mirror of the head's live served model: only when role is
worker, workerHeadId resolves to another spark, and the head probe entry
is available with a non-empty modelId. Unavailable entries are skipped
so a dead/protected head never yields a stale model. A non-empty manual
workerLabel still takes display priority; nothing writes back to config.
Adds 8 regression tests (override priority, head-offline, standalone,
self/unresolvable head, stale-entry skip).

@MikeGibbsOnyx MikeGibbsOnyx left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verified locally against current main: clean diff, 180/180 tests pass including 8 new fail-closed worker-label tests, TypeScript check passes, production build passes. Reviewed resolver wiring and UI precedence; manual labels remain authoritative and stale/unavailable head models are excluded.

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