WIP: the live queue serves the whole instance (#51) - #84
Draft
fiddur wants to merge 1 commit into
Draft
Conversation
The file browser is its own session and every ref gets one, and a reader asking on one session while the only agent sat parked on another left both waiting forever. The queue, the listeners and the page's "listening" answer are now instance-wide: the request names its thread, so whichever agent is parked here takes it. Waiting and working stay per session — they describe the requests a page can see. WIP toward #51 — not yet reviewed or pushed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
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.
Draft to preserve WIP — not ready to merge. Pushed so this work survives a machine move; it still needs the steps in "What's left" below.
The bug it fixes (#51)
The file browser is its own diffity session, and every ref gets one. A reader asking a question on one session while the only agent sat parked (via
diffity-live) on a different session left both waiting forever — the parked agent never saw the request, and the reader never got an answer.What this does
Makes the live queue, its listeners, and the page's "listening" answer instance-wide instead of per-session: the request names its own thread, so whichever agent is parked anywhere on this instance takes it. Waiting and working counts stay per-session (they describe the requests a given page can see).
Touched:
live.ts(claimNextLiveRequest()with no session filter; singlelistenersset;liveListenerTotal();notifyLiveListeners()no-arg;waitForLiveRequest(waitMs, signal?)with abort-before-claim),review-routes.ts,server.ts(listening: liveListenerTotal() > 0), and thelive-requests/idle-instance-guardstests.State
ce16513).live.ts/server.ts, so merge conflicts are expected there.What's left before it can merge
developinto the branch (clean merge, no rebase) and resolve conflicts — most likely inlive.tsandserver.tsagainst feat: diffity inbox — watch review-requested PRs and prepare them ahead #82's live-queue changes.npx tsx scripts/release.ts patch --no-git).pnpm check/ the full suite green.@code-reviewerround loop to 0 P1 / 0 P2.Local worktree while WIP:
~/nc/diffity-fork/live-queue.Closes #51 (on merge).