Skip to content

feat: add power controls and safe daily self-updates - #2

Closed
fattchris wants to merge 5 commits into
MiaAI-Lab:mainfrom
fattchris:feat/daily-self-update
Closed

fattchris wants to merge 5 commits into
MiaAI-Lab:mainfrom
fattchris:feat/daily-self-update

Conversation

@fattchris

Copy link
Copy Markdown

Summary

  • adds graceful shutdown, Wake-on-LAN, and batch power controls for Spark nodes
  • adds an optional once-daily self-update service for launchd and systemd
  • safely skips dirty, divergent, or non-main working trees
  • fast-forwards, installs dependencies, builds, and redeploys only when updates exist
  • includes an end-to-end shell test for update, no-op, and dirty-tree behavior

Test plan

  • npm test
  • npm run typecheck
  • npm run build
  • installed and exercised the launchd timer on macOS

Assisted-by: Hermes Agent

@MiaAI-Lab

Copy link
Copy Markdown
Owner

Thanks for the contribution — this PR conflicts with main because the power-management pieces (and related UX) were already landed in a series of follow-ups with fixes:

Already on main (v1.1.0) PR
Shutdown / Wake / batch power + shared WoL helper #3
Auto MAC from enP7s7 + optional override #4
Worker node checkbox (simpler than full llmCluster) #5
Worker node header badge #6
Version / CHANGELOG #7

Intentionally not taken from this PR (can be reopened as separate PRs if still desired):

  • Daily self-update service (scripts/self-update.sh + install)
  • Google SSO public read-only proxy
  • Full distributed LLM cluster metadata (llmCluster ranks/roles)
  • docker-compose.override.yml

Closing as superseded to clear the conflicted PR. Happy to review focused PRs for the remaining items.

@MiaAI-Lab MiaAI-Lab closed this Jul 20, 2026
MikeGibbsOnyx added a commit that referenced this pull request Sep 8, 2026
airhamer referenced this pull request in airhamer/herd Sep 23, 2026
- TEST_PLAN: correct known-answer #2 (make-room greedy largest-first);
  add infeasible + needed-excluded known-answers
- ORCHESTRATION: mark 1A (16a6b3d) + 1B (7258098) DONE; queue 2A/2B
- IMPLEMENTATION_PLAN: running log entries for Batch 1 completion
- Gate: 101/101 (1A) + 40/40 (1B) tests pass, 3x runs; live smoke on
  Narthex :30091 verified (health, telemetry, catalog, SIGTERM)
musaasad added a commit to musaasad/sparkDash that referenced this pull request Sep 23, 2026
…template -> guided wizard

Flagship MiaAI-Lab#2. Extends the existing DiscoveryService/RuntimeProvider/probeEndpoint
and the SAME 8-step ModelWizard — no second discovery stack, wizard preserved.

Discovery core (server):
- discoverEndpoint({host,port,scheme?,credRef?}) — read-only GET /v1/models via
  probeUrl/probeEndpoint, runtime via RuntimeProvider.detect, servedModelIds,
  healthClassify (401/403=up), context/apiProtocol/quantization where exposed.
  Returns per-field provenance (detected|probed|user|unknown) + a SUGGESTED
  template (tabbyapi-exl3 / vllm-openai / external-observed / scratch) with
  confidence. Single operator-supplied endpoint, short timeout, cred via secret
  REFERENCE only (value never echoed).
- suggestTemplate(...) — suggestion only, low confidence when runtime uncertain.
- probeCapabilities(...) — OPT-IN, tiny (max_tokens 1, short prompt/timeout),
  text/streaming/vision/tools/reasoning each yes|no|unknown; never a benchmark,
  never a huge context, never destructive. New POST /api/discovery/probe and
  /api/discovery/probe-capabilities; existing GET /api/discovery + /adopt intact.
- Bounded scan: known nodes + configured llmPorts + recipe ports + explicit
  single-node scan; NO blind LAN sweep.

Wizard integration (frontend):
- 'Discover running model' is a prominent first-class path (Models toolbar +
  template picker), alongside Template and Manual.
- DiscoveryForm: bounded host:port + optional credential-ref -> probe -> detected
  fields with provenance badges + overridable suggested template + opt-in tiny
  capability probe -> 'Continue to setup' seeds the wizard (DiscoveredSeed).
