fix(logs): send requireLog, the command that actually streams logs - #33
Merged
Conversation
`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
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.
iob-sync logsprinted its banner and then nothing, forever.subscribeLogsentsubscribe(['log']). Admin's genericsubscribetakes a state id pattern, so that was a well-formed request to watch states namedlog— of which there are none. Accepted, acknowledged, silent. The wire command isrequireLog.Verified against the live instance
requireLog([true])javascript.*lines within a second of a script restartsubscribe(['log'])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
requireLogexactly 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-levellog()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