Derive worker card label from head's live model (fail-closed) - #79
Open
a2001eric-web wants to merge 1 commit into
Open
Derive worker card label from head's live model (fail-closed)#79a2001eric-web wants to merge 1 commit into
a2001eric-web wants to merge 1 commit into
Conversation
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
approved these changes
Sep 6, 2026
MikeGibbsOnyx
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Worker cards showed a hand-maintained
workerLabelthat went stale on every topology switch (e.g. 02 still said DeepSeek 0731 after moving to GLM-5.3-Flash EXL3). The snapshot now carriesworkerDerivedLabel, a display-only mirror of the head's live served model.workerHeadIdresolves to another spark, and the head probe entry isavailable === truewith a non-empty modelIdworkerLabelstill takes display priority; nothing writes back toconfig/sparks.jsonTest plan
server/sparks/__tests__/worker-derived-label.test.js: 8 tests (override priority, head-offline, standalone, self/unresolvable head, stale-entry skip pins)tsc --noEmitclean,vite buildsucceeds