- ModelWizard takes a seed prop: prefills Model/Recipe/Runtime/Compute/Options,
  provenance badges inline, every value stays editable, suggested template
  pre-selected but overridable; 'discovered (read-only)' banner states discovery
  is observation not ownership and the endpoint stays external/observed.
- Compute step separates PHYSICAL placement (fleet-backed node multi-select +
  head/workers) from DEPLOYMENT topology (explicit TP/PP/DP/EP, default unknown);
  NEVER infers parallelism from node count; represents SINGLE/TP2/PP3/TP4/TP2+PP2.
- Review shows a provenance-annotated config-only summary + 'CONFIG ONLY — no
  lifecycle action' safety note; discovered external stays external.

Screenshot QA (live TP2 endpoint, read-only GET) confirmed: detected fields +
provenance badges, honest UNKNOWN quantization, overridable vllm-openai
suggestion, opt-in tiny probe, and the discovery->wizard prefill handoff.

Tests 300 FE / 418 server (+31 this commit's workstreams), typecheck + build
green. Lifecycle config-only/dry-run; discovery read-only; no secrets echoed.
musaasad added a commit to musaasad/sparkDash that referenced this pull request Sep 23, 2026
…y, not stale config

The deployment/Models/ModelDetail identity was read from the PERSISTED
deployment.modelId + recipe, which overrode live discovery. After the owner
stopped DeepSeek V4.1 and started GLM-5.3-Flash-EXL3 on DGX MiaAI-Lab#1(head)+MiaAI-Lab#2(worker)
without editing config, the UI still showed DeepSeek + the recipe's 600k context
while the endpoint actually served GLM + 850k.

Live-first precedence (no hard-coding, no string-replace):
- resolveServingModel(): the serving endpoint's /v1/models is authoritative when
  reachable; the persisted recipe/deployment is the offline fallback only.
- A live served-model-name is matched to a registry model by NORMALIZED key
  (id AND name, plus recipe.metadata.servedModelId) so a same-model alias
  (Qwen3.8-Flash-Next-EXL3 ↔ "Qwen 3.8 Flash Next") keeps its friendly name,
  while a genuinely swapped model (GLM) is surfaced as DISCOVERED.
- deploymentViews now shows the live model name/id/context/backend; the Models
  catalog lists discovered live models and keys "deployed" off the effective
  serving model (DeepSeek -> not deployed, GLM -> deployed); ModelDetail renders
  a coherent discovered-model view and flags a registered model whose endpoint
  now serves a different live model ("not currently serving" + link).
- Subtle "· live" provenance marker on diverged instrument cards + context.

Preserves intentional user metadata (recipe topology/endpoint/managedBy/notes,
the DeepSeek registry entry). Qwen auth/key handling unchanged.

Tests: +8 (fleetModel resolveServingModel/normalizeModelKey/deploymentViews,
ModelDetail discovered/superseded/Qwen-no-regression). FE 557, server 529,
typecheck + build green. Verified against the live rendered app + endpoints.
pavelkubicek added a commit to pavelkubicek/sparkDash that referenced this pull request Nov 6, 2026
…eports

- queue priority chips: #0 green, MiaAI-Lab#1 blue, MiaAI-Lab#2 amber, MiaAI-Lab#3 red (queued
  rows only — the proxy exposes admission tier solely on queue waiters)
- Auditor tab: drop the configured-vulnhunt listing; Ready to triage
  now joins scan-scope reports (done + open findings, mirroring the
  auditor UI's isTriageable) alongside findings-ready reports;
  reviews window widened to 200 so older ready anchors stay in the
  findings join
pavelkubicek added a commit to pavelkubicek/sparkDash that referenced this pull request Nov 7, 2026
The proxy declares admission priority purely via the model-alias
-pN suffix (ai.api.proxy priority.js; no request-time override), so
the served model id of a running request yields the same tier the
queue used. Shared TierChip on streaming, non-streaming and queued
rows; #0 green, MiaAI-Lab#1 blue, MiaAI-Lab#2 amber, MiaAI-Lab#3 red, neutral fallback for
deep tiers
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