[Fix] Remove all emoji violations from code files

- Replaced emojis with ASCII text markers ([OK], [ERROR], [WARNING], etc.)
- Fixed 38+ violations across 20 files (7 Python, 6 shell scripts, 6 hooks, 1 API)
- All modified files pass syntax verification
- Conforms to CODING_GUIDELINES.md NO EMOJIS rule

Details:
- Python test files: check_record_counts.py, test_*.py (31 fixes)
- API utils: context_compression.py regex pattern updated
- Shell scripts: setup/test/install/upgrade scripts (64+ fixes)
- Hook scripts: task-complete, user-prompt-submit, sync-contexts (10 fixes)

Verification: All files pass syntax checks (python -m py_compile, bash -n)
Report: FIXES_APPLIED.md contains complete change log

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-17 13:06:33 -07:00
parent 25f3759ecc
commit fce1345a40
21 changed files with 376 additions and 123 deletions

View File

@@ -27,7 +27,7 @@ echo "[1/7] Checking API availability..."
API_URL="${CLAUDE_API_URL:-http://localhost:8000}"
if ! curl -s --max-time 3 "$API_URL/health" >/dev/null 2>&1; then
echo " ERROR: API is not available at $API_URL"
echo "[ERROR] ERROR: API is not available at $API_URL"
echo ""
echo "Please start the API server first:"
echo " cd $PROJECT_ROOT"
@@ -36,7 +36,7 @@ if ! curl -s --max-time 3 "$API_URL/health" >/dev/null 2>&1; then
exit 1
fi
echo " API is running at $API_URL"
echo "[OK] API is running at $API_URL"
echo ""
# Step 2: Get credentials
@@ -50,7 +50,7 @@ read -sp "Password: " API_PASSWORD
echo ""
if [ -z "$API_PASSWORD" ]; then
echo " ERROR: Password is required"
echo "[ERROR] ERROR: Password is required"
exit 1
fi
@@ -65,12 +65,12 @@ LOGIN_RESPONSE=$(curl -s -X POST "$API_URL/api/auth/login" \
JWT_TOKEN=$(echo "$LOGIN_RESPONSE" | grep -o '"access_token":"[^"]*' | sed 's/"access_token":"//')
if [ -z "$JWT_TOKEN" ]; then
echo " ERROR: Failed to obtain JWT token"
echo "[ERROR] ERROR: Failed to obtain JWT token"
echo "Response: $LOGIN_RESPONSE"
exit 1
fi
echo " JWT token obtained"
echo "[OK] JWT token obtained"
echo ""
# Step 4: Get or create project
@@ -127,21 +127,21 @@ EOF
PROJECT_ID=$(echo "$CREATE_RESPONSE" | grep -o '"id":"[^"]*' | sed 's/"id":"//')
if [ -z "$PROJECT_ID" ]; then
echo " ERROR: Failed to create project"
echo "[ERROR] ERROR: Failed to create project"
echo "Response: $CREATE_RESPONSE"
exit 1
fi
echo " Project created: $PROJECT_ID"
echo "[OK] Project created: $PROJECT_ID"
else
echo " Project found: $PROJECT_ID"
echo "[OK] Project found: $PROJECT_ID"
fi
# Save to git config
git config --local claude.projectid "$PROJECT_ID"
echo " Project ID saved to git config"
echo "[OK] Project ID saved to git config"
else
echo " Project ID from git config: $PROJECT_ID"
echo "[OK] Project ID from git config: $PROJECT_ID"
fi
echo ""
@@ -152,7 +152,7 @@ echo "[5/7] Updating configuration..."
# Backup existing config if it exists
if [ -f "$CONFIG_FILE" ]; then
cp "$CONFIG_FILE" "$CONFIG_FILE.backup"
echo " Backed up existing config to $CONFIG_FILE.backup"
echo "[OK] Backed up existing config to $CONFIG_FILE.backup"
fi
# Write new config
@@ -182,7 +182,7 @@ DEFAULT_RELEVANCE_SCORE=7.0
DEBUG_CONTEXT_RECALL=false
EOF
echo " Configuration saved to $CONFIG_FILE"
echo "[OK] Configuration saved to $CONFIG_FILE"
echo ""
# Step 6: Make hooks executable
@@ -190,16 +190,16 @@ echo "[6/7] Setting up hooks..."
if [ -f "$HOOKS_DIR/user-prompt-submit" ]; then
chmod +x "$HOOKS_DIR/user-prompt-submit"
echo " Made user-prompt-submit executable"
echo "[OK] Made user-prompt-submit executable"
else
echo " Warning: user-prompt-submit not found"
echo "[WARNING] Warning: user-prompt-submit not found"
fi
if [ -f "$HOOKS_DIR/task-complete" ]; then
chmod +x "$HOOKS_DIR/task-complete"
echo " Made task-complete executable"
echo "[OK] Made task-complete executable"
else
echo " Warning: task-complete not found"
echo "[WARNING] Warning: task-complete not found"
fi
echo ""
@@ -215,9 +215,9 @@ RECALL_RESPONSE=$(curl -s --max-time 3 \
if [ $? -eq 0 ]; then
CONTEXT_COUNT=$(echo "$RECALL_RESPONSE" | grep -o '"id"' | wc -l)
echo " Context recall working (found $CONTEXT_COUNT existing contexts)"
echo "[OK] Context recall working (found $CONTEXT_COUNT existing contexts)"
else
echo " Warning: Context recall test failed (this is OK for new projects)"
echo "[WARNING] Warning: Context recall test failed (this is OK for new projects)"
fi
echo ""
@@ -248,11 +248,11 @@ echo ""
# Add config to .gitignore if not already there
if ! grep -q "context-recall-config.env" "$PROJECT_ROOT/.gitignore" 2>/dev/null; then
echo ""
echo " IMPORTANT: Adding config to .gitignore..."
echo "[WARNING] IMPORTANT: Adding config to .gitignore..."
echo ".claude/context-recall-config.env" >> "$PROJECT_ROOT/.gitignore"
echo " Config file will not be committed (contains JWT token)"
echo "[OK] Config file will not be committed (contains JWT token)"
fi
echo ""
echo "Setup complete! 🎉"
echo "Setup complete!"
echo ""