fix: ensure first-time setup token reaches docker logs (#858) - #1180
fix: ensure first-time setup token reaches docker logs (#858)#1180DamageShadow wants to merge 2 commits into
Conversation
…ion (#1139) (#1192) (#1193) Replace Polyform Noncommercial 1.0.0 with the verbatim Apache License 2.0 (copyright 2025-2026 Ability AI) and update every license reference: - LICENSE: verbatim Apache 2.0 text, appendix copyright line filled in - NOTICE: added per Apache 2.0 convention - README.md: badge -> Apache 2.0, tagline reframed from source-available to open source, License section rewritten (commercial-licensing paragraph reframed around enterprise modules) - CONTRIBUTING.md: inbound-contribution terms now Apache 2.0 Section 5 - AGENTS.md, docs/onboarding/00-welcome.md: license mentions updated - src/mcp-server/package.json: license MIT -> Apache-2.0 - src/cli/pyproject.toml + src/cli/README.md: license MIT -> Apache-2.0 (same inconsistency class as the MCP server, found during audit) grep -ri "polyform|noncommercial" returns no stale references. Fixes #1139 Co-authored-by: Eugene Vyborov <eugene@beingluminous.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Python block-buffers print() when stdout is a Docker pipe without PYTHONUNBUFFERED, so the setup token never appeared in logs. Add PYTHONUNBUFFERED=1 to the backend Dockerfile and emit the token via logger.warning so it flushes reliably and flows through Vector. Co-authored-by: Cursor <cursoragent@cursor.com>
40df8db to
0b4b454
Compare
|
Thanks for fixing this! 🙏 One process note before it can be merged: Per Trinity's SDLC (CLAUDE.md → SDLC, and Could you retarget the base branch from Heads-up: #1168 also addresses #858 (already approved, targeting Thanks again! |
|
Resolve by running |
Summary
ENV PYTHONUNBUFFERED=1todocker/backend/Dockerfileso lifespanprint()output is not block-buffered on the Docker log pipemain.pyfromprint()tologger.warning()so the token flushes reliably and appears in structured logs / VectorFixes #858
Root cause
Without
PYTHONUNBUFFERED=1, Python block-buffers stdout (~8KB) when connected to a Docker pipe (not a TTY). The setup token and ~30 other lifespanprint()calls never reacheddocker compose logs backend, blocking fresh installs.Test plan
docker exec trinity-backend env | grep PYTHONUNBUFFEREDreturnsPYTHONUNBUFFERED=1setup_completed=false, restarted backend —docker compose logs backend | grep "Setup token:"returns the token as a JSON WARNING logUsing dedicated scheduler service,Log archive service started) now visible in docker logsMade with Cursor