Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

bug(sdk/ts): forward().close() never revokes SSH session tokens of open connections

未关闭 适合新手
#4,516 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
api

调研方向

从 sdk/typescript/src/client.ts 中的 forward、teardown 和 forwardConnection 开始,跟踪每个连接的 AbortController 信号如何到达调用 revokeSshSession 的 finally 代码块。检查 Go 文件客户端中的撤销调用,确认其预期的独立上下文。复现方法:打开一个连接,关闭句柄,然后确认没有发送 RevokeSshSession 请求。当每个已签发的令牌即使在连接信号被中止后,仍能收到带有各自超时时间的撤销请求时,即完成。

由索引模型根据 Issue 内容生成。

描述

state:triage-needed
User Story

I use OpenShell and build automation against its SDKs. I found this while reviewing sdk/ on main; it is identified from the code paths cited below and has not yet been reproduced against a live gateway.

Problem Statement

On close() (or caller abort), teardown aborts each connection's AbortController. forwardConnection's finally then calls revokeSshSession({ token, allowMissing: true }, { signal }) with that same, already-aborted signal, so the revoke RPC is never sent. The Go file client revokes with a fresh background context.

Impact / Why This Matters

Every SSH session token minted for connections still open at close() stays valid until it expires instead of being revoked, contrary to the method's documented revoke-on-close behavior.

Acceptance Criteria
  • Closing a forward handle with open connections issues RevokeSshSession for each minted token (bounded by its own timeout, independent of the aborted connection signal).
Reproduction Steps
  1. const h = await client.sandbox.forward(name, { targetPort }).
  2. Open a local connection so a session token is minted.
  3. await h.close().
  4. Observe no RevokeSshSession RPC reaches the gateway for that token (the call rejects immediately on the aborted signal).
Suggested UX (if applicable)

No response

Environment
  • OpenShell: main @ 82977e2 (2026-10-13)
  • SDK: TypeScript (sdk/typescript/src/client.ts, forward/forwardConnection)
  • Toolchain: Go 1.25.4 linux/amd64, Node 22
Logs

主要语言
Rust
星标
15.4k
派生
1.7k
平均合并
2 天 3 小时
30 天内合并 PR
374

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。