Repository navigation
Conversation
Owner
Author
|
verifier 验收结论(COD-30,评审
|
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.
改动
Dockerfile:CMD 改为看守循环while :; do bun bridge.ts; sleep 2; done &,侧车被 OOM kill 后自动拉起(exec python仍接管 PID 1)。bridge/zen/bridge.ts:新增 SIGTERM/SIGINT 处理,server.stop()关监听后以 0 退出,3s 兜底强退。src/observability/zen_bridge.py(新):ZenBridgeMonitor探GET {ZEN_BRIDGE_URL}/healthz(1s 超时、5s TTL 缓存),三态 ok/down/disabled。/health:返回zen_bridge{status,detail},down 时整体status="degraded"(HTTP 仍 200,存活语义不变)。/metrics:新增coding2api_zen_bridge_up0/1(未配置桥时不出该家族)。src/doctor.py+scripts/doctor.py:「zen 侧车」项,不可达 WARN(明说免费档失效,不误报整体健康);--skip-upstream也照跑(不联网)。验证
uv run ruff check src tests scripts全绿uv run pytest -q --cov=src --cov-report=term --cov-fail-under=100→ 6415 passed, coverage 100%bun bridge/zen/bridge.ts:/healthz回 ok;SIGTERM 后关监听、exit 0(timeout 20前台跑,已回收)