Skip to content

Commit d063700

Browse files
committed
fix(scripts): default health sidecar to port 4043 (Docker owns 4040-4042)
com.docker.backend.exe listens on 4040-4042 on Windows Docker Desktop, so the sidecar's original default failed to bind. 4043 verified free; runtime-probed /health and /version live (200) on the new default.
1 parent b795772 commit d063700

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎.opencode/scripts/health-check.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* bun .opencode/scripts/health-check.ts
1515
*
1616
* Configuration (env):
17-
* HEALTH_CHECK_PORT listen port (default 4040)
17+
* HEALTH_CHECK_PORT listen port (default 4043 — 4040-4042 are owned by Docker Desktop's backend on Windows)
1818
* HEALTH_CHECK_HOST listen host (default 0.0.0.0)
1919
* BUILD_SHA git short SHA injected at build time (default "unknown")
2020
* BUILD_DATE build date injected at build time (default "unknown")
@@ -27,7 +27,7 @@ import { readFileSync } from "node:fs"
2727
import { fileURLToPath } from "node:url"
2828
import { dirname, resolve as pathResolve, join as pathJoin } from "node:path"
2929

30-
const PORT = Number.parseInt(process.env.HEALTH_CHECK_PORT ?? "4040", 10) || 4040
30+
const PORT = Number.parseInt(process.env.HEALTH_CHECK_PORT ?? "4043", 10) || 4043
3131
const HOST = process.env.HEALTH_CHECK_HOST ?? "0.0.0.0"
3232
const BUILD_SHA = process.env.BUILD_SHA ?? "unknown"
3333
const BUILD_DATE = process.env.BUILD_DATE ?? "unknown"

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const table = sqliteTable("session", {
165165
This repo is the Alterspective fork (`origin` = `Alter-Igor/opencode`, `upstream` = `anomalyco/opencode`). We work fork-locally: no upstream PRs; keep every local change small and in low-churn files so `git fetch upstream && git merge upstream/dev` stays clean. After any upstream sync: `bun install`, `bun typecheck` from package dirs, `bun test` from `packages/core` and `packages/opencode` (some tests fail on Windows pre-existing — compare against the pre-merge baseline before blaming the sync).
166166

167167
- **Our patches**: `packages/opencode/src/provider/vision-proxy.ts` (vision proxy middleware for text-only models), wired via `wrapLanguageModel` middleware in `packages/opencode/src/session/llm.ts`. Regression test: `packages/opencode/test/provider/vision-proxy.test.ts` — run it after every upstream sync.
168-
- **Alterspective integration** (`.opencode/` only — zero `src/` changes, upstream can't conflict): plugins `plugin/synapse-coder-reporter.ts` (LSP-diagnostics paired-correction reporter to Synapse Coder staging; env-gated `SYNAPSE_CODER_REPORTER_ENABLED`, offline queue `.opencode/synapse-coder-queue.json`, first-use TUI toast) and `plugin/alterspective-rag-standards.ts` (standards system-prompt injection via `experimental.chat.system.transform`); `scripts/health-check.ts` (health/version sidecar, port 4040); `opencode.jsonc` wires Alterspective MCPs (synapse-coder via canonical host `staging.synapse-coder-mcp.alterspective.com.au`, alterspective-rag, keystone, timely, sharedo, vault-local, azure-devops — local entries need `command: string[]` + `environment` + `enabled`, not `args`/`env`). Tests: `packages/opencode/test/plugin/synapse-coder-reporter/` and `test/plugin/alterspective-rag-standards/` — run after upstream syncs. Plan + evidence: `docs/implementation/current/SYN-001-synapse-coder-reporter/` (merged PRs #1, #2).
168+
- **Alterspective integration** (`.opencode/` only — zero `src/` changes, upstream can't conflict): plugins `plugin/synapse-coder-reporter.ts` (LSP-diagnostics paired-correction reporter to Synapse Coder staging; env-gated `SYNAPSE_CODER_REPORTER_ENABLED`, offline queue `.opencode/synapse-coder-queue.json`, first-use TUI toast) and `plugin/alterspective-rag-standards.ts` (standards system-prompt injection via `experimental.chat.system.transform`); `scripts/health-check.ts` (health/version sidecar, default port 4043 — 4040-4042 are owned by Docker Desktop's backend on Windows); `opencode.jsonc` wires Alterspective MCPs (synapse-coder via canonical host `staging.synapse-coder-mcp.alterspective.com.au`, alterspective-rag, keystone, timely, sharedo, vault-local, azure-devops — local entries need `command: string[]` + `environment` + `enabled`, not `args`/`env`). Tests: `packages/opencode/test/plugin/synapse-coder-reporter/` and `test/plugin/alterspective-rag-standards/` — run after upstream syncs. Plan + evidence: `docs/implementation/current/SYN-001-synapse-coder-reporter/` (merged PRs #1, #2).
169169
- **Alterspective branding** (TUI): `packages/tui/src/theme/assets/alterspective.json` (brand palette theme, registered in `theme/index.ts`), fork default theme set to `alterspective` in `packages/tui/src/context/theme.tsx`, ALTERSPECTIVE ASCII wordmark in `packages/tui/src/logo.ts` (shared by `util/presentation.ts` epilogue via import), home splash left-aligned per brand rule LOGO-001 in `packages/tui/src/routes/home.tsx`. After upstream syncs touching these files, re-verify the wordmark renders (bun -e render check) and the theme still registers.
170170
- **Windows env**: `turbo.json` `globalPassThroughEnv` includes `NODIST_PREFIX`/`NODIST_X64` — required so the Nodist node shim works under turbo's strict env-mode (the pre-push hook's 30-package typecheck fails without it). Do not remove.
171171
- **Symlinks**: Windows has no symlink privilege here, so repo symlinks check out as text placeholders. The two typecheck-blocking ones (`packages/app/src/custom-elements.d.ts`, `packages/enterprise/src/custom-elements.d.ts`) are replaced with local hardlinks hidden via `git update-index --skip-worktree` (list them: `git ls-files -v | Select-String '^S'`). ~60 asset symlinks (favicons etc.) remain placeholders — harmless for typecheck/TUI, but app/web builds serving those assets need Developer Mode enabled first.

0 commit comments

Comments
 (0)