Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: derive doctor's port block from PORTS instead of a stale range (#8900)
[._.]/ Adam Eivyb2e2f683fa55
diff --git a/scripts/doctor.js b/scripts/doctor.jsindex 3f845cb8e6..2cfd08498d 100644--- a/scripts/doctor.js+++ b/scripts/doctor.js@@ -7,7 +7,7 @@* `lib/slashdo` submodule, four workspace `node_modules` trees, a reachable* Postgres with schema + pgvector, migrations applied, `data/` seeded from* `data.reference/`, pm2, the media toolchain, an optional TLS cert, `gh`- * auth, the 5553–5561 port block) and until now the checks for it were+ * auth, the 5553–5569 port block) and until now the checks for it were* scattered across places that only run once something else is already* working: `checkNodeVersion.js`/`checkNpmVersion.js` fire inside* `npm run dev|start|setup`, `GET /api/system/health/details` needs the server@@ -73,12 +73,14 @@ const FAST_TIMEOUT_MS = 6_000;const WORKSPACES = ['', 'client', 'server', 'autofixer'];/**- * The PortOS-owned port block from `ecosystem.config.cjs` (docs/PORTS.md).- * Anything outside it in `PORTS` belongs to something the operator starts by- * hand (whisper, llama.cpp, the vLLM/SGLang containers) and is none of a fresh- * install's business.+ * The PortOS-owned port block: the core range (`docs/PORTS.md`) plus its+ * 5562-5569 extension band, where PortOS-managed sidecars (whisper, the+ * Eidoverse bridge, JEV, llama.cpp) live alongside the core services.+ * Anything outside it in `PORTS` (the vLLM/SGLang containers, the Tailcat+ * forward port) belongs to something the operator starts by hand and is none+ * of a fresh install's business.*/-const PORT_BLOCK = { min: 5553, max: 5561 };+const PORT_BLOCK = { min: 5553, max: 5569 };/*** Read `PORTS` out of the CJS ecosystem config. Isolated (and defensive) so adiff --git a/scripts/doctor.test.js b/scripts/doctor.test.jsindex da02c4dc37..900652421f 100644--- a/scripts/doctor.test.js+++ b/scripts/doctor.test.js@@ -136,15 +136,32 @@ describe('formatReport', () => {});describe('portBlock', () => {- it('returns only the PortOS-owned 5553-5561 block, deduped and sorted', () => {- // PORTS also carries whisper/llama/vLLM ports the operator starts by hand,- // and lists POSTGRES twice (its own key plus the docker one).+ it('returns only the PortOS-owned 5553-5569 block (core + extension band), deduped and sorted', () => {+ // PORTS also carries vLLM/SGLang/Tailcat-forward ports the operator starts+ // by hand, and lists POSTGRES twice (its own key plus the docker one).const ports = portBlock();expect(ports.length).toBeGreaterThan(0);expect(ports).toEqual([...new Set(ports)].sort((a, b) => a - b));- expect(ports.every((p) => p >= 5553 && p <= 5561)).toBe(true);+ expect(ports.every((p) => p >= 5553 && p <= 5569)).toBe(true);expect(ports).toContain(5555);});++ it('includes the PortOS-managed extension-band sidecars (whisper, eidoverse bridge, JEV, llama.cpp)', () => {+ // Regression for #8900: these are started by PortOS itself+ // (server/services/voice/bootstrap.js, eidoverseHost.js, jev.js), not by+ // the operator, and a stale 5553-5561 range made them invisible to+ // `npm run doctor`'s occupancy probe.+ const ports = portBlock();+ expect(ports).toEqual(expect.arrayContaining([5562, 5563, 5566, 5568]));+ });++ it('excludes operator-run ports outside the PortOS block', () => {+ const ports = portBlock();+ expect(ports).not.toContain(15555); // Tailcat forward+ expect(ports).not.toContain(18020); // vLLM Qwen+ expect(ports).not.toContain(18021); // SGLang Qwen+ expect(ports).not.toContain(18022); // Fleet LLM queue+ });});describe('defaultProbes', () => {