You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{ { npm run clean && npm ci && npm run format && npm run build && npm run lint:ci && npm run typecheck; } >"$log_dir/build-and-lint.log"2>&1;echo$?>"$log_dir/build-and-lint.exit"; } &
75
+
rm -f "${log_dir}/build-and-lint.exit"
76
+
{ { npm run clean && npm ci && npm run format && npm run build && npm run lint:ci && npm run typecheck; } >"${log_dir}/build-and-lint.log"2>&1;echo$?>"${log_dir}/build-and-lint.exit"; } &
76
77
77
78
# Dynamically resolve gemini binary (fallback to your nightly path)
echo"Running ONLY failing tests locally...">>"${log_dir}/npm-test.log"
116
119
117
120
exit_code=0
118
-
forfilein$failed_files;do
119
-
if [[ "$file"== packages/* ]];then
120
-
ws_dir=$(echo "$file"| cut -d'/' -f1,2)
121
+
forfilein${failed_files};do
122
+
if [[ "${file}"== packages/* ]];then
123
+
ws_dir="$(echo "${file}"| cut -d'/' -f1,2)"
121
124
else
122
-
ws_dir=$(echo "$file"| cut -d'/' -f1)
125
+
ws_dir="$(echo "${file}"| cut -d'/' -f1)"
123
126
fi
124
-
rel_file=${file#$ws_dir/}
127
+
rel_file="${file#"${ws_dir}"/}"
125
128
126
-
echo"--- Running $rel_file in workspace $ws_dir ---">>"$log_dir/npm-test.log"
127
-
if! npm run test:ci -w "$ws_dir" -- "$rel_file">>"$log_dir/npm-test.log"2>&1;then
129
+
echo"--- Running ${rel_file} in workspace ${ws_dir} ---">>"${log_dir}/npm-test.log"
130
+
if! npm run test:ci -w "${ws_dir}" -- "${rel_file}">>"${log_dir}/npm-test.log"2>&1;then
128
131
exit_code=1
129
132
fi
130
133
done
131
-
echo$exit_code>"$log_dir/npm-test.exit"
134
+
echo"${exit_code}">"${log_dir}/npm-test.exit"
132
135
else
133
-
echo"Could not extract specific failing files. Skipping full local test suite as it takes too long. Please check CI logs manually.">>"$log_dir/npm-test.log"
134
-
echo 1 >"$log_dir/npm-test.exit"
136
+
echo"Could not extract specific failing files. Skipping full local test suite as it takes too long. Please check CI logs manually.">>"${log_dir}/npm-test.log"
137
+
echo 1 >"${log_dir}/npm-test.exit"
135
138
fi
136
139
fi
137
140
else
138
-
echo"Skipped due to build-and-lint failure">"$log_dir/npm-test.log"
139
-
echo 1 >"$log_dir/npm-test.exit"
141
+
echo"Skipped due to build-and-lint failure">"${log_dir}/npm-test.log"
142
+
echo 1 >"${log_dir}/npm-test.exit"
140
143
fi
141
144
} &
142
145
143
146
echo" ↳ [5/5] Starting Gemini test execution (waiting for build and lint)..."
144
-
rm -f "$log_dir/test-execution.exit"
147
+
rm -f "${log_dir}/test-execution.exit"
145
148
{
146
-
while [ !-f"$log_dir/build-and-lint.exit" ];do sleep 1;done
147
-
if [ "$(cat "$log_dir/build-and-lint.exit")"=="0" ];then
148
-
"$GEMINI_CMD" --policy "$POLICY_PATH" -p "Analyze the diff for PR $pr_number using 'gh pr diff $pr_number'. Instead of running the project's automated test suite (like 'npm test'), physically exercise the newly changed code in the terminal (e.g., by writing a temporary script to call the new functions, or testing the CLI command directly). Verify the feature's behavior works as expected. IMPORTANT: Do NOT modify any source code to fix errors. Just exercise the code and log the results, reporting any failures clearly. Do not ask for user confirmation.">"$log_dir/test-execution.log"2>&1;echo$?>"$log_dir/test-execution.exit"
149
+
while [[ !-f"${log_dir}/build-and-lint.exit" ]];do sleep 1;done
"${GEMINI_CMD}" --policy "${POLICY_PATH}" -p "Analyze the diff for PR ${pr_number} using 'gh pr diff ${pr_number}'. Instead of running the project's automated test suite (like 'npm test'), physically exercise the newly changed code in the terminal (e.g., by writing a temporary script to call the new functions, or testing the CLI command directly). Verify the feature's behavior works as expected. IMPORTANT: Do NOT modify any source code to fix errors. Just exercise the code and log the results, reporting any failures clearly. Do not ask for user confirmation.">"${log_dir}/test-execution.log"2>&1;echo$?>"${log_dir}/test-execution.exit"
149
153
else
150
-
echo"Skipped due to build-and-lint failure">"$log_dir/test-execution.log"
151
-
echo 1 >"$log_dir/test-execution.exit"
154
+
echo"Skipped due to build-and-lint failure">"${log_dir}/test-execution.log"
155
+
echo 1 >"${log_dir}/test-execution.exit"
152
156
fi
153
157
} &
154
158
155
159
echo"✅ All tasks dispatched!"
156
-
echo"You can monitor progress with: tail -f $log_dir/*.log"
157
-
echo"Read your review later at: $log_dir/review.md"
160
+
echo"You can monitor progress with: tail -f ${log_dir}/*.log"
161
+
echo"Read your review later at: ${log_dir}/review.md"
158
162
159
163
# Polling loop to wait for all background tasks to finish
echo"⏳ Tasks complete! Synthesizing final assessment..."
231
-
if!"$GEMINI_CMD" --policy "$POLICY_PATH" -p "Read the review at $log_dir/review.md, the automated test logs at $log_dir/npm-test.log, and the manual test execution logs at $log_dir/test-execution.log. Summarize the results, state whether the build and tests passed based on $log_dir/build-and-lint.exit and $log_dir/npm-test.exit, and give a final recommendation for PR $pr_number.">"$log_dir/final-assessment.md"2>&1;then
232
-
echo$?>"$log_dir/final-assessment.exit"
235
+
if!"${GEMINI_CMD}" --policy "${POLICY_PATH}" -p "Read the review at ${log_dir}/review.md, the automated test logs at ${log_dir}/npm-test.log, and the manual test execution logs at ${log_dir}/test-execution.log. Summarize the results, state whether the build and tests passed based on ${log_dir}/build-and-lint.exit and ${log_dir}/npm-test.exit, and give a final recommendation for PR ${pr_number}.">"${log_dir}/final-assessment.md"2>&1;then
236
+
echo$?>"${log_dir}/final-assessment.exit"
233
237
echo"❌ Final assessment synthesis failed!"
234
-
echo"Check $log_dir/final-assessment.md for details."
0 commit comments