Skip to content

DebugEventLog honors PROGRAMA_* env vars (#143) - #160

Merged
arzafran merged 1 commit into
mainfrom
fix/143-dlog-programa-env
Jul 21, 2026
Merged

DebugEventLog honors PROGRAMA_* env vars (#143)#160
arzafran merged 1 commit into
mainfrom
fix/143-dlog-programa-env

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

dlog output now lands where the docs say it does: /tmp/programa-debug-<tag>.log, the path reload.sh exports and writes to /tmp/programa-last-debug-log-path. Until now the vendored logger only read the pre-rename CMUX_* env vars, so the documented tail flow tailed a file that was never created.

Closes #143.

Summary

  • resolveLogPath() checks PROGRAMA_DEBUG_LOG / PROGRAMA_TAG / PROGRAMA_SOCKET_PATH first, keeps CMUX_* fallbacks, and renames the bundle-id/default fallbacks to programa-debug*
  • Env is injected via a defaulted parameter so precedence is unit-testable; 4 tests added in BonsplitTests
  • CLAUDE.md debug-log section notes the companion -bg background-events file

Test Plan

  • cd vendor/bonsplit && swift build — Build complete
  • swift test — DebugEventLogTests 4/4 pass
  • CI green

resolveLogPath() was never renamed in the cmux->programa migration: it
only read CMUX_DEBUG_LOG/CMUX_TAG/CMUX_SOCKET_PATH, none of which are
set anymore, so dlog fell through to /tmp/cmux-debug-<bundleid>.log and
the documented tail flow tailed a file that never existed. PROGRAMA_*
names now win, CMUX_* kept as fallback, bundle-id/default fallbacks
renamed to programa-debug. Env injected for testability; four precedence
tests added.

Closes #143
@arzafran
arzafran merged commit e6c6aa6 into main Jul 21, 2026
6 of 9 checks passed
@arzafran
arzafran deleted the fix/143-dlog-programa-env branch July 21, 2026 18:08
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.

DEBUG event log ignores PROGRAMA_DEBUG_LOG; dlog lands in legacy cmux-debug path

1 participant