Skip to content

fix(cookbook): re-land stranded port-fix + download tests (PR #173 merged at stuck head)#174

Merged
AVADSA25 merged 2 commits into
mainfrom
cookbook-port-fix
Jun 1, 2026
Merged

fix(cookbook): re-land stranded port-fix + download tests (PR #173 merged at stuck head)#174
AVADSA25 merged 2 commits into
mainfrom
cookbook-port-fix

Conversation

@AVADSA25
Copy link
Copy Markdown
Owner

@AVADSA25 AVADSA25 commented Jun 1, 2026

Why

PR #173 was merged while GitHub's PR-head API was lagging (stuck at the first cookbook commit 2ae3d23, mergeStateStatus: UNKNOWN). The merge therefore captured only that first commit — two follow-up commits that were pushed to the branch and confirmed on the remote ref never made it to main:

  • a5fd4a1 — the verified protected-port fix: {8083,8090,8094,9223,5678}{8083,8084,8085,8090,8094,9222,9223,5678}. lsof on the live box showed 8084 (whisper STT) and 8085 (mlx_audio TTS) are live core services that were missing from the denylist; 9222 is the Chrome-CDP sibling of 9223. (8081/8082 probed free — Qwen+vision consolidated onto 8083.)
  • 0e11b0fTestDownload (4 tests) covering download.py with subprocess.Popen mocked, so the HF network path provably never runs in CI.

This PR cherry-picks both onto current main (the empty ci: re-trigger nudge commit is intentionally dropped).

Verification

  • codec_cookbook/probe.py PROTECTED_PORTS = {8083, 8084, 8085, 8090, 8094, 9222, 9223, 5678}
  • tests/test_cookbook.py50 tests pass (incl. the widened 8-port stop-guard parametrize, test_protected_set_covers_live_core_stack, and TestDownload)
  • ruff check: 0 issues

Net effect: main ends up with the full, intended Cookbook Phase 1 — the live core stack (STT/TTS/CDP) is now in the protected denylist as belt-and-suspenders, and download has test coverage.

🤖 Generated with Claude Code

Mikarina13 and others added 2 commits June 1, 2026 12:41
…4/8085/9222)

Probed the actual box with lsof rather than trusting the brief's enumerated
list. Findings:
  8083  mlx_vlm.server   Qwen3.6 LLM + UI-TARS/VLM vision   LIVE
  8084  whisper_server   STT                                LIVE  ← was missing
  8085  mlx_audio.server TTS                                LIVE  ← was missing
  8090  codec-dashboard                                     LIVE
  8094  pilot-runner                                        LIVE
  9222  Chrome DevTools CDP (routes/cdp.py + chrome skills) on-demand ← added
  9223  pilot CDP                                           on-demand
  5678  n8n                                                 LIVE
  8081/8082  FREE — Qwen+vision consolidated onto 8083, slots vacated

PROTECTED_PORTS {8083,8090,8094,9223,5678} → {8083,8084,8085,8090,8094,9222,9223,5678}.
8084/8085 were live core services (STT/TTS) absent from the denylist; 9222 is
the Chrome CDP sibling of 9223 that the chrome skills probe. 8081/8082 left out
(genuinely free now) but documented inline so a future reader knows they were
checked, not forgotten.

This is belt-and-suspenders only — allocate_port() already skips any live-bound
port at call time, the serve range (8110-8119) never intersects these, and
stop() refuses anything outside the cookbook- namespace regardless. The point
is an accurate static denylist so a manual pm2 delete reads off the right list.

Tests: protected-port parametrize widened to all 8; new
test_protected_set_covers_live_core_stack pins the live set. 46 cookbook tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… CI)

Adds TestDownload (4 tests): start() writes 'starting' + spawns a DETACHED
python -c snapshot_download runner (asserts the argv, never executes it),
status() reconciles a dead pid to 'interrupted', not_started default, and
idempotent start when a job is already running. subprocess.Popen is mocked
throughout — the HF network path never runs under CI (pre-empts the
local↔CI divergence on the download path). 50 cookbook tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AVADSA25 AVADSA25 merged commit cdf5d2d into main Jun 1, 2026
1 check 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.

2 participants