GeezerVison is showing github.com — fix(id): deliver the dropped-input notice in SSH explorer sessions by dezren39 · Pull Request #735 · developing-today/code
Conversation
dezren39
commented
Oct 24, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes #723
Problem
PR #720 wired the shared dropped-input counter into the world shell (SshIo::send), but the explorer branch of the same shell_request spawned run_explorer with no counter. The russh data() handler counts refused bytes for explorer sessions too, so those drops were counted on a counter nobody claimed — explorer viewers never saw the [-- input dropped: N bytes ... --] notice.
Solution
shell_request's explorer branch now clones the same Arc<AtomicUsize> the handler counts on and passes it into run_explorer.
- New
prepend_dropped_input_notice helper claims the notice via the existing claim_dropped_input_notice / INPUT_DROP_NOTICE_BYTES (1024) threshold and prepends it to the explorer's next output. If the channel write fails, run_explorer restores the claimed bytes with fetch_add — the same reset-only-on-delivery rule as SshIo::send, so drops are neither lost nor double-counted. A notice alone (empty output chunk) is still sent.
- New test
explorer_notice_prepends_to_next_output_and_stays_quiet_below_threshold drives the shared counter the way the handler does: below-threshold drops stay quiet and counted, at-threshold drops prepend the notice and drain the counter, and a restored claim can be claimed again.
World-shell behaviour from #720 is unchanged.
Single-repo: pkgs/id SSH code lives only in developing-today/code (verified in #723).
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by CodeRabbit
- New Features
- Explorer sessions now display a notice when at least 1,024 bytes of input have been refused, helping make input loss visible.
- Bug Fixes
- Notices are only counted as delivered after a successful write, so failed deliveries can be reported again. Below the threshold, explorer output remains unchanged.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Explorer sessions counted refused input bytes on the shared counter
(from #720) but run_explorer never claimed the notice, so explorer
viewers silently lost input under load. Pass the shared
Arc<AtomicUsize> into run_explorer and prepend the claimed notice to
the next explorer output, restoring the claim on write failure.
Fixes #723
coderabbitai
Bot
commented
Oct 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
42d88207-d2f3-4e4e-8094-127f5700d05c
Commits
-
Reviewing files that changed from the base of the PR and between 5db6087 and 5fb73e3.
Files selected for processing: 1
-
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Walkthrough
-
Explorer sessions now use the connection’s shared dropped-input counter. When dropped input reaches 1024 bytes, run_explorer prepends a notice to output. If writing fails, it restores the claimed count.
Changes: Explorer dropped-input notices
| Layer / File(s) |
Summary |
Pass the counter to explorer sessions pkgs/id/src/world_ssh.rs |
The explorer shell passes the shared dropped-input counter to run_explorer. |
Claim and deliver notices pkgs/id/src/world_ssh.rs |
run_explorer prepends a notice when the threshold is reached and restores the claimed count after a failed write. Tests cover below-threshold behavior, notice ordering, and restoration. |
Priority: Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant shell_request
participant run_explorer
participant SharedDroppedInputCounter
participant ExplorerChannel
shell_request->>run_explorer: pass shared dropped-input counter
run_explorer->>SharedDroppedInputCounter: claim notice at threshold
run_explorer->>ExplorerChannel: write explorer output with notice
ExplorerChannel-->>run_explorer: report write failure
run_explorer->>SharedDroppedInputCounter: restore claimed count
Loading
Possibly related issues
Possibly related PRs
- developing-today/code#720 — Adds the shared counter and claim/restore notice behavior that this change uses for explorer output.
Merge Risk: Minimal · up to 5fb73
-
No actionable issue remains that should block merging the explorer dropped-input notice change.
Pre-merge checks: 4 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
Passed checks: 4 passed
-
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
 |
The title clearly and concisely describes the main change: delivering dropped-input notices in SSH explorer sessions. |
| Linked Issues check |
 |
For directly linked issue #723, the supplied PR evidence states that the explorer branch clones the shared Arc<AtomicUsize> and passes it to run_explorer. It also states that the new helper uses `… |
| Out of Scope Changes check |
 |
The supplied change summary contains one file with +64/-1 lines. The reported changes only connect explorer sessions to the shared dropped-input counter, deliver the required notice, restore failed cl… |
Full details: Linked Issues check
-
Explanation
For directly linked issue #723, the supplied PR evidence states that the explorer branch clones the shared Arc<AtomicUsize> and passes it to run_explorer. It also states that the new helper uses claim_dropped_input_notice and INPUT_DROP_NOTICE_BYTES, prepends the notice, restores claimed bytes on write failure, and sends an empty notice chunk when needed. The new test covers below-threshold counting, threshold delivery, counter draining, and reclaiming. The reviewed head file confirms the shared counter is cloned in the explorer branch. The reported world-shell changes remain unchanged.
Full details: Out of Scope Changes check
-
Explanation
The supplied change summary contains one file with +64/-1 lines. The reported changes only connect explorer sessions to the shared dropped-input counter, deliver the required notice, restore failed claims, and test that behavior. These changes directly implement issue #723 and do not demonstrate unrelated scope.
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning Some tools did not complete. Review the errors below.
🔧 Clippy (1.99.0)
-
Clippy execution timed out
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
-
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
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.
|