[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

@@ -183,14 +183,14 @@ def save_periodic_context(config, project_id):
response = requests.post(url, json=payload, headers=headers, timeout=10)
if response.status_code in [200, 201]:
log(f" Context saved successfully (ID: {response.json().get('id', 'unknown')})")
log(f"[OK] Context saved successfully (ID: {response.json().get('id', 'unknown')})")
return True
else:
log(f" Failed to save context: HTTP {response.status_code}")
log(f"[ERROR] Failed to save context: HTTP {response.status_code}")
return False
except Exception as e:
log(f" Error saving context: {e}")
log(f"[ERROR] Error saving context: {e}")
return False

View File

@@ -184,14 +184,14 @@ def save_periodic_context(config, project_id):
if response.status_code in [200, 201]:
context_id = response.json().get('id', 'unknown')
log(f" Context saved (ID: {context_id}, Active time: {SAVE_INTERVAL_SECONDS}s)")
log(f"[OK] Context saved (ID: {context_id}, Active time: {SAVE_INTERVAL_SECONDS}s)")
return True
else:
log(f" Failed to save: HTTP {response.status_code}")
log(f"[ERROR] Failed to save: HTTP {response.status_code}")
return False
except Exception as e:
log(f" Error saving context: {e}")
log(f"[ERROR] Error saving context: {e}")
return False

View File

@@ -78,12 +78,12 @@ for QUEUE_FILE in "$PENDING_DIR"/*.json; do
if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "201" ]; then
# Success - move to uploaded directory
mv "$QUEUE_FILE" "$UPLOADED_DIR/"
echo " Uploaded successfully"
echo " [OK] Uploaded successfully"
((SUCCESS_COUNT++))
else
# Failed - move to failed directory for manual review
mv "$QUEUE_FILE" "$FAILED_DIR/"
echo " Upload failed (HTTP $HTTP_CODE) - moved to failed/"
echo " [ERROR] Upload failed (HTTP $HTTP_CODE) - moved to failed/"
((FAIL_COUNT++))
fi
done

View File

@@ -164,14 +164,14 @@ if [ "$API_SUCCESS" = "false" ]; then
STATE_QUEUE_FILE="$PENDING_DIR/${PROJECT_ID}_${TIMESTAMP_FILENAME}_state.json"
echo "$PROJECT_STATE_PAYLOAD" > "$STATE_QUEUE_FILE"
echo " Context queued locally (API unavailable) - will sync when online" >&2
echo "[WARNING] Context queued locally (API unavailable) - will sync when online" >&2
# Try to sync in background (opportunistic)
if [ -n "$JWT_TOKEN" ]; then
bash "$(dirname "${BASH_SOURCE[0]}")/sync-contexts" >/dev/null 2>&1 &
fi
else
echo " Context saved to database" >&2
echo "[OK] Context saved to database" >&2
# Trigger background sync of any queued items
if [ -n "$JWT_TOKEN" ]; then

View File

@@ -164,14 +164,14 @@ if [ "$API_SUCCESS" = "false" ]; then
STATE_QUEUE_FILE="$PENDING_DIR/${PROJECT_ID}_${TIMESTAMP_FILENAME}_state.json"
echo "$PROJECT_STATE_PAYLOAD" > "$STATE_QUEUE_FILE"
echo " Context queued locally (API unavailable) - will sync when online" >&2
echo "[WARNING] Context queued locally (API unavailable) - will sync when online" >&2
# Try to sync in background (opportunistic)
if [ -n "$JWT_TOKEN" ]; then
bash "$(dirname "${BASH_SOURCE[0]}")/sync-contexts" >/dev/null 2>&1 &
fi
else
echo " Context saved to database" >&2
echo "[OK] Context saved to database" >&2
# Trigger background sync of any queued items
if [ -n "$JWT_TOKEN" ]; then

View File

@@ -117,10 +117,10 @@ if [ "$CONTEXT_COUNT" -gt 0 ]; then
echo "<!-- Context Recall: Retrieved $CONTEXT_COUNT relevant context(s) from LOCAL CACHE (offline mode) -->"
fi
echo ""
echo "## 📚 Previous Context"
echo "## Previous Context"
echo ""
if [ "$API_AVAILABLE" = "false" ]; then
echo "⚠️ **Offline Mode** - Using cached context (API unavailable)"
echo "[WARNING] **Offline Mode** - Using cached context (API unavailable)"
echo ""
fi
echo "The following context has been automatically recalled:"

View File

@@ -117,10 +117,10 @@ if [ "$CONTEXT_COUNT" -gt 0 ]; then
echo "<!-- Context Recall: Retrieved $CONTEXT_COUNT relevant context(s) from LOCAL CACHE (offline mode) -->"
fi
echo ""
echo "## 📚 Previous Context"
echo "## Previous Context"
echo ""
if [ "$API_AVAILABLE" = "false" ]; then
echo "⚠️ **Offline Mode** - Using cached context (API unavailable)"
echo "[WARNING] **Offline Mode** - Using cached context (API unavailable)"
echo ""
fi
echo "The following context has been automatically recalled:"