Skip to content

fix(connect): host-change clears monitor_offset; clarify saved-channel banner - #233

Merged
joelteply merged 1 commit into
canaryfrom
fix/host-change-clears-offset-and-banner-clarity
Apr 28, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/host-change-clears-offset-and-banner-clarity

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Two Phase 2 e2e cleanups from continuum-b741's report:

  • Drop .airc/monitor_offset when host_target changes (offsets are per-host; line N differs across hosts)
  • Reword 'Resuming saved room: #X' → 'Saved channel preference: #X (mesh may resolve a different host channel)' since the mesh may steer joiner to a different channel post-discovery

Verification: tabs 19/0, room 14/0.

…l banner

Two cleanups from the Phase 2 e2e wishlist (continuum-b741's report).

## host-change clears monitor_offset

The .airc/monitor_offset file tracks "which line of the host's log
have I already displayed?" so reconnects don't miss markers that
arrived during a teardown window. But the offset is per-HOST:
line 500 of host A is not line 500 of host B. With Phase 1's
mesh-singleton substrate, host changes are common (takeover, peer
migration), and stale offsets would replay random history from a
new host's log.

Fix: in the joiner branch's set_config_val block (where host_target
is recorded), compare the new host_target against the saved value.
If they differ, rm the monitor_offset file. Next monitor cycle
re-tails with -n 0 (EOF) on the new host's log.

## saved-channel banner clarity

Pre-discovery line "Resuming saved room: #X" promised a resume that
the mesh substrate may not honor (host advertises a different
channel; Phase 2B.2.1 dual-subscribes; joiner sees a different
"Joined" banner post-discovery).

Reworded to "Saved channel preference: #X (mesh may resolve a
different host channel; 'airc part' to clear)" — states intent, not
promise. The post-discovery "Joined #Y" or dual-subscription banner
is now the authoritative truth signal.

## Verification

  bash -n: clean
  test/integration.sh tabs: 19/0 ✓
  test/integration.sh room: 14/0 ✓

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 28, 2026 19:11
@joelteply
joelteply merged commit 3d8a08e into canary Apr 28, 2026
@joelteply
joelteply deleted the fix/host-change-clears-offset-and-banner-clarity branch April 28, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses two Phase 2 e2e issues in airc connect by (1) making the saved-room banner accurately reflect that it’s only a preference under mesh discovery, and (2) preventing incorrect log-tail resumption when the resolved host changes.

Changes:

  • Reword the “resume saved room” banner to clarify mesh may resolve a different host channel than the saved preference.
  • Clear .airc/monitor_offset when host_target changes so monitoring doesn’t resume at an invalid offset for a different host.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants