Title: id(ssh): PR #720's dropped-input notice still cannot fire in explorer sessions — the shared counter is counted for them but never claimed · Issue #723 · developing-today/code · GitHub
Open Graph Title: id(ssh): PR #720's dropped-input notice still cannot fire in explorer sessions — the shared counter is counted for them but never claimed · Issue #723 · developing-today/code
X Title: id(ssh): PR #720's dropped-input notice still cannot fire in explorer sessions — the shared counter is counted for them but never claimed · Issue #723 · developing-today/code
Description: Finding PR #720 fixes #602 for world shells: the russh data() handler and SshIo now share one Arc
Open Graph Description: Finding PR #720 fixes #602 for world shells: the russh data() handler and SshIo now share one Arc
X Description: Finding PR #720 fixes #602 for world shells: the russh data() handler and SshIo now share one Arc<AtomicUsize> dropped-input counter, so bytes refused after the shell opens reach SshIo::send,...
Opengraph URL: https://github.com/developing-today/code/issues/723
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(ssh): PR #720's dropped-input notice still cannot fire in explorer sessions — the shared counter is counted for them but never claimed","articleBody":"## Finding\n\nPR #720 fixes #602 for world shells: the russh `data()` handler and `SshIo` now share one `Arc\u003cAtomicUsize>` dropped-input counter, so bytes refused after the shell opens reach `SshIo::send`, which claims the notice at the documented `INPUT_DROP_NOTICE_BYTES` (1024) threshold.\n\nThe same handler and the same input queue also serve the other session type in the same function, and that branch is not wired:\n\n- In `shell_request` on PR #720's head (`c7756f8c`, `pkgs/id/src/world_ssh.rs:319-325`), the `login.explore` branch creates its own `mpsc::channel(INPUT_QUEUE)` (256 frames, `:42` on the head), stores the sender in `self.input`, and spawns `run_explorer(explorer, handle, channel, bytes)` — with no dropped-input counter.\n- The non-explorer branch right below it (`:352`) is the only place that clones the shared counter: `dropped_input: Arc::clone(&self.dropped_input)` into `SshIo`.\n- The handler (`data()`, `:371`, counting at `:389` via `record_dropped_input`) counts refused bytes on `TrySendError::Full` regardless of which session type owns `self.input` — it cannot distinguish explorer input from world-shell input.\n- `run_explorer` (`:1148-1153` on the head) takes only `explorer, handle, channel, bytes`; nothing in its loop ever calls `claim_dropped_input_notice` / `dropped_input_notice`. The only claim site in the file is `SshIo::send` (`:639`).\n\nSo for an explorer (`explore:`) session, refused bytes are still counted into a counter nobody reads and logged with `tracing::warn!` only — the viewer is never told their input was dropped. That is the exact silent-drop shape #549 / #602 were filed for, surviving in the second branch of the same `shell_request` after #720 lands. The explorer drains its queue one line at a time and awaits a hub/directory call per submitted line, so a paste/flood arriving while a line executes can fill the 256-frame queue in the same way.\n\nThis does not block PR #720: it correctly satisfies #602's acceptance criteria as written (which scope to the world shell / `SshIo`). This issue tracks the residual branch #602 did not name.\n\n## Evidence\n\n- PR: #720 (`fix(id): share the SSH dropped-input counter with the session so the notice can fire`, fixes #602, 1 commit `c7756f8ce520db275e51a5088b40f655068de9b4`, OPEN at filing, 1 file `pkgs/id/src/world_ssh.rs`, +95/-28). Its diff touches the handler counter, `SshIo`, and the two notice tests — no `run_explorer` / explorer-branch hunk.\n- Verified on the PR head via `gh api .../contents/pkgs/id/src/world_ssh.rs?ref=c7756f8c`: `grep -n dropped_input` returns the handler, `SshClient`/`SshIo` fields, `record_dropped_input`/`claim_dropped_input_notice`, and the `SshIo::send` claim — no occurrence in the explorer branch or in `run_explorer`.\n- Verified on current main (`df383659`, base of #720, local clone == `gh api commits/main`): the pre-fix structure is the same two branches — explorer at `shell_request` spawns `run_explorer` with no counter, world shell copies the (then-`usize`) counter into `SshIo`.\n- Cross-repo: `git grep dropped_input_notice` is clean in the opencode, openchamber and nix clones — `pkgs/id` SSH code lives only in this repo.\n- Dedup: `gh search issues \"dropped input\"` returns only #602 (OPEN, world-shell scope); searches for `explorer dropped`, `explorer input`, `run_explorer dropped` and `INPUT_DROP` return nothing. No open or closed issue tracks the explorer branch.\n\n## Why it matters\n\nAn explorer user whose keystrokes/paste are refused under load gets the same \"my input vanished\" experience #549 set out to eliminate, with only a server-side warn log as evidence. Because the counter is now shared and incremented for explorer sessions too, the post-#720 code gives the impression the notice is handled uniformly — a reader of `data()` sees one counter and one notice mechanism, not a per-branch exception.\n\n## Acceptance criteria\n\n- [ ] The explorer branch in `shell_request` passes the shared dropped-input counter (the same `Arc\u003cAtomicUsize>` the handler counts on) into `run_explorer`.\n- [ ] `run_explorer` claims the notice with the same helper/threshold as `SshIo::send` (`claim_dropped_input_notice`, `INPUT_DROP_NOTICE_BYTES`) and writes it to the channel before the next explorer output once the threshold is reached; a failed notice write restores the claimed bytes, so drops are neither lost nor double-counted (same reset-only-on-delivery rule as #602).\n- [ ] A test drives the shared counter the way the handler does (or fills a live explorer session's input queue) and observes the `[-- input dropped: N bytes ... --]` notice on the explorer channel; below-threshold drops stay quiet and counted.\n- [ ] World-shell behaviour from #720 is unchanged: the existing `world_ssh::` suite (incl. `dropped_input_notice_counts_and_quiet_zero` and `dropped_input_notice_follows_the_shared_counter`) still passes.\n- [ ] Alternatively, if explorer sessions are deliberately excluded, that decision is recorded in a code comment at the explorer branch / counter definition and on this issue before closing — not left as a silent gap.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-24T06:41:14Z","url":"https://github.com/developing-today/code/issues/723"}
| 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:dd25f13f-743a-9a84-ec12-b1099467ffba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DCD6:3AABA8:C11921:FFF010:6B06415F |
| html-safe-nonce | 352478c6c3c016a756758232ead509436d8de21d97ec0239f5399827d999a34b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0Q2OjNBQUJBODpDMTE5MjE6RkZGMDEwOjZCMDY0MTVGIiwidmlzaXRvcl9pZCI6IjU0MzQ0OTIyMzI0NzA1MTE5NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8e103011e623aacdad41a4bcc37f5a11e2e034b63ce8ae82b55464300914ffc9 |
| hovercard-subject-tag | issue:6010230889 |
| 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/723/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1851912977cea00ba888abd1b6bddfc499a86ddd298a3b7eda9859ecbd2f2a14/developing-today/code/issues/723 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1851912977cea00ba888abd1b6bddfc499a86ddd298a3b7eda9859ecbd2f2a14/developing-today/code/issues/723 |
| og:image:alt | Finding PR #720 fixes #602 for world shells: the russh data() handler and SshIo now share one Arc |
| 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 | 1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652 |
| 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 | ac613d3698d3d8565651455086e1f74da07bf277 |
| 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