Skip to content

feat(gateway): RFC#420 全量落地(双产物发布、统一启动内核、第三方接入文档与CI验收)#423

Merged
phantom5099 merged 18 commits into1024XEngineer:mainfrom
pionxe:release/v2.0-split-build
Apr 24, 2026
Merged

feat(gateway): RFC#420 全量落地(双产物发布、统一启动内核、第三方接入文档与CI验收)#423
phantom5099 merged 18 commits into1024XEngineer:mainfrom
pionxe:release/v2.0-split-build

Conversation

@pionxe
Copy link
Copy Markdown
Collaborator

@pionxe pionxe commented Apr 23, 2026

背景

本 PR 按 RFC #420 既定路线进行严格全量落地,目标是:

  1. 保持 neocode 现有行为不变;
  2. 新增 neocode-gateway 作为 Gateway-Only 官方发布物;
  3. 固化双入口行为一致性、自动拉起契约、发布安装命名稳定性与第三方接入文档体系。

主要变更

1) 双产物与入口边界

  • 新增 cmd/neocode-gateway 独立入口(仅网关服务语义,不含 TUI 主入口)。
  • neocode gatewayneocode-gateway 共享参数归一化与执行路径,避免逻辑复制。
  • 增加命令一致性测试,验证同参同结果与错误传播一致。

2) 共享 launcher + 自动拉起契约

  • 新增共享 launcher 组件,发现顺序固定为:
    NEOCODE_GATEWAY_BIN > PATH neocode-gateway > neocode gateway
  • url-dispatch 网关不可达路径接入“拉起后重拨”,且仅允许一次受控回退。
  • 失败返回确定性错误,避免无限重试。

3) 可观测性与一致性防漂移

  • 新增结构化启动决策日志字段:
    launch_moderesolved_execlisten_addressauth_mode
  • 增加日志关键字段白名单断言,固定语义而非绑定整行文案。

4) 发布、安装与命名稳定

  • goreleaser 增加 neocode-gateway 构建与独立资产命名规则。
  • install.sh / install.ps1 增加 full|gateway flavor 与 dry-run
  • 安装流程加入 checksum 校验;dry-run 输出 URL/资产/checksum 供 CI 回归断言。

5) CI 验收增强

  • 新增 gateway-only 冒烟链路:
    启动进程 -> /healthz -> /rpc 最小未鉴权请求(预期失败)-> 退出清理。
  • 新增安装脚本 dry-run 回归(full/gateway 资产命名与 URL 规则)。

6) 文档全量补齐

  • 重写 RFC 风格详细设计文档(内部)。
  • 新增第三方协作文档(接入指南)。
  • 新增 RPC API 文档(XGO 风格,重点细化 gateway.rungateway.bindStream 双向交互)。
  • 新增错误字典(HTTP / JSON-RPC / gateway_code 对照 + Reasoning)。
  • 新增兼容性策略文档(含字段优雅废弃节奏)。
  • 补充 README 与更新指南。

7) 文档一致性机制

  • 新增基于 Go 结构体的 JSON 示例自动生成:
    go generate ./internal/gateway/protocol
  • 生成产物写入 docs/generated/gateway-rpc-examples.json,降低“文实不符”风险。

测试与验证

  • go build ./...
  • go test ./internal/gateway/launcher ./internal/gateway/adapters/urlscheme ./internal/gateway/protocol ./scripts
  • go test ./internal/cli -run "TestNewGatewayStandaloneCommandPassesFlagsToRunner|TestNewGatewayStandaloneCommandRejectsInvalidLogLevel|TestGatewaySubcommandAndStandaloneCommandAreOptionEquivalent|TestExecuteGatewayServerUsesStandaloneCommand|TestGatewaySubcommandAndStandaloneCommandPropagateSameRunnerError"

风险与回滚

主要风险

  • 双入口后行为漂移(参数、错误码、日志关键字段)。
  • 安装脚本资产命名调整导致自动化脚本断裂。

缓解措施

  • 共享执行内核 + 一致性测试 + 日志字段白名单断言。
  • flavor/dry-run 回归测试锁定命名与 URL 规则。

回滚策略

  1. 回退到上一版稳定二进制;
  2. healthz + /rpc 最小请求重新验收;
  3. 如需临时兼容,保留 neocode gateway 子命令路径。

关联

pionxe added 2 commits April 23, 2026 18:48
- 新增 gateway-only 可执行入口 neocode-gateway,并与 `neocode gateway` 复用同一启动内核
- 引入共享 launcher,固定发现顺序:
  NEOCODE_GATEWAY_BIN > PATH(neocode-gateway) > 回退 neocode gateway
- 在 url-dispatch 不可达路径接入“先拉起后重拨”流程,限制为单次受控回退
- 增加结构化启动决策日志字段与白名单断言测试,降低双入口行为漂移风险
- 扩展发布与安装体系:goreleaser 双产物、install 脚本 flavor + dry-run + checksum 校验
- CI 增加 gateway-only 冒烟链路与安装脚本 dry-run 回归检查
- 补齐文档体系:RFC 设计、第三方接入指南、RPC API(XGO 风格)、错误字典、兼容性策略
- 增加基于 Go 结构体的 JSON 示例自动生成机制,输出 docs/generated 示例文件

测试:
- go build ./...
- go test ./internal/gateway/launcher ./internal/gateway/adapters/urlscheme ./internal/gateway/protocol ./scripts
- go test ./internal/cli -run "TestNewGatewayStandaloneCommandPassesFlagsToRunner|TestNewGatewayStandaloneCommandRejectsInvalidLogLevel|TestGatewaySubcommandAndStandaloneCommandAreOptionEquivalent|TestExecuteGatewayServerUsesStandaloneCommand|TestGatewaySubcommandAndStandaloneCommandPropagateSameRunnerError"

关联:RFC#420
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 91.53605% with 27 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
scripts/check_gateway_docs/main.go 72.72% 10 Missing and 5 partials ⚠️
internal/gateway/adapters/urlscheme/dispatcher.go 94.11% 7 Missing and 3 partials ⚠️
internal/gateway/launcher/launcher.go 97.14% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

fennoai[bot]

This comment was marked as outdated.

@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你帮我解决冲突!同时解决review的问题!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 23, 2026

结果

已完成你这次提到的“review 问题”修复,并把改动推送到当前 PR 源分支 pionxe:release/v2.0-split-build

本地检查未发现 <<<<<<< / ======= / >>>>>>> 这类冲突标记;本次实际存在的 review 指向问题是 internal/cli/gateway_commands.go 中文注释乱码,我已全部恢复为可读 UTF-8 中文,未改动业务逻辑。

已完成事项

  • 修复文件:internal/cli/gateway_commands.go
  • 修复内容:将 20 处乱码中文注释恢复为 UTF-8 正常中文注释
  • 验证:
    • go test ./internal/cli -run "TestNewGatewayStandaloneCommandPassesFlagsToRunner|TestNewGatewayStandaloneCommandRejectsInvalidLogLevel|TestGatewaySubcommandAndStandaloneCommandAreOptionEquivalent|TestExecuteGatewayServerUsesStandaloneCommand|TestGatewaySubcommandAndStandaloneCommandPropagateSameRunnerError"
  • 提交:083d76a
  • 已推送到:pionxe/release/v2.0-split-build

分支同步信息

按 fork 流程同步创建了 fork 内 PR:

View job run

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你帮我解决文件冲突!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 23, 2026

已完成

已处理并提交本 PR 与 origin/main 的冲突修复,核心结果如下:

  • 冲突文件已解决:README.mddocs/guides/gateway-integration-guide.md
  • 为避免 add/add 冲突反复出现,docs/guides/gateway-integration-guide.md 已对齐 origin/main 版本
  • 同步了主干已有的文档校验入口:.github/workflows/ci.ymlMakefile
  • 本地验证通过:go build ./...go test ./...

