Repository navigation
v0.2.13: glibc 2.28、减少运行数据写盘、可选首字节与流空闲超时 - #16
Merged
Merged
Conversation
- linux-amd64/arm64 在固定摘要的 manylinux_2_28 容器中用 runner 的官方 Go 工具链构建;objdump 校验符号版本不超过 2.28。 - 新增 glibc 2.28 用户态内的 dlopen 与 CPA v8.0.23 e2e、count_tokens、 思考后缀联测。 - package.py 按 GLIBC_FLOOR 记录 glibc_minimum,另存 glibc_symbol_version_max; checksums.py 增加 --max-glibc 发布门槛,并补充单元测试。
- requests/statistics/usage 快照与检查点改用 json.Marshal,一次编码同时 写主文件与检查点。 - 后台写入按上次写入大小把同一文件的重写间隔折算为约 1 MiB/s,下限 250ms、上限 10s;shutdown 与显式 flushStatistics 仍立即写入全部待写文件。 - 新增间隔计算、大文件节流期间保持待写、紧凑编码的单元测试。
- 新增 first_byte_timeout_seconds(请求开始到首段上游数据,含等待响应头) 与 stream_idle_timeout_seconds(此后两段数据的最大间隔);0 为关闭(默认), 启用时 5-1800 秒,均在 timeout_seconds 内生效,控制台与 YAML 可配置。 - read() 改为单个 watchdog 统一处理总超时、首字节与空闲超时,触发时关闭上游 并返回 504 upstream_first_byte_timeout / upstream_stream_idle_timeout。 - 新增单元测试与 cpa_reliability.py 宿主联测(含连接释放与日志错误类型)。
- 版本号 0.2.13(types.go、registry.json),CHANGELOG/README/DEPLOYMENT/发布说明同步,Linux glibc 要求更新为 2.28 - CI 热升级联测的前一版本改为 v0.2.12 - VALIDATION 补充 glibc 下限、写盘节流与卡顿超时的本地验证记录(18/18 宿主联测;真实上游未测)
Gaoshou101
force-pushed
the
codex/p1-glibc-io-timeouts
branch
from
November 7, 2026 15:31
8db0c23 to
791b055
Compare
Gaoshou101
marked this pull request as ready for review
November 7, 2026 15:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
v0.2.13 发版 PR:P1 的三项优化,以及版本号与文档更新。全部在本地模拟上游下完成验证,未访问真实上游,也未访问任何服务器。已 rebase 到包含 #14 的 main。
1. Linux glibc 要求从 2.34 降到 2.28(2bef63b)
原因:v0.2.12 的
.so在 runner 的新 glibc 上构建,amd64 与 arm64 发布包的最高符号版本均为 GLIBC_2.34(另含 2.32)。CPA 宿主本身只要求 glibc 2.3.2。在 glibc 2.28 环境中,dlopen加载 v0.2.12 正式包失败。改动
manylinux_2_28容器中构建,镜像按摘要固定,复用 runner 上的官方 Go 工具链。objdump校验符号版本 ≤ 2.28。package.py在BUILD.json中记录glibc_minimum=2.28和glibc_symbol_version_max。checksums.py --max-glibc 2.28作为发布门槛(两处),并新增拒绝用例。CI 结果:amd64 包实际只需 GLIBC_2.3.2,arm64 只需 GLIBC_2.17。
2. 减少运行数据写盘(b858ed0)
requests.json、statistics.json、usage.json及其检查点改为紧凑 JSON,结构不变。合成测量(90 天 × 2 模型,共 21,768 个桶):
代价:进程被强制结束时,大文件最多可能丢失约 10 秒内的变更。
3. 可选的首字节超时与流空闲超时(ab34339)
first_byte_timeout_seconds/stream_idle_timeout_seconds:0 为关闭(默认),开启时 5–1800 秒;控制台与 YAML 均可配置,保存后立即生效。upstream_first_byte_timeout/upstream_stream_idle_timeout。cpa_reliability.py新增宿主联测(v0.2.12 DLL 失败、新 DLL 通过);设置页浏览器实测可保存并回读。4. 发布 v0.2.13(791b055)
types.go、registry.json),CHANGELOG / README / DEPLOYMENT / 发布说明 / CPAMP 集成说明同步,Linux 下载说明改为 glibc ≥ 2.28(注明 v0.2.12 及更早为 2.34)。docs/VALIDATION.md新增本轮验证记录。本地验证(版本 0.2.13 的最终 DLL)
go vet ./internal/... ./cmd/...、gofmt、go test ./internal/... ./cmd/... -count=1通过;Node 31 项通过;test_cpamp_panel_validation.py(WSL)6 项通过。尚未验证