Skip to content

fix: code review findings — 6 bugs + README update#16

Merged
hxddh merged 2 commits into
mainfrom
claude/code-docs-review-asm5B
May 28, 2026
Merged

fix: code review findings — 6 bugs + README update#16
hxddh merged 2 commits into
mainfrom
claude/code-docs-review-asm5B

Conversation

@hxddh

@hxddh hxddh commented May 28, 2026

Copy link
Copy Markdown
Owner

变更内容

Bug 修复(6 项)

优先级 文件 问题 修复
HIGH tui.go refreshDetail 未检查 cursor >= len(entries),可能触发 index panic 加入边界检查
HIGH websocket.go 下行 splice goroutine 结束后未关闭 clientConn,上行 goroutine 永久泄漏 加入 clientConn.Close()
HIGH main.go logResponsestart 为零值时 time.Since 返回 ~2026 年,写入错误的 HAR/record duration 加入 start.IsZero() 守卫
MEDIUM har.go chunked 响应的 resp.ContentLength 为 -1,导致 HAR 中 content.size 错误 改用 int64(len(body))
MEDIUM record.go 无路径 URL(https://host?q=1)使用 --replay-target 时查询字符串丢失 改用 IndexAny("/?#") 分割 host
LOW main.go 每主机证书 SAN 只含 127.0.0.1,通过 ::1 连接时 TLS 验证失败 加入 net.IPv6loopback

文档

  • README 补全 Sprint 2-4 新增功能:HAR 导出、WebSocket 支持、Body 自动解压缩、Homebrew 安装、预编译二进制下载表

测试计划

  • go build ./... 编译通过
  • go test -race -count=1 -timeout 120s ./... 全部通过(38 个测试用例)

https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3


Generated by Claude Code

claude added 2 commits May 28, 2026 16:54
Add --har flag, WebSocket support, body decompression, pre-built binaries,
Homebrew install instructions, and updated Go version requirement (1.24+).

https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3
- tui: add m.cursor bounds check in refreshDetail to prevent index panic
- websocket: close clientConn in downstream splice goroutine so upstream
  EOF unblocks the client-read goroutine (eliminates goroutine leak)
- logResponse: guard time.Since(start) against zero start time so HAR/
  record duration is 0 rather than ~2026 years when reqID is missing
- har: use len(body) for Content.Size and BodySize instead of
  resp.ContentLength, which is -1 for chunked transfer encoding
- record/replay: use IndexAny("/?#") to split host from rest of URL so
  query strings on path-less URLs are preserved when --replay-target is set
- cert: add net.IPv6loopback to per-host certificate SAN list so tools
  connecting via ::1 pass TLS verification

https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@hxddh hxddh merged commit b27655f into main May 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants