Skip to content

fix(logs): send requireLog, the command that actually streams logs - #33

Merged
mschmicking merged 1 commit into
mainfrom
fix/logs-require-log
Aug 30, 2026
Merged

fix(logs): send requireLog, the command that actually streams logs#33
mschmicking merged 1 commit into
mainfrom
fix/logs-require-log

Conversation

@mschmicking

Copy link
Copy Markdown
Owner

iob-sync logs printed its banner and then nothing, forever.

subscribeLog sent subscribe(['log']). Admin's generic subscribe takes a state id pattern, so that was a well-formed request to watch states named log — of which there are none. Accepted, acknowledged, silent. The wire command is requireLog.

Verified against the live instance

command result
requireLog([true]) javascript.* lines within a second of a script restart
subscribe(['log']) nothing across 25 s, same socket, same minute

Why it survived a test suite

The fake server broadcast log frames to every connection regardless of what the client had subscribed to — so it agreed with the client's misunderstanding and the tests passed against a shared fiction. It now gates delivery on requireLog exactly as Admin does, and the test asserts the command on the wire rather than only that lines arrive. Asserting the effect alone is what let a fake this generous hide the bug.

On the earlier diagnosis

This was misdiagnosed in 1623770 as the adapter's own log level hiding debug-level recompile messages. That effect is real and stays documented — but it was not the cause here: an error-level log() call from a script was equally invisible. TROUBLESHOOTING.md now leads with the bug and keeps the log-level note underneath.

304 tests pass; lint and format clean.

🤖 Generated with Claude Code

`iob-sync logs` printed its banner and then nothing, forever. subscribeLog
sent `subscribe(['log'])`. Admin's generic `subscribe` takes a *state id
pattern*, so that was a well-formed request to watch states named `log` — of
which there are none. Accepted, acknowledged, silent. The wire command is
`requireLog`, which is its own command and not a variant of subscribe.

Verified against the live instance: with requireLog(true) a script restart
produces its javascript.* lines within a second; with subscribe(['log'])
nothing arrives across 25s on the same socket, in the same minute.

This was misdiagnosed once already, in 1623770, as the adapter's own log level
hiding debug-level recompile messages. That is a real effect and it is
documented, but it was not the cause: an error-level log() call from a script
was equally invisible. The docs now lead with the bug and keep the log-level
note underneath, because someone hitting this will search for the symptom.

The fake server is why this survived a test suite. It broadcast log frames to
every connection regardless of what the client had subscribed to, so it agreed
with the client's misunderstanding and the tests passed against a shared
fiction. It now gates delivery on requireLog exactly as Admin does, and the
test asserts the command on the wire rather than only that lines arrive —
asserting the effect alone is what let a fake this generous hide the bug.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWD1fdYJEdeXAFLjkDZEQC
@mschmicking
mschmicking merged commit aaa8468 into main Aug 30, 2026
7 checks passed
@mschmicking
mschmicking deleted the fix/logs-require-log branch August 30, 2026 14:37
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.

1 participant