Skip to content

kit-46-standalone-hub: A hub that runs on its own (devteam.mjs hub), and dashboards that leave the hub to the image when its ENV says so - #238

Merged
hhff merged 25 commits into
mainfrom
ticket/kit-46-standalone-hub
Nov 15, 2026
Merged

hhff merged 25 commits into
mainfrom
ticket/kit-46-standalone-hub

Conversation

@hhff

@hhff hhff commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

A hub that runs on its own, and dashboards that leave the hub to the image when its ENV says so (feature box-latest-hub, BOXHUB-S1/S2; design: home's project/designs/the-cloud-box-always-runs-the-latest-hub.md).

Summary

  • devteam.mjs hub [--release vX.Y.Z]: a machine-wide command that runs startHub's server alone (the same request handler, every press check unchanged). It stays up and retries every DEVTEAM_HUB_RETRY_MS whatever holds the port (a non-hub holder or another listen error logged once), logs to stderr and ~/.devteam/hub-<port>.log (never past 1 MB, the full one moved to .1), installs the dashboard's crash and signal logging (now one helper, processLog), and runs owner actions from its own cwd.
  • /instances.json gains a top-level kit, fixed at start: hub --release's release with image: true; else the running kit's version (kitVersion()), or null for a kit with no project. No hub reads DEVTEAM_KIT_RELEASE. The comment above startHub states the list's rule: additive changes keep hub: 1.
  • A dashboard skips startHub when DEVTEAM_IMAGE_HUB is a plain port equal to its hub port, and writes hub: left to the image (DEVTEAM_IMAGE_HUB=<port>) once to run/dashboard.log.
  • machine status: machine: hub <port> up, kit <release> (image) / up, kit <release> / up, kit ? / up, not a hub / DOWN, the alert suffix unchanged; a kit from the network is printed only in a release's own characters.
  • kit-201's DEVTEAM_RUN check exempts hub, as it does the machine's other commands.
  • README "Many projects, one machine": the image's hub on a box, and the gap left (an older project kit can take the port while the image's hub restarts).

How to verify

  • node --test test/hub-overview.test.mjs test/operator-threads.test.mjs test/machine.test.mjs test/dashboard.test.mjs (CI: test.yml, every job).
  • New tests: hub-overview (the standalone hub from a non-git kit copy and a non-project cwd; kit/image variants; a bad --release; retry and takeover; the 1 MB log; SIGTERM; the DEVTEAM_IMAGE_HUB skip), operator-threads (unsigned, replayed, foreign Origin/Host, missing or same-site Sec-Fetch-Site, non-JSON and cross-site reads refused against a box-mode standalone hub; a signed press reaches the operator's pane), machine (the five hub lines, a holder that drips, the alert suffix), and the hub with another home's DEVTEAM_RUN.
  • Records: docs/devteam-dev/tickets/kit-46-standalone-hub/ (spec, plan, reviews, verification, the box baseline).

One-way doors

None.

🤖 Generated with Claude Code

hhff and others added 21 commits November 14, 2026 21:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(task reviews 1 and 4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chine's other commands are

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff
hhff marked this pull request as ready for review November 14, 2026 23:50
hhff and others added 4 commits November 15, 2026 00:12
…ect's own (final-1b F1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff
hhff merged commit 78adb4a into main Nov 15, 2026
9 checks passed
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.

1 participant