From 8d3129886123fef6cfbfd9658e80130c3d3cc893 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 2 Feb 2026 11:32:21 -0500 Subject: [PATCH] feat: Add Bruno API tests and recent changes validation Check 14: Bruno API Tests Validation - Count and verify Bruno .bru test files presence - Compare API documentation vs Bruno test coverage - Flag insufficient test coverage for human review Check 15: Recent Documentation Changes Analysis - Analyze recent commits for documentation compliance - Flag code commits without corresponding documentation updates - Verify proper commit message format (docs: prefix) - Ensure documentation stays synchronized with code changes These checks provide comprehensive validation of API testing coverage and ensure documentation follows proper git commit conventions per PROJECT_GUIDELINES.md requirements. --- scripts/verify-guidelines.sh | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/scripts/verify-guidelines.sh b/scripts/verify-guidelines.sh index 5bd17e4..030192f 100755 --- a/scripts/verify-guidelines.sh +++ b/scripts/verify-guidelines.sh @@ -367,6 +367,57 @@ if [ -d "docs/devices" ]; then fi fi +############################################################################### +## Check 14: Bruno API Tests Validation +############################################################################### +section "Documentation: Bruno API Tests" + +echo "Checking Bruno API test files..." +BRUNO_FILES=$(find bruno -name "*.bru" 2>/dev/null | wc -l) +if [ "$BRUNO_FILES" -gt 0 ]; then + success_msg "Found $BRUNO_FILES Bruno test files" +else + warning_msg "No Bruno test files found" +fi + +echo "Checking API documentation vs Bruno test coverage..." +if [ -d "docs/api" ]; then + API_DOC_COUNT=$(find docs/api -name "*.md" 2>/dev/null | wc -l) + if [ "$BRUNO_FILES" -ge "$API_DOC_COUNT" ]; then + success_msg "Bruno test coverage appears sufficient" + else + warning_msg "Bruno test files ($BRUNO_FILES) fewer than API docs ($API_DOC_COUNT)" + fi +fi + +############################################################################### +## Check 15: Recent Documentation Changes Analysis +############################################################################### +section "Documentation: Recent Changes Validation" + +echo "Checking recent commits for documentation compliance..." +if git rev-parse --git-dir > /dev/null 2>&1; then + # Check for code commits without documentation updates + RECENT_CODE_COMMITS=$(git log --oneline -5 --grep="^feat\|^fix\|^refactor" --grep -v "^docs:" --invert-grep | wc -l) + RECENT_DOCS_COMMITS=$(git log --oneline -5 --grep="^docs:" | wc -l) + + if [ "$RECENT_CODE_COMMITS" -gt 2 ] && [ "$RECENT_DOCS_COMMITS" -eq 0 ]; then + warning_msg "Found $RECENT_CODE_COMMITS recent code commits with no documentation updates" + else + success_msg "Documentation appears updated with recent changes" + fi + + # Check commit message format compliance + NON_COMPLIANT_DOCS=$(git log --oneline -10 | grep -i "doc" | grep -v "^docs:" | wc -l) + if [ "$NON_COMPLIANT_DOCS" -gt 0 ]; then + warning_msg "Found $NON_COMPLIANT_DOCS documentation commits without 'docs:' prefix" + else + success_msg "Documentation commits follow proper format" + fi +else + success_msg "Git analysis skipped" +fi + ############################################################################### ## Summary ###############################################################################