GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(connect): 恢复断线会话并修正公网网关故障诊断 by uiliugang · Pull Request #208 · uiliugang/t3code

Conversation

@uiliugang

@uiliugang uiliugang commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Problem

公网隧道抖动后,主机可能已经恢复,但客户端仍停在旧地址,或者丢掉还能用于局域网直连的凭据。裸 502/503 也可能被误报为主机离线,导致用户重启健康的服务。首版修复 #206

Change

  • 环境描述和 WebSocket 票据分别重试,保留已经成功的结果。缓存端点握手遇到 502/503/504 时,慢请求可以继续,同时向中继发现新地址。中继确认原地址仍有效时,客户端允许一次并行换证,先就绪的握手恢复会话。旧地址返回 410、530 等不可用状态时,客户端重新发现公网地址,并保留可供局域网使用的凭据。无法解析环境描述时,仍会处理进行中的票据请求。
  • 中继暂时不可用时,客户端重新核对原公网地址的环境 ID、当前账号与凭据,恢复可用会话。中继或主机明确拒绝授权、响应签名无效时,保留失败结果。
  • 凭据写回时核对当前令牌,保留其他标签页已确认的新地址和删除结果。中继确认地址未变而换证服务暂时不可用时,客户端可用核验过的现有凭据取票。同址换证后,设备和预览继续使用当前有效凭据。
  • 客户端保留公网裸 502/503 的状态码,提示网关返回错误,隧道和主机均待确认。主机端只有在本地端口明确拒绝连接时才提示检查监听,同步更新帮助链接和排障说明。

Scope

涉及 Web、桌面和移动端共享的授权与连接诊断、凭据存储适配及主机端探测。

Verification

  • 相对当前主线运行 vp run check:changed,11 个文件的 221 项测试通过。相对原始分支点运行同一检查,14 个文件的 299 项测试通过。两次均完成 35 个包的类型检查。另重放第四至第十二轮的 34 项独立故障用例,全部通过。
  • 第十三轮独立复审覆盖全部 22 个变更文件,未发现 P2 或更高等级问题。复审者另跑了 205 项聚焦测试,并从 MCP 入口验证首次授权、详情读取和提交决定。
  • 用故障注入验证旧隧道先返回 530 时首轮切换到新地址、中继离线时的局域网回退、跨标签页删除与换证、媒体票据和 MCP 审批。覆盖中继慢响应、旧票据或描述挂起、签名无效、账号切换及令牌临近到期。
  • 在 T3 内置浏览器断开并恢复同一 Replay 会话,确认历史保留且能继续发送消息。双标签页验证了 IndexedDB 写入顺序,连接详情验证了中文诊断。截图接口超时,未附截图。
  • 公网故障使用进程内注入,未中断在用的隧道或切换本机 VPN,未做移动端真机验收。

模型与执行环境为 GPT-6.2-astra,Codex(T3 Code)。

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
liugang59 added 12 commits November 22, 2026 11:51
liugang59
fix(connect): 保留并发更新的会话凭据并校准网关诊断
cb66a71
按尝试阶段选择票据超时,分别恢复失败的票据和环境描述请求。仅明确拒绝连接时报告本机端口故障,远端收到网关错误时保留未确认的跳点并链接本仓库的排查指南。
liugang59
fix(connect): 保留直连凭据并兼容旧中继的网关响应
d2380d3
公网端点重新发现失败时保留原凭据供局域网连接使用。客户端保留票据响应状态,统一处理旧版中继和公网端点的网关错误,并按实际连接路径展示详情。
liugang59
fix(connect): 分开处理公网端点失效和直连凭据失效
04db0d2
liugang59
fix(connect): 保留跨标签页删除结果并恢复离线中继下的公网会话
3139b89
liugang59
fix(connect): 恢复公网地址后复用凭据并保留正常请求时限
518d670
liugang59
fix(connect): 并行核验公网地址并复用在线会话凭据
e531314
liugang59
fix(connect): 保留主机验证失败并在票据重试时发现新地址
47acebc
liugang59
fix(connect): 在完整握手期间发现新地址并重试已验证的缓存凭据
071e016
liugang59
fix(connect): 隧道返回服务端错误时重新发现公网地址
0f84982
liugang59
fix(connect): 旧端点返回失效响应时保留票据结果并重新发现地址
5ec7149
liugang59
fix(connect): 续期后沿用在线会话并在同址重连时并行换证
8ab0c4f
liugang59
fix(connect): 保留其他标签页已验证的地址并恢复同址会话
991b764
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XL labels Nov 22, 2026
@github-actions

github-actions Bot commented Nov 22, 2026

Copy link
Copy Markdown

This PR changes the test suite by +23 test cases (browser 0, unit +23, server 0).

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Nov 22, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: d588c3b · PR result: 991b764 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@uiliugang
uiliugang merged commit 6b719f8 into main Nov 22, 2026
32 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@uiliugang
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.