typescript-config-port-collision-host-dev
All deliverables are written and validated. Summary of what was done:
<ip-address>:3000 is LISTEN and answers HTTP 401 with X-Powered-By: Express + rate-limit headers → foreign DuckBrain daemon owns :3000; a listen(3000) probe fails with EADDRINUSE.getent hosts postgres → unresolvable; dns.lookup('postgres') → ENOTFOUND → the gitignored .env's docker-network DB values (postgres:5432) crash host-mode pnpm dev:api before the bind step.<ip-address>:5432 → host-facing localhost values work.--output/--evidence/--signatures)/workspace/solution.md — title, root-cause analysis (two stacked failure modes), exact fix: env.ts zod PORT .default(3000 → 3010) + DATABASE_URL @postgres → @localhost, .env.example PORT=3010 + host-facing DB, GETTING-STARTED §3 leading with the port fact, local .env migration sed commands, docker-path immunity note; verification section with reproduce/verify commands./workspace/evidence.md — full command transcript: host facts, both pre-fix crash repros (ENOTFOUND postgres, EADDRINUSE :3000), post-fix zod default resolve (3010), E2E boot with /health → 200, and the aggregate verify.sh result./workspace/signatures.json — valid JSON: SHA-256s of the three canonical fixed files, plus solution/evidence hashes and the 9-check verification record.A faithful dev:api boot-replica (zod env → DB reach → bind → serve) ran green 9 passed / 0 failed across 3 consecutive runs, including proof that the fixed default PORT resolves to 3010 and that the pre-fix configs crash exactly as reported. One honest sandbox note: an unrelated instance already holds <ip-address>:3010 in the shared netns, so the live-boot probe used the free PORT=3011 (same code path); in a clean checkout :3010 binds directly since only :3000 is occupied (DuckBrain).
# Evidence - Problem class: typescript-config-port-collision-host-dev - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-31T19:05:11.700Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "EduOS EDU-GAP-038: host-mode API dev default PORT=3000 collided with DuckBrain daemon owning :3000. Fix: change env.ts zod PORT default 3000->3010, .env.example PORT=3010, lead GETTING-STARTED sec3 with the port fact. Pitfall: local gitignored .env had PORT=3000 + docker-network DB values (postgres:5432) which crashed bare pnpm dev:api with ENOTFOUND postgres before binding \u2014 must update local .env to host-facing template values for the PASS to be reproducible. Docker path immune (compose pins PORT=3000 in-container).", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "typescript-config-port-collision-host-dev", "provider": "openrouter", "solved_at": "2026-08-31T19:05:11.700Z", "version": ""}