Title: id(ssh): PR #594's dropped-input notice can never fire in-session — the shell reads a snapshot taken before the queue exists, and the handler's counter is never read again · Issue #602 · developing-today/code · GitHub
Open Graph Title: id(ssh): PR #594's dropped-input notice can never fire in-session — the shell reads a snapshot taken before the queue exists, and the handler's counter is never read again · Issue #602 · developing-today/code
X Title: id(ssh): PR #594's dropped-input notice can never fire in-session — the shell reads a snapshot taken before the queue exists, and the handler's counter is never read again · Issue #602 · developing-today/code
Description: Finding PR #594 (OPEN, head 090c356b52a9e1c852692785cee2d0af3e03eef1) claims dropped SSH input is "no longer silent" (#549): the shell should show the viewer a notice before the next frame. As wired, the notice can never fire for drops t...
Open Graph Description: Finding PR #594 (OPEN, head 090c356b52a9e1c852692785cee2d0af3e03eef1) claims dropped SSH input is "no longer silent" (#549): the shell should show the viewer a notice before the next frame. As wire...
X Description: Finding PR #594 (OPEN, head 090c356b52a9e1c852692785cee2d0af3e03eef1) claims dropped SSH input is "no longer silent" (#549): the shell should show the viewer a notice before the next fram...
Opengraph URL: https://github.com/developing-today/code/issues/602
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(ssh): PR #594's dropped-input notice can never fire in-session — the shell reads a snapshot taken before the queue exists, and the handler's counter is never read again","articleBody":"## Finding\n\nPR #594 (OPEN, head `090c356b52a9e1c852692785cee2d0af3e03eef1`) claims dropped SSH input is \"no longer silent\" (#549): the shell should show the viewer a notice before the next frame. As wired, the notice can never fire for drops that happen during a session — the only counter the shell reads is a snapshot taken before the input queue exists, when its value is necessarily 0. Only the `tracing::warn!` log line works.\n\n## Evidence (`pkgs/id/src/world_ssh.rs` on the PR head)\n\n- The russh `data()` handler (`:363-388`) counts refused bytes on the **handler** struct: `self.dropped_input += data.len();` on `TrySendError::Full`. It also early-returns when `self.input` is `None` (`:368-370`), and `self.input` is only set inside `shell_request` — so no drop can ever be counted before the shell opens.\n- `shell_request` constructs `SshIo` with a **copy**: `dropped_input: self.dropped_input` (`:344`) — at that moment necessarily 0, per the point above.\n- After that, nothing ever updates `SshIo.dropped_input`. `note_dropped_input()` (`:455-460`), called at the top of `send()`, reads only the `SshIo` copy, which stays 0 for the life of the session, so `dropped_input_notice()` always returns `None` and `pending_notice` is never set. Drops that happen under load mid-session increment the handler's counter, which is never read again (grep over the full file at the head SHA: the handler counter is written at `:379`/logged at `:383` and read only at the `:344` snapshot).\n- Related dead wiring in the same diff: `INPUT_DROP_NOTICE_BYTES: usize = 1024` (`:52`, \"Input bytes dropped before the session tells the viewer about it\") is defined and never referenced; `dropped_input_notice()` fires at `bytes > 0` instead, so the intended thresholding was never connected either.\n\n## Why it matters\n\n#549's user-visible half — a viewer whose keystrokes are being refused under load is told so — silently does nothing, while the PR description and its unit test (`dropped_input_notice_counts_and_quiet_zero`, which only exercises the pure formatting helper) make it look delivered. The first sign in production would be the same \"my input vanished\" reports #549 was filed for.\n\n## Acceptance criteria\n\n- The drop count is shared between the russh handler and the session I/O (e.g. an `Arc\u003cAtomicUsize>` or an equivalent channel), so bytes refused after the shell opens reach the shell.\n- A test that actually fills the input queue during a live session (or drives the shared counter the same way the handler does) observes the `[-- input dropped: N bytes ... --]` notice on the channel before the next frame.\n- The notice threshold is one coherent rule: either `INPUT_DROP_NOTICE_BYTES` is used as documented or the constant is removed.\n- The counter resets only after the notice has actually been handed to the viewer, so drops are neither double-counted nor lost between frames.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T16:20:27Z","url":"https://github.com/developing-today/code/issues/602"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0ca25639-2131-d571-fed4-9d3893234c85 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9EA4:4A90:992E4:C2D36:6B062B60 |
| html-safe-nonce | fcb56cc0cfcd65faaed1aee36cfc44fbade5b3dac2ab6b162ad59e3dc43500f8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUE0OjRBOTA6OTkyRTQ6QzJEMzY6NkIwNjJCNjAiLCJ2aXNpdG9yX2lkIjoiMTc3NDc2MDM1MzQxOTYzNTU1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 79bca1468e66fafad183dcbb41e67beed182e057e3fc27f46838e1d97326501c |
| hovercard-subject-tag | issue:5983243655 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/602/issue_layout |
| twitter:image | https://opengraph.githubassets.com/336ac25d04a7c5c5670176793e5fe267ec7513631c0b6e4dbd3d806bba3d94b0/developing-today/code/issues/602 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/336ac25d04a7c5c5670176793e5fe267ec7513631c0b6e4dbd3d806bba3d94b0/developing-today/code/issues/602 |
| og:image:alt | Finding PR #594 (OPEN, head 090c356b52a9e1c852692785cee2d0af3e03eef1) claims dropped SSH input is "no longer silent" (#549): the shell should show the viewer a notice before the next frame. As wire... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width