已推送提交到你当前 PR 源分支:release/v2.0-split-build

  • Commit: 7885f7b

View job run

Generated with [codeagent](https://github.com/qbox/codeagent)

Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你帮我解决CI构建失败的问题!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 23, 2026

已完成修复

已定位并修复本次 CI 构建失败。

根因

make docs-gateway-check 的命令与当前实现不一致:

  • 调用了不存在的路径 ./scripts/generate_gateway_rpc_examples(缺少 .go
  • 未带 gatewaydocgen build tag
  • diff 校验目标仍是旧文件 docs/reference/gateway-rpc-api.md

导致 CI 在 Verify gateway docs are generated 步骤直接失败(stat ... directory not found)。

修复内容

已更新 Makefile

  • docs-gateway 改为 go run -tags gatewaydocgen ./scripts/generate_gateway_rpc_examples.go
  • docs-gateway-check 同步改为上述命令
  • docs-gateway-check 的 diff 目标改为 docs/generated/gateway-rpc-examples.json

验证结果

本地已通过:

  • make docs-gateway-check
  • go build ./...
  • go test ./internal/gateway/protocol ./scripts

提交与推送

  • Commit: 62a694e
  • 已推送到当前 PR 分支:pionxe:release/v2.0-split-build

Fork 同步 PR

View job run

@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你详细阅读CI构建失败的原因!分析到底是哪里的问题!并给出你的解决方案,说明为什么!

@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

CI 失败原因(已本地复现)

本次失败是 make docs-gateway-check 命令与仓库当前实现不一致 导致的硬失败,不是测试逻辑本身问题。

  1. CI 触发点:.github/workflows/ci.yml:35
  • 执行:make docs-gateway-check
  1. 直接失败点:Makefile:10
  • 当前命令:go run ./scripts/generate_gateway_rpc_examples
  • 本地复现报错:stat /workspace/scripts/generate_gateway_rpc_examples: directory not found
  • 结论:这里引用的是不存在的路径(缺少 .go 文件后缀),CI 会在第一关直接退出。
  1. 次级一致性问题(即使第一处修好也应一起修)
  • Makefile:11 仍在校验 docs/reference/gateway-rpc-api.md,但当前 PR 生成产物是 docs/generated/gateway-rpc-examples.json,且 docs/reference/ 目录已不存在。
  • 这会导致 docs 校验目标与真实生成物脱钩,后续容易出现“文档检查通过但产物漂移”的隐患。

为什么会这样

核心是“生成器入口和校验目标已经迁移,但 Makefile 还停留在旧实现”。 CI 把 docs-gateway-check 放在最前面执行,因此该不一致会稳定阻断整条流水线(后续 go buildgo test、smoke 都不会执行)。

解决方案(建议直接落地)

Makefile 两个 target 对齐到当前文档生成机制:

docs-gateway:
	@go run -tags gatewaydocgen ./scripts/generate_gateway_rpc_examples.go

docs-gateway-check:
	@go run -tags gatewaydocgen ./scripts/generate_gateway_rpc_examples.go
	@git diff --exit-code -- docs/generated/gateway-rpc-examples.json

说明:

  • 使用 .go 明确入口,避免路径解析失败。
  • 使用 -tags gatewaydocgeninternal/gateway/protocol/docgen_generate.gogo:generate 约定一致,减少命令语义漂移。
  • 将 diff 目标改为真实生成文件,确保 CI 真正校验“文档示例是否最新”。

我做的核验

  • 失败复现:make docs-gateway-check(当前分支可稳定复现)
  • 非根因项核验:go build ./...go test ./... 本地均可通过
  • 结论:当前阻断 CI 的主因就是 docs check 目标配置错误。

本次未做

  • 未提交代码改动(按你的要求先做“详细原因分析 + 解决方案说明”)。

View job run

@xgopilot 请你解决!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 23, 2026

处理结果

已按你给出的根因定位完成修复,并已推送到当前 PR 分支 release/v2.0-split-build(commit: 06aa0f7)。

变更内容

  • 修改 Makefile
    • docs-gateway 改为执行:go run -tags gatewaydocgen ./scripts/generate_gateway_rpc_examples.go
    • docs-gateway-check 改为执行同一生成命令,并校验真实产物:docs/generated/gateway-rpc-examples.json

本地验证

  • make docs-gateway-check:通过(已成功生成并校验 docs/generated/gateway-rpc-examples.json,无 diff)

未执行项

  • 未额外重跑整套 CI(如 go test ./... / smoke),本次仅针对触发评论要求的 docs check 阻断点进行修复与本地复验。

View job run

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你帮我解决文件冲突问题!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 23, 2026

已完成

已处理你提到的“文件冲突”问题,并已推送到当前 PR 源分支 pionxe:release/v2.0-split-build

处理结果

  • GitHub PR #423 当前状态:mergeable = MERGEABLE
  • mergeStateStatusUNSTABLE(可合并,但检查状态未完全稳定)
  • 本地三方合并模拟已无冲突(git merge-tree origin/main HEAD 无冲突项)

实际修复内容

  • 对齐冲突核心文件以消除与 origin/main 的冲突源:
    • Makefile
    • scripts/generate_gateway_rpc_examples/main.go
    • docs/reference/gateway-rpc-api.md
  • 推送提交:
    • 222f2df fix(conflict): resolve Makefile merge conflict with main
    • d5633b7 fix(conflict): align gateway doc generator path with origin main
    • 487b323 fix(conflict): align docs reference api file with origin main

本地验证

  • go build ./...
  • go test ./scripts

额外同步

View job run

xgopilot and others added 3 commits April 23, 2026 12:30
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你帮我解决文件冲突问题!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 23, 2026

处理结果

已按“解决文件冲突”完成排查与验证,当前这个 PR 分支没有可修复的文件冲突。

我做了以下检查:

  • 读取仓库规则(CLAUDE.md / AGENTS.md)并按规则排查。
  • 检查工作区冲突状态:git diff --name-only --diff-filter=U 为空。
  • 检查冲突标记:仓库内无 <<<<<<< / ======= / >>>>>>>
  • 基于 origin/main 做三方合并冲突预测(git merge-tree):未发现冲突块。
  • 额外验证构建:go build ./... 通过。
  • 额外验证相关用例:go test ./internal/cli -run "TestGatewaySubcommandAndStandaloneCommandAreOptionEquivalent|TestExecuteGatewayServerUsesStandaloneCommand|TestGatewaySubcommandAndStandaloneCommandPropagateSameRunnerError" 通过。

补充说明:

  • 当前 PR 在 GitHub 的状态是 UNSTABLE(检查失败),不是 DIRTY(合并冲突)。
  • 本次未做代码改动,也没有新提交可推送。

如果你希望,我下一步可以直接按当前失败检查去定位并修复 CI 阻断点。

View job run

@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你详细阅读CI构建失败的原因!分析到底是哪里的问题!并给出你的解决方案,说明为什么!最后帮我解决该问题!

xgopilot and others added 2 commits April 23, 2026 12:53
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你将codecov/patch覆盖率提升至百分之九十五以上!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 23, 2026

已完成一轮“提升 patch 覆盖率”的补测并已推送到当前 PR 头分支 release/v2.0-split-build(commit: f461648)。

本次改动

  • 新增 cmd/neocode-gateway 入口测试,覆盖:
    • --help 正常路径
    • 参数错误触发 main 退出码 1 路径(子进程断言)
  • 补充 launcher.ResolveGatewayLaunchSpec 包装层测试,覆盖显式二进制解析路径。
  • 补充 urlscheme.NewDispatcher 默认 launcher 解析闭包与 resolveAuthMode 分支测试。

变更文件

  • cmd/neocode-gateway/main_test.go
  • internal/gateway/launcher/launcher_test.go
  • internal/gateway/adapters/urlscheme/dispatcher_test.go

已验证

  • go test ./cmd/neocode-gateway ./internal/gateway/launcher ./internal/gateway/adapters/urlscheme
  • go test ./internal/cli -run "TestNewGatewayStandaloneCommandPassesFlagsToRunner|TestNewGatewayStandaloneCommandRejectsInvalidLogLevel|TestGatewaySubcommandAndStandaloneCommandAreOptionEquivalent|TestExecuteGatewayServerUsesStandaloneCommand|TestGatewaySubcommandAndStandaloneCommandPropagateSameRunnerError"
  • go test ./internal/gateway/launcher ./internal/gateway/adapters/urlscheme ./internal/gateway/protocol ./scripts
  • go test ./... -coverprofile=/tmp/cover.out

说明:本地无法直接拿到 Codecov 的服务器端 patch 统计口径,但已针对本 PR 新增的网关入口与 launcher 关键未覆盖路径补齐测试,理论上会显著抬升 patch 覆盖率。如你希望,我可以继续按 Codecov 返回的具体未覆盖行再做第二轮定点补测。

View job run

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 23, 2026

@xgopilot 请你将codecov/path覆盖率提升至百分之九十五以上!特别是internal/gateway/adapters/urlscheme/dispatcher.go!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 23, 2026

已完成

已按你的要求提升覆盖率,重点补齐了 internal/gateway/adapters/urlscheme/dispatcher.go 相关分支测试,并推送到当前 PR 源分支。

结果

  • 新增测试集中覆盖:
    • Dispatch 错误帧分支(frame type=error 的缺失 payload 与错误透传)
    • launchGateway 的空依赖/失败分支
    • waitGatewayReady 的默认函数、重试与 deadline 分支
    • callRPC 的上下文取消时序分支
    • authenticate 的版本/ID/解码异常分支
    • emitLaunchDecisionLog 的 nil guard 分支
  • 覆盖率(本地)
    • go test ./internal/gateway/adapters/urlscheme -coverprofile=/tmp/disp.cover
    • 包级 statements:95.9%
    • dispatcher.go statements:95.83%207/216

提交与推送

未做项

  • 未在本地重跑全仓 go test ./...(本次仅针对你要求的覆盖率提升目标进行定向验证)。

View job run

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@phantom5099
Copy link
Copy Markdown
Collaborator

@xgopilot 批判性review整个PR,分析所有潜在风险点,找出所有漏洞,确保每个地方的修改不是退步的,方案上的设计也不能碎片化,更不能妥协式兼容或兜底旧代码,不许输出正向表扬

@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 24, 2026

@xgopilot 针对上述review的问题,请你详细分析问题所在及其原因,并思考如何合理解决!最后请你解决上述问题,并返回你的分析报告以及实施的方案报告给我!

xgopilot and others added 2 commits April 24, 2026 02:57
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
fix(gateway): 对齐拉起契约并修复文档校验链路
@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 24, 2026

/review

Copy link
Copy Markdown

@fennoai fennoai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

完成了代码质量、性能、安全和文档一致性四轮审查。以下是去重后的重点问题(非阻塞):

  1. 自动拉起执行路径存在信任边界风险。
  2. 文档校验链路可能允许主文档与生成示例漂移。
  3. 超时错误文案与实际截止时间可能不一致,影响排障。

Comment thread internal/gateway/launcher/launcher.go Outdated
}, nil
}

if resolved, err := resolveByLookup("neocode-gateway"); err == nil {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResolveGatewayLaunchSpec 在自动拉起路径中直接信任 PATH 解析结果(neocode-gateway / neocode),这使 URL 调度路径具备执行环境中同名二进制的能力。建议至少增加一层约束(例如仅接受绝对路径配置、校验二进制来源/目录白名单、或在 fallback 场景中显式 opt-in),避免在不可信 PATH 下触发意外代码执行。

Comment thread Makefile
@go run ./scripts/generate_gateway_rpc_examples
@git diff --exit-code -- docs/reference/gateway-rpc-api.md
@go run -tags gatewaydocgen ./scripts/generate_gateway_rpc_examples.go
@git diff --exit-code -- docs/generated/gateway-rpc-examples.json
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs-gateway-check 现在只校验 docs/generated/gateway-rpc-examples.json,不再覆盖面向用户的 RPC 文档文件(例如 docs/gateway-rpc-api.md / 旧 reference 文档)。这会让“生成产物正确但主文档描述过期”无法在 CI 被拦截。建议把用户可读文档的一致性校验也纳入该目标。

return nil
}
if !nowFn().Before(deadline) {
return fmt.Errorf("gateway did not become reachable within %s", defaultGatewayLaunchTimeout)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waitGatewayReady 的错误文案固定写 within 3s,但实际 deadline 可能被更短的 ctx.Deadline() 覆盖(见上文 deadline 计算)。当上游设置更短超时时,日志会误导排障。建议在报错中输出实际生效的等待窗口(deadline-now 或上下文截止时间)。

@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 24, 2026

/simplify

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 24, 2026

Completed

已按你的要求完成:读取历史评论、评估未闭环 review 点并落地修复,然后使用 code-simplifier 做行为不变简化,最后提交并推送。

Implemented Changes

  1. internal/gateway/launcher/launcher.go
  • 新增路径约束:ExplicitBinary 必须是绝对路径。
  • PATH 解析出的 neocode-gateway / neocode 可执行路径必须是绝对路径。
  • 解析与 LaunchSpec 构造逻辑做了去重简化。
  1. internal/gateway/adapters/urlscheme/dispatcher.go
  • waitGatewayReady 超时报错改为使用真实生效窗口(考虑 ctx.Deadline() 覆盖)。
  • 提炼 JSON-RPC 响应校验/解码公共逻辑,减少分支重复。
  • 提炼启动决策日志构造与失败日志输出,保持字段一致性。
  1. Makefile + scripts/check_gateway_docs/*
  • docs-gateway-check 新增 go run ./scripts/check_gateway_docs
  • 新增文档一致性校验脚本:校验 docs/generated/gateway-rpc-examples.jsondocs/gateway-rpc-api.md 的关键方法小节和生成产物引用一致。
  • 增加对应单元测试。

Validation

  • go test ./internal/gateway/launcher ./internal/gateway/adapters/urlscheme ./scripts/check_gateway_docs
  • make docs-gateway-check

Commit & Push

Not Done

  • 未执行全量 go test ./...(本次仅针对本轮修复范围做定向验证)。

View job run

xgopilot and others added 2 commits April 24, 2026 05:05
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
fix(gateway): close unresolved review risks and simplify
@pionxe
Copy link
Copy Markdown
Collaborator Author

pionxe commented Apr 24, 2026

@xgopilot 请你帮我解决冲突问题!

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 24, 2026

处理结果

已完成这次“解决冲突”处理,并已推送到当前 PR 源分支 pionxe:release/v2.0-split-build

  • 冲突根因:README.mdmain 后续提交存在重叠改动,GitHub 判定 CONFLICTING
  • 处理方式:将 README 主体对齐 main 当前版本,并补回 RFC#420 的双产物/启动兼容说明段,确保信息保留且可自动合并。
  • 推送提交:f32b04b
  • 当前状态:mergeable = MERGEABLEmergeStateStatus = UNSTABLE

已执行验证

  • 三方合并模拟校验:README.md 冲突消失(merge-file 复算无冲突)
  • 全量测试:go test ./... 通过

View job run

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@phantom5099 phantom5099 merged commit d1e4e6e into 1024XEngineer:main Apr 24, 2026
2 checks passed
@fennoai fennoai Bot deleted the release/v2.0-split-build branch April 24, 2026 11:33
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.

3 participants