Repository navigation
Conversation
PR #502 inserted the UpdateStreamsError case between PeerListReceived's SeedLastSeen and its founding-room block, so the block (log the join, declare the founder's tempo, broadcast its interval config) ran only on a rejected stream update and never on joining an empty room. The relay then had no tempo for the room, fell back to 120 BPM when the first peer joined, and both peers adopted it: a founder at 95 BPM had their Link session (and DAW) reset to 120 the moment someone joined. In v5.0.0 and every beta since. Move the block back under PeerListReceived, declaring currentBPM rather than the join-time bpm so a reconnect into a room that emptied meanwhile doesn't revert a tempo change made during the session. TestFounderDeclaresTempoAndIntervalConfig runs a session against an in-process fake relay and asserts the founder broadcasts TempoDeclare at its own BPM plus its IntervalConfig; it fails on the old code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0128WmRHbSuEccdNYHw3WXq5
The script asked for 240 BPM, but the founder-tempo bug reset every test room to the relay's 120 BPM default, so the ADR-0009 placement check (#512) has only ever run on 8s intervals. With the founder's tempo now honoured the room really runs at 240, and 4s intervals leave the vote about two clean probe seconds per boundary: boundaries abstain and the verdict flakes (1 of 4 runs passed; the one reported "skip" was a binning artifact, the probe heard consecutive blocks). At 120 BPM it passed 5 of 5. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0128WmRHbSuEccdNYHw3WXq5
main.js pushes the checkbox to the backend with
invoke('set_remember_enabled'), but wails-adapter.js never mapped that
command (since #389). The adapter threw "Unknown command", the call site
swallowed it, and App.rememberEnabled stayed at its default true: with
"Remember settings" unticked, the capture-channel selection was still
saved to capture_enabled.json and restored on the next join.
Map the command, and remove the Debug tab's "Interval offset D" slider,
which promised the retired fixed offset (ADR-0009) and called an equally
unmapped set_interval_offset.
TestFrontendInvokesMapToAppMethods pins the contract so the next gap
fails CI instead of failing silently: every command main.js invokes is
mapped, every mapped App method exists, and each positional arg list
matches the method's arity.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0128WmRHbSuEccdNYHw3WXq5
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.
Before: whoever founds a room has their tempo reset to 120 BPM the moment the first peer joins. A founder at 95 BPM has their Link session, and their DAW, pulled to 120. Separately, unticking "Remember settings" doesn't stop WAIL saving your capture-channel selection and restoring it on the next join. The Debug tab also shows an "Interval offset D" slider that does nothing.
After: the room keeps the founder's tempo. The Remember toggle controls whether capture selections are saved. The dead slider is gone.
Founder tempo. #502 inserted
case "UpdateStreamsError":betweenpeers.SeedLastSeen()and the founding-room block insession.go. As a result, the tempo declaration and IntervalConfig broadcast ran only on a rejected stream update, never on joining an empty room. With no declared tempo, the relay used its 120 BPM default when the first peer joined, and both peers adopted it. This is in v5.0.0 and every beta since v4.2.0-beta.0. I reproduced it against a local relay with two headless peers at-bpm 95: the relay loggedconfig set: tempo=120.0and both peers loggedAdopting room tempo 120.0 BPM.Remember settings.
main.jscallsinvoke('set_remember_enabled'), butwails-adapter.jsnever mapped that command (since #389). The adapter threw "Unknown command",.catch(() => {})swallowed the error, andApp.rememberEnabledstayed at its default oftrue.How
session.go:PeerListReceived.currentBPMrather than the join-timebpm, so reconnecting into a room that emptied meanwhile doesn't revert a tempo change made during the session.TestFounderDeclaresTempoAndIntervalConfigruns a real session against an in-process fake relay. It asserts the founder broadcastsTempoDeclareat its own BPM plus itsIntervalConfig, and it fails onmain.set_remember_enabledinwails-adapter.js.set_interval_offsetcall.TestFrontendInvokesMapToAppMethodschecks three things: every commandmain.jsinvokes is mapped, every mappedAppmethod exists, and each positional arg list matches the method's arity. A future gap then fails CI instead of failing silently.scripts/tier2-e2e.sh:Not in this PR. Peer log lines never reach the session:
signaling.goemitsPeerLogBroadcast, butsession.gomatchesLogBroadcast. I left that unfixed on purpose. The relay forwards everylogline to every other peer, and the fold-in useslog.Printf, which feedsWsLogWriter. So with two log-sharing peers, a plain rename would bounce each line back and forth between them indefinitely. The fix needs to fold peer lines in without re-sharing them, and that deserves its own change.Checks run locally (Linux)
go test -tags nolibopusfile ./...: passgo test -tags linkstub,nolibopusfile ./...: passgo build -tags linkstub,nolibopusfile -o /dev/null .: ok./scripts/tier2-e2e.sh(step mode): PASS, 9 checks, 0 failures./scripts/loopback-e2e.sh: PASSGenerated by Claude Code