Skip to content

Commit 7acf24a

Browse files
committed
kernel_patch_verify: Introduce AI_LOG_ALWAYS variable handling
Introduce AI_LOG_ALWAYS variable that user can configure in environment to force the "AI thought process" for all patches - this is useful for reviewing the research that AI has done about the patch even if the patch itself is fine - typically this includes the checklists of previous review of the patch and if they have been addressed etc. Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent e3f562d commit 7acf24a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ kpv -V -L -A -1
245245
kpv -V -L -A -b base_branch -t test_branch
246246
```
247247

248+
NOTE: You can set the environment variable `AI_LOG_ALWAYS` to 1 to force the
249+
AI review logic to be available in the log always - even if the patch is fine
250+
from AI review perspective. Default is to dump the AI thought process only if
251+
there are review comments to provide for the patch.
252+
248253
### Semcode Integration
249254

250255
The AI review works best with semcode indexing, which provides better context

kernel_patch_verify

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,14 @@ series_ai_review() {
523523
echo "Severity: $severity - $severity_explain"
524524
echo "AI-authorship: $ai_authorship"
525525
echo "========================================"
526+
527+
} >> "$LOG_DIR/ai-review.log"
528+
else
529+
echo "$short_sha: No issues found" >> "$LOG_DIR/ai-review.log"
530+
fi
531+
532+
if [ -f "$worktree_dir/review-inline.txt" -o -n "$AI_LOG_ALWAYS" ]; then
533+
{
526534
echo ""
527535

528536
echo "--- Review Comments ---"
@@ -535,8 +543,6 @@ series_ai_review() {
535543
echo ""
536544
fi
537545
} >> "$LOG_DIR/ai-review.log"
538-
else
539-
echo "$short_sha: No issues found" >> "$LOG_DIR/ai-review.log"
540546
fi
541547

542548
# Clean up the worktree created by review_one.sh

0 commit comments

Comments
 (0)