Repository navigation
ai-review: cắt chi phí (PR + staging/prod), dùng lại verdict, fail-open có cảnh báo - #5
Merged
Merged
Conversation
…HA/PR, fail-open có cảnh báo - Tách logic sang .github/scripts/ai_review.py (repo public → job tự checkout), hết bẫy biểu thức GHA literal trong run-block; thêm unit test + workflow ci (actionlint + test). - Bước decide: push develop/feature, workflow_dispatch → job SUCCESS nhưng không gọi LLM (skip ở step để không kéo build-develop skip theo). - Push staging/prod: SHA đã có comment review hoặc thuộc PR đã merge đã review → dùng lại. - Profile deploy: commit chỉ đổi tag image (cùng repo) → PASS không gọi LLM. - Context: git diff -W (nguyên hàm) thay full file, cap 45KB; bỏ docs/md/locale/snapshot. - Output có severity + confidence; verdict tính bằng code (FAIL ⇔ blocker ≥ 0.8). - 1 comment/PR sửa tại chỗ; marker ẩn để khử trùng. - LLM lỗi → ::warning + comment KHÔNG CHẠY ĐƯỢC thay vì PASS im lặng. - Model mặc định 'ai-review' (alias phía gateway), tắt thinking qua llm_extra_body.
…LED kill switch and newer concurrency
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.
Sau vụ getnexai trả 402 từ 26/10 (gate fail-open im lặng → mọi review đều PASS).
Chưa merge: cần đổi secret OPENAI_BASE_URL/OPENAI_API_KEY ở 17 repo sang endpoint mới + alias model
ai-reviewtrước.Thay đổi: xem commit message. Không phải sửa workflow ở repo app nào — caller giữ nguyên.
Test:
python3 -m unittest discover -s .github/scripts(14 test) + chạy script local với LLM giả: tag-only PASS, blocker FAIL exit 1, LLM chết → warning + exit 0.