Repository navigation
fix(startup): PUBLIC_BASE_URL 留空时启动打 WARNING 提示 (#15) - #35
Merged
zj1123581321 merged 2 commits intoSep 23, 2026
Merged
Conversation
added 2 commits
September 23, 2026 16:24
Agent-Executor: agy Agent-Model: gemini-3.8-flash-high Agent-Effort: unknown Dispatch-Id: dlg-20260923-082221-6ccc70 Task-Id: MediaResolverAPI-20260923-02
Agent-Executor: agy Agent-Model: gemini-3.8-flash-high Agent-Effort: unknown Dispatch-Id: dlg-20260923-082221-6ccc70 Task-Id: MediaResolverAPI-20260923-02
Required Gate v2 — 状态面板当前状态:pass · 可合并 当前裁决:
Gate 历史(v1;来源为持久化
|
| Run | Attempt | Head | 状态 | 收件人动作 |
|---|---|---|---|---|
| 35837313396 | 1 | 8cdc20a |
pass |
可合并 |
历史行按 run_id + run_attempt 去重并只增不删;删除本评论后可由 gate_terminal 制品重建。
zj1123581321
deleted the
card/MediaResolverAPI-public-base-guard-260923
branch
September 23, 2026 08:32
This was referenced Sep 23, 2026
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.
为什么
PUBLIC_BASE_URL留空时,data.video_url按请求Host推导。2026-09-02 生产上曾推出http://localhost:8206/...:POST /api/resolve照常返回 200 与一个看起来合理的 URL,只有下游拉流才失败——静默失效,重装/迁移时极易漏配(issue #15)。改法
lifespan里setup_logging()之后加一条 fail-open 的 WARNING,字面量PUBLIC_BASE_URL 未设置可 grep:空判定口径与
_public_origin一致(纯空白视为未设置)。不 fail-fast(客户端直连本服务的部署形态下留空是合法配置),不阻断启动。实测
""/" ")走真实TestClient(app)启动GET /仍 200https://api.example.com(负控)logger.warningassert 0 == 1),还原后全绿uv run --extra dev python -m pytest tests/ -q→ 416 passed影响范围
只多一条启动日志;不新增配置项、不改推导逻辑、不改任何响应结构。
备注
[Unreleased]条目由同批持有CHANGELOG.md写权的卡(P2: 视频号解析侧单端点链无瞬态重试,TikHub 瞬时空结果直接终态失败 #34/P3: retryable 分类吞掉上游失败原因(空 data / object_type!=0 / 错误 body 三态不可区分) #33 修复卡)合并时一并补齐,避免同一文件两支笔。