docs: 全庫程式碼審查 + 分 Tier 改善規劃 (2026-07)#97
Merged
Conversation
5 條並行子系統審查 (server/API · pipeline/render · AI/內容生成 · 安全/設定 · 品質/架構/測試) + 逐一 Read 驗證最嚴重發現。沿用 docs/CODE_REVIEW.md 的 「只列真實問題」原則。 重點: - Tier 0 產品核心正確性: clean_json_escapes 靜默破壞 \theta/\times/\frac 等 LaTeX、exam review gate 可被 require_review=false 繞過、解題寫死舊模型 - Tier 1 穩定性: dubber filtergraph 索引錯位 (缺音檔即崩)、外部呼叫全線無 timeout (23 subprocess 僅 2 個)、無並行上限、state.json 非原子寫 - Tier 2 安全縱深: url 來源 SSRF、base compose 綁 0.0.0.0+預設無 token、 editor.py j.error 未跳脫 - Tier 3 架構: core/ 是頂層腳本的空殼再匯出層 (依賴方向反)、Gemini client 13+ 檔重複、ffmpeg 14+ 檔手刻、app.jsx 3508 行單檔 先報喜: 上一份 CODE_REVIEW.md 的 4 個 P0 已全部修掉。無遠端未授權嚴重漏洞。 Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_017YfSHitPvSuuzVdVkhspWR
dofliu
marked this pull request as ready for review
July 9, 2026 14:44
dofliu
pushed a commit
that referenced
this pull request
Jul 14, 2026
反映 2026-07 兩項工作(PR #97 全庫審查、PR #98 圖片入門階對齊),並把後續接續工作 記錄進既有規劃文件: - README.md(中英雙語):圖片模型改為三階層 Nano Banana 2 Lite / 2 / Pro (gemini-3.1-flash-lite-image / -flash-image / gemini-3-pro-image) - ROADMAP.md:更新 v4.5 圖片三階層(PR #98);新增「程式碼健檢與後續改善」段 (體質結論 + 兩條主軸,指向 CODE_REVIEW_2026-07.md 與 TODO) - TODO.md:新增「程式碼審查後續改善」勾選清單(Sprint 1~4+,Tier 0 產品正確性 → T1 穩定性 → T2 安全 → T3 架構),routine 可依序認領;圖片對齊標為已完成 - docs/CHANGELOG.md:新增 2026-07 條目(REVIEW #97 / IMG-LITE #98) - HANDOFF.md:更新圖片模型 id 清單為新入門階 + 單一目錄說明 所有變更皆標註 gemini-3.1-flash-lite-image 待 live 實測。 Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_017YfSHitPvSuuzVdVkhspWR
8 tasks
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.
做什麼 / What
新增
docs/CODE_REVIEW_2026-07.md— 一份全庫(~65k 行 Python + React 前端)程式碼審查與分 Tier 的後續改善規劃。純文件,無程式碼改動。接續
docs/CODE_REVIEW.md(v3.1+v3.2)。方法:5 條並行子系統審查(server/API · pipeline/render · AI/內容生成 · 安全/設定 ·
品質/架構/測試)+ 主審對每條最嚴重發現逐一 Read 原始碼驗證。
先報喜:上一份
CODE_REVIEW.md列的 4 個 P0 已全部修掉(logging lock、SystemExitcatch、上傳 200MB 上限、utc_now);安全四大常見致命傷(命令注入 / path traversal /
secrets / CORS)都有系統性防護且落地,無遠端未授權嚴重漏洞。
發現依「修了對產品最有感」分 4 個 Tier:
clean_json_escapes靜默破壞\theta/\times/\frac;exam review gate 可被require_review=false繞過;解題寫死舊模型url來源 SSRF;base compose 綁0.0.0.0+預設無 token;editor.pyj.error未跳脫core/是頂層腳本的空殼再匯出層(依賴方向反);Gemini client 13+ 檔重複;ffmpeg 14+ 檔手刻;app.jsx3508 行單檔文末附分 4 個 Sprint 的執行建議(先產品止血 → 統一抽象順帶解 timeout/model → 安全縱深 →
架構償債)。
為什麼 / Why
使用者要求對現有專案做程式碼檢查並提出後續改善規劃。產出一份可長期參照、可分批認領的
稽核文件,沿用 repo 既有
docs/慣例。本 PR 只提出規劃,不含修復實作——待逐項認領。怎麼測 / How tested
pytest不適用(無程式碼改動)npm run build不適用自我檢查 / Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_017YfSHitPvSuuzVdVkhspWR
Generated by Claude Code