fix(cookbook): re-land stranded port-fix + download tests (PR #173 merged at stuck head)#174
Merged
Conversation
…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>
Merged
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tomain: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.)0e11b0f—TestDownload(4 tests) coveringdownload.pywithsubprocess.Popenmocked, so the HF network path provably never runs in CI.This PR cherry-picks both onto current
main(the emptyci: re-triggernudge commit is intentionally dropped).Verification
codec_cookbook/probe.pyPROTECTED_PORTS ={8083, 8084, 8085, 8090, 8094, 9222, 9223, 5678}tests/test_cookbook.py— 50 tests pass (incl. the widened 8-port stop-guard parametrize,test_protected_set_covers_live_core_stack, andTestDownload)ruff check: 0 issuesNet effect:
mainends 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