feat(ai-code-review): 建問題模式導向 issue,並整併流程調整、文件與 CI #6
+5
-2
@@ -67,9 +67,12 @@ function agentFailureDetail(res) {
|
|||||||
// 僅在明確開啟 Actions step debug 時,附上「已遮罩+去控制字元」的片段作為診斷。
|
// 僅在明確開啟 Actions step debug 時,附上「已遮罩+去控制字元」的片段作為診斷。
|
||||||
const verbose = String(process.env.ACTIONS_STEP_DEBUG || '').trim().toLowerCase() === 'true';
|
const verbose = String(process.env.ACTIONS_STEP_DEBUG || '').trim().toLowerCase() === 'true';
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
const stderr = redactSecrets((res && res.stderr) || '');
|
// 先截去過長輸入再遮罩,避免對數 MB 的失敗輸出跑整份 O(k×n) 正規掃描;
|
||||||
|
// 2000 字上限已足以涵蓋跨界機密樣式,最終仍截為 500 字。
|
||||||
|
const DEBUG_INPUT_LIMIT = 2_000;
|
||||||
|
const stderr = redactSecrets(String((res && res.stderr) || '').slice(0, DEBUG_INPUT_LIMIT));
|
||||||
if (stderr) parts.push(`stderr:${stderr.slice(0, 500)}`);
|
if (stderr) parts.push(`stderr:${stderr.slice(0, 500)}`);
|
||||||
const stdout = redactSecrets((res && res.output) || '');
|
const stdout = redactSecrets(String((res && res.output) || '').slice(0, DEBUG_INPUT_LIMIT));
|
||||||
if (stdout) parts.push(`stdout:${stdout.slice(0, 500)}`);
|
if (stdout) parts.push(`stdout:${stdout.slice(0, 500)}`);
|
||||||
}
|
}
|
||||||
if (parts.length === 0) {
|
if (parts.length === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user