bridge: stdin EOF after sessions.search writes a clean end whose count claims items it never emitted #112
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#112
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When the bridge's stdin closes right after a
sessions.searchrequest line, the bridge writes a cleanendterminal whosecountclaims matches it never emitted. No item lines appear.docs/reference/cli.mdsays closing stdin cancels in-flight operations, so dropping the items may be intended. A cleanendwith a nonzerocountis not: a consumer reads it as a complete result with N matches. Either the items should be emitted before the terminal, or the terminal should be the failing one (canceled) with no claimed count.Repro
Isolated daemon, a session that printed
NEEDLE(the CLI finds 2 matches):A separate run on the
search --source visiblebranch (one expected match) sawcount1 in some runs and 0 in others, again with no item line, so the count is also racy.Expected
The terminal after stdin EOF matches what was written: either every item followed by
endwith that count, or acanceledfailing terminal. Which one is right depends on whether EOF should drain or cancel in-flight streams. The doc says cancel, which points to the failing terminal.Notes
sourceparam), so it does not depend onsearch --source visible.sessions.capturelikely needs the same check.