Skip to content

v3.44.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 02:58
· 4 commits to main since this release
dd0f81b

v3.44.0 — 2026-11-27

Added

  • Open-LAN boot gate & OCP_ALLOW_OPEN_LAN=1 (ADR 0026, #544): server.mjs now refuses to boot (FATAL: + exit 1 before server.listen()) when binding to a non-loopback address (CLAUDE_BIND=0.0.0.0, ::, or a LAN/Tailscale IP) with open auth (CLAUDE_AUTH_MODE=none, shared without PROXY_API_KEY, or an unrecognised mode) and host-side tools granted (TOOLS_GRANTED, i.e. not multi), mirroring the existing TUI (OCP_TUI_ALLOW_LAN=1) and OCP_LOCAL_TOOLS boot gates. Operators intentionally running open LAN behind a separate network boundary (firewall/VPN) can opt in explicitly with OCP_ALLOW_OPEN_LAN=1 (emits a boot warning and banner line). setup.mjs --bind <non-loopback> now defaults --auth-mode to multi when omitted, and ocp lan steers to authenticated LAN setup. Not endpoint-touching; no request/response contract or B.2 key-set change.
  • OCP_TRUST_LOOPBACK=0 (ADR 0025, #542): opt-out of implicit loopback trust for OCP instances behind a same-host reverse proxy (nginx/Caddy connecting from 127.0.0.1/::1). When "0", loopback requests go through the same AUTH_MODE check, isAdmin check, and /health anonymousKey gate as non-loopback callers instead of bypassing auth and receiving automatic admin. Default (1 / unset) is unchanged, plus a one-shot loopback_forwarded_header_seen warning log when a loopback request carries X-Forwarded-For or Forwarded while auth is enabled and loopback trust is still on. Class Hybrid, ADR 0006 route (b).
  • Claude Fable 5.2 (claude-fable-5-2) and Claude Haiku 5.5 (claude-haiku-5-5). Class B.1 — GET /v1/models lists two more ids, shape unchanged (OpenAI "List models"; ADR 0006). Values read id-anchored from the Claude Code CLI 2.1.323 registry: both context.window 1e6 and max_output_tokens.default 128000, and both list adaptive_thinking (reasoning: true, unlike Haiku 4.5); a live claude -p --model <id> answers for each. No alias moves: haiku stays on claude-haiku-4-5-20251001, because the usage probe (fetchUsageFromApi) sends a bare max_tokens: 1 request to that alias to read the anthropic-ratelimit-unified-* headers, and the same request to claude-haiku-5-5 was answered 429 rate_limit_error without those headers (measured once, 2026-11-22, on a subscription OAuth token whose 5-hour window stood at 0.83; Haiku 4.5 answered 200 with the headers). ocp-connect gets a row for each, since longest-prefix-wins would under-advertise both.
  • Claude Fable 5 (claude-fable-5), Claude Opus 4.5 (claude-opus-4-5) and Claude Sonnet 4.5 (claude-sonnet-4-5). Class B.1 — GET /v1/models lists three more ids, shape unchanged. Every Claude model in the CLI 2.1.289 registry that answers a live claude -p --model <id> on the subscription pool is now exposed; values read id-anchored from that registry (Fable 5: 1e6 / 64000; Opus 4.5 and Sonnet 4.5: 200000 / 32000). Left out on purpose: claude-opus-4-1 and claude-opus-4-0 (the CLI silently remaps them to Opus 5.5), claude-mythos-5 and claude-mythos-5-1 (access-restricted), and the retired claude-sonnet-4-0, claude-3-7-sonnet, claude-3-5-sonnet and claude-3-5-haiku. ocp-connect gets rows for Fable 5 and Opus 4.5, whose values differ from what prefix matching would give them.
  • Claude Fable 5.1 (claude-fable-5-1). Class B.1 — GET /v1/models lists one more id, shape unchanged (OpenAI "List models"; ADR 0006). Added to models.json (the SPOT, ADR 0003) with the values read id-anchored from the Claude Code CLI 2.1.289 registry: context.window 1e6, max_output_tokens.default 64000 (upper 128000). No alias: opus stays on claude-opus-5-5. ocp-connect gets its own row, since no claude-fable family row exists and the unknown-id floor would under-advertise it.

Changed

  • API keys are stored hashed at rest (sha256:<hex>) instead of plaintext (#545). createKey() stores hashApiKey(key) in api_keys.key and formatKeyPreview(key) in a new key_preview column, LIST_KEYS_SQL selects COALESCE(key_preview, '') AS keyPreview, and validateKey() hashes the incoming Bearer token before querying (rejecting raw stored digests and empty/non-string inputs). On DB open, migratePlaintextKeys() atomically migrates any legacy plaintext rows inside BEGIN IMMEDIATE ... COMMIT (capturing key_preview before hashing) and runs PRAGMA wal_checkpoint(TRUNCATE) → VACUUM → PRAGMA wal_checkpoint(TRUNCATE) (plus 0600 chmod) so legacy plaintext bytes are scrubbed from -wal and freed SQLite pages on disk. One-way migration: rolling back to a pre-#545 release will leave existing hashed DB keys rejected 401 by legacy validateKey() (OCP_ADMIN_KEY is unaffected). server.mjs is untouched; POST /api/keys and GET /api/keys wire responses are unchanged (Class B.2, ADR 0006 grandfathered as of v3.16.4, route (a) behaviour-preserving).
  • .gitignore now ignores the root start.sh launcher that setup.mjs writes and the root package-lock.json that npm install writes, so an install directory's git status stays clean after ocp update. package.json declares no dependencies, so that lock file records only the package itself; if a dependency is ever added, the lock should be committed and the ignore line removed.

Fixed

  • Streaming client-disconnect SIGKILL escalation now reaches SIGTERM-ignoring grandchildren (#551). callClaudeStreaming's res.on("close") handler previously armed a bare 5 s setTimeout and cleared it on proc.once("exit", ...). When a client disconnected mid-stream and killChildTree(proc, "SIGTERM") signalled the process group, the direct claude child died on SIGTERM and emitted exit immediately — cancelling the 5 s SIGKILL escalation and leaving any SIGTERM-ignoring grandchild alive. Replacing that bare timer with scheduleKillEscalation(proc, killChildTree) (lib/child-tree.mjs) cancels only when close fires with an empty process group (groupEmpty(proc.pid)), so surviving grandchildren are still reaped at 5 s. Not endpoint-touching; internal child-process lifecycle on closed client sockets, no request/response contract or B.2 key-set change.
  • Key identity, privilege separation, and unambiguous key addressing (ADR 0027, #543):
    • isAdmin and /api/usage's isAnonCaller are now decided strictly from explicit auth-branch booleans (authIsAdmin from timing-safe OCP_ADMIN_KEY match; authIsAnonymous from PROXY_ANONYMOUS_KEY or keyless multi), never by comparing authKeyName strings — so a DB key named admin (including any pre-existing key created before upgrade) never gains admin access, and a legacy DB key named anonymous cannot trigger isAnonCaller exemptions (note: /api/usage single-caller scope.self still filters usage_log by key_name, so revoke and re-create any pre-upgrade DB key carrying a reserved name).
    • POST /api/keys now reserves synthetic caller names (admin, anonymous, local, remote, shared, case-insensitive after trimming) with 400 invalid_request_error (amends ADR 0017).
    • DELETE /api/keys/:id, PATCH /api/keys/:id/quota, and GET /api/keys/:id/quota resolve targets through resolveKeyTarget (strict canonical positive-integer id matching, no SQLite implicit numeric affinity) and refuse ambiguous identifiers (duplicate active names, or a numeric id colliding with another key's name — including when the id row is already revoked) with 409 Conflict and zero rows modified. PATCH /api/keys/:id/quota now restricts updates to revoked = 0 (returning 404 on revoked keys).
    • dashboard.html now revokes keys by numeric k.id (data-revoke-id), alerts API errors on create/revoke, and guards refreshKeys() against non-admin 403 bodies.
    • Class B.2, ADR 0006 route (b); B.2 200/201 response key-set snapshot unchanged.
  • npm test no longer reports a false red when run as root (#546). The #460 integration test "an ASYNCHRONOUSLY-failing spawn counts ONCE" arms its fault by making the spawn HOME's parent mode 0500, and with DAC override root's mkdir succeeds there, so the spawn ran normally and the test's premise assertion failed. It is now reported as skipped under root, using the same top-level guard (_m366IsRoot) that #366's two permission-bit tests already use. Test-only; no runtime change.