test(external-agent): cover direct-touch lease refresh - #79
Merged
Conversation
c6d1c1d fixed registry.touch() to refresh lastSeen, which the long-poll scenario in broker-poll-refresh.verify.ts exercises through nextEditorCall. Add a direct-touch scenario so bridge-route touches outside the wait loop (poll entry, tool settle) keep the online lease covered on their own: register, touch at +30s, editor must still be connected at +60s. Also restores the two-space indent of touch()'s closing brace that c6d1c1d left at column zero. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Lenouw
force-pushed
the
fix/editor-lease-touch-refresh
branch
from
August 14, 2026 11:59
480791d to
6aac560
Compare
guifeh
pushed a commit
to guifeh/OpenChatCut
that referenced
this pull request
Sep 11, 2026
c6d1c1d fixed registry.touch() to refresh lastSeen, which the long-poll scenario in broker-poll-refresh.verify.ts exercises through nextEditorCall. Add a direct-touch scenario so bridge-route touches outside the wait loop (poll entry, tool settle) keep the online lease covered on their own: register, touch at +30s, editor must still be connected at +60s. Also restores the two-space indent of touch()'s closing brace that c6d1c1d left at column zero. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
What this adds
A direct-touch scenario in
broker-poll-refresh.verify.ts. The existing scenario exercises the lease refresh throughnextEditorCall's wait loop. Bridge routes also touch the editor outside that loop (poll entry, tool settle); this scenario pins the lease semantics ontouchEditoritself: register → touch at +30s → editor must still be connected at +60s. If a future refactor moves thelastSeenrefresh back out oftouch(), this fails even when the long-poll path happens to compensate.Brace indent restore. c6d1c1d left
touch()'s closing brace at column zero; restored to the surrounding two-space style.Verification
tsx server/external-agent/broker-poll-refresh.verify.ts→ ok (both scenarios)tsx server/external-agent/broker.verify.ts→ passesoxlinton touched files → cleanOne observation from the original investigation, in case it is useful:
run-affected-verifiesreportsno affected verifieswhen onlybroker-registry.tsorbroker-poll-refresh.verify.tschange, which is how #70's failing guard could slip through a PR run. Happy to look at wiring those files into the affected map in a follow-up if you want.🤖 Generated with Claude Code