Fix CI failures: remove unicode and fix lean build
- Replace all unicode (emojis, checkmarks, arrows, em-dashes) with ASCII in .claude/ docs - Comment out OperatingSystemsList route in core.js - breaks lean builds without computers plugin - Comment out Operating Systems tab in ModelCatalogHub - TODO: Plugins should dynamically register their settings routes Fixes #2 CI check failures on wj branch Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,10 +8,10 @@ Quick reference for starting the complete development environment with all MCP s
|
||||
|
||||
These items are already configured and will persist:
|
||||
|
||||
- ✅ `.mcp.json` - MCP server configurations (gortex, mysql, browser, vm, coordinator)
|
||||
- ✅ `.claude/settings.json` - Auto-enables project MCP servers + SessionEnd hook
|
||||
- ✅ `start-dev.cmd` - Updated with `NODE_TLS_REJECT_UNAUTHORIZED=0` for Vite
|
||||
- ✅ `stop-dev.cmd` - Auto-runs when Claude Code session closes
|
||||
- [X] `.mcp.json` - MCP server configurations (gortex, mysql, browser, vm, coordinator)
|
||||
- [X] `.claude/settings.json` - Auto-enables project MCP servers + SessionEnd hook
|
||||
- [X] `start-dev.cmd` - Updated with `NODE_TLS_REJECT_UNAUTHORIZED=0` for Vite
|
||||
- [X] `stop-dev.cmd` - Auto-runs when Claude Code session closes
|
||||
|
||||
---
|
||||
|
||||
@@ -45,11 +45,11 @@ claude
|
||||
```
|
||||
|
||||
**On first launch after MCP config changes, you'll be prompted to approve:**
|
||||
- ✅ gortex (C:\Users\270015376\Documents\gortex.exe)
|
||||
- ✅ mysql (database access)
|
||||
- ✅ browser (browser automation)
|
||||
- ✅ vm / vm-shopfloor (SSH to test VM)
|
||||
- ✅ coordinator (multi-agent collaboration)
|
||||
- [X] gortex (C:\Users\270015376\Documents\gortex.exe)
|
||||
- [X] mysql (database access)
|
||||
- [X] browser (browser automation)
|
||||
- [X] vm / vm-shopfloor (SSH to test VM)
|
||||
- [X] coordinator (multi-agent collaboration)
|
||||
|
||||
**Auto-loaded MCP servers:**
|
||||
- github, shopdb, amber (from user config)
|
||||
@@ -60,21 +60,21 @@ claude
|
||||
## What's Automated
|
||||
|
||||
### On Dev Environment Start (`./start-dev.cmd`):
|
||||
- ✅ MCP Coordinator daemon auto-starts (if not already running)
|
||||
- ✅ Flask API (Docker)
|
||||
- ✅ MySQL DB (Docker)
|
||||
- ✅ Vite dev server (with TLS fix)
|
||||
- [X] MCP Coordinator daemon auto-starts (if not already running)
|
||||
- [X] Flask API (Docker)
|
||||
- [X] MySQL DB (Docker)
|
||||
- [X] Vite dev server (with TLS fix)
|
||||
|
||||
### On Claude Code Session Start:
|
||||
- ✅ All approved MCP servers auto-connect
|
||||
- ✅ `enableAllProjectMcpServers: true` loads project servers
|
||||
- [X] All approved MCP servers auto-connect
|
||||
- [X] `enableAllProjectMcpServers: true` loads project servers
|
||||
|
||||
### On Session Close:
|
||||
- ✅ `./stop-dev.cmd` runs automatically (SessionEnd hook)
|
||||
- ✅ MCP Coordinator daemon stops
|
||||
- ✅ Docker containers stop
|
||||
- ✅ Vite dev server stops
|
||||
- ✅ No manual cleanup needed
|
||||
- [X] `./stop-dev.cmd` runs automatically (SessionEnd hook)
|
||||
- [X] MCP Coordinator daemon stops
|
||||
- [X] Docker containers stop
|
||||
- [X] Vite dev server stops
|
||||
- [X] No manual cleanup needed
|
||||
|
||||
---
|
||||
|
||||
@@ -117,9 +117,9 @@ docker ps --filter "name=flask-shopdb"
|
||||
```bash
|
||||
# Check all services at once
|
||||
docker ps --filter "name=flask-shopdb" && \
|
||||
curl -s http://localhost:5173 > /dev/null && echo "✅ Vite OK" && \
|
||||
curl -sk https://localhost:5001/api/auth/me 2>&1 | grep -q "Authorization" && echo "✅ Flask OK" && \
|
||||
curl -s http://localhost:3100/health > /dev/null && echo "✅ Coordinator OK"
|
||||
curl -s http://localhost:5173 > /dev/null && echo "[X] Vite OK" && \
|
||||
curl -sk https://localhost:5001/api/auth/me 2>&1 | grep -q "Authorization" && echo "[X] Flask OK" && \
|
||||
curl -s http://localhost:3100/health > /dev/null && echo "[X] Coordinator OK"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
### Priority 1: Data Growth Bomb (6 months to disk exhaustion)
|
||||
|
||||
#### ☐ Configure Audit Log Retention (4 hours)
|
||||
#### [ ] Configure Audit Log Retention (4 hours)
|
||||
**Owner:** Developer + Admin
|
||||
**Effort:** 2 hours config + 2 hours testing
|
||||
|
||||
@@ -32,7 +32,7 @@ docker compose -f docker-compose.prebuilt.yml run --rm api flask audit purge --d
|
||||
- After 30 days: Should stabilize under 1M rows
|
||||
- Backup size reduction: 60-80%
|
||||
|
||||
#### ☐ Configure Endpoint Event Retention (8 hours)
|
||||
#### [ ] Configure Endpoint Event Retention (8 hours)
|
||||
**Owner:** Developer
|
||||
**Effort:** 4 hours dev + 2 hours testing + 2 hours deploy
|
||||
|
||||
@@ -83,7 +83,7 @@ def prune_events(days, batch_size, dry_run):
|
||||
- Monitor table size: `SELECT COUNT(*) FROM endpointevents;`
|
||||
- Should stabilize under 500K rows
|
||||
|
||||
#### ☐ Configure Docker Log Rotation (2 hours)
|
||||
#### [ ] Configure Docker Log Rotation (2 hours)
|
||||
**Owner:** Admin
|
||||
**Effort:** 1 hour config + 1 hour verification
|
||||
|
||||
@@ -126,7 +126,7 @@ Get-ChildItem "C:\ProgramData\Docker\containers\*\*-json.log" |
|
||||
|
||||
### Priority 2: Backup and Recovery (currently MISSING)
|
||||
|
||||
#### ☐ Enable Backup Profile (6 hours)
|
||||
#### [ ] Enable Backup Profile (6 hours)
|
||||
**Owner:** Admin + Developer
|
||||
**Effort:** 3 hours setup + 3 hours restore test
|
||||
|
||||
@@ -178,7 +178,7 @@ docker compose -f docker-compose.prebuilt.yml -f docker-compose.backup.yml run -
|
||||
5. Run migrations to latest: `flask db upgrade`
|
||||
6. Document restore time and any issues
|
||||
|
||||
#### ☐ Add Disk Space Monitoring (4 hours)
|
||||
#### [ ] Add Disk Space Monitoring (4 hours)
|
||||
**Owner:** Admin
|
||||
**Effort:** 2 hours script + 2 hours integration
|
||||
|
||||
@@ -230,7 +230,7 @@ Register-ScheduledTask -TaskName "ShopDB-DiskMonitor" -Action $action -Trigger $
|
||||
|
||||
### Priority 3: Production Stability (bleeding-edge runtime)
|
||||
|
||||
#### ☐ Downgrade Python to 3.11 LTS (8 hours)
|
||||
#### [ ] Downgrade Python to 3.11 LTS (8 hours)
|
||||
**Owner:** Developer
|
||||
**Effort:** 2 hours rebuild + 4 hours pilot + 2 hours bundle
|
||||
|
||||
@@ -281,7 +281,7 @@ docker compose -f docker-compose.prebuilt.yml logs api | grep -i deprecated
|
||||
|
||||
### Daily Checks (5 minutes)
|
||||
|
||||
#### ☐ Endpoint Health Dashboard
|
||||
#### [ ] Endpoint Health Dashboard
|
||||
```sql
|
||||
-- Check endpoint reporting status
|
||||
SELECT
|
||||
@@ -293,7 +293,7 @@ WHERE assettype = 'endpoint';
|
||||
```
|
||||
**Alert if:** pct_healthy < 95%
|
||||
|
||||
#### ☐ Backup Verification
|
||||
#### [ ] Backup Verification
|
||||
```bash
|
||||
# Check last backup timestamp
|
||||
docker compose -f docker-compose.prebuilt.yml -f docker-compose.backup.yml run --rm backup restic snapshots --last
|
||||
@@ -302,13 +302,13 @@ docker compose -f docker-compose.prebuilt.yml -f docker-compose.backup.yml run -
|
||||
```
|
||||
**Alert if:** No snapshot in last 24 hours
|
||||
|
||||
#### ☐ Docker Service Health
|
||||
#### [ ] Docker Service Health
|
||||
```bash
|
||||
docker ps --filter name=shopdb --format "table {{.Names}}\t{{.Status}}\t{{.State}}"
|
||||
```
|
||||
**Alert if:** Any service not "Up" and "healthy"
|
||||
|
||||
#### ☐ Database Disk Space
|
||||
#### [ ] Database Disk Space
|
||||
```powershell
|
||||
# Quick check
|
||||
docker volume inspect shopdb_db_data | ConvertFrom-Json |
|
||||
@@ -318,7 +318,7 @@ docker volume inspect shopdb_db_data | ConvertFrom-Json |
|
||||
```
|
||||
**Alert if:** >40GB (or >85% of allocated disk)
|
||||
|
||||
#### ☐ Critical Application Errors
|
||||
#### [ ] Critical Application Errors
|
||||
```bash
|
||||
# Check for OperationalError, IntegrityError, 500 responses
|
||||
docker compose -f docker-compose.prebuilt.yml logs --since 24h api |
|
||||
@@ -328,7 +328,7 @@ docker compose -f docker-compose.prebuilt.yml logs --since 24h api |
|
||||
|
||||
### Weekly Checks (15 minutes)
|
||||
|
||||
#### ☐ Audit Log Size
|
||||
#### [ ] Audit Log Size
|
||||
```sql
|
||||
SELECT
|
||||
COUNT(*) as total_rows,
|
||||
@@ -339,7 +339,7 @@ FROM auditlogs;
|
||||
```
|
||||
**Alert if:** total_rows > 1M and retention_days > 90
|
||||
|
||||
#### ☐ Failed Login Attempts
|
||||
#### [ ] Failed Login Attempts
|
||||
```sql
|
||||
SELECT
|
||||
username,
|
||||
@@ -353,7 +353,7 @@ LIMIT 20;
|
||||
```
|
||||
**Alert if:** Any account with >10 failed attempts in 24 hours
|
||||
|
||||
#### ☐ Endpoint Events Accumulation
|
||||
#### [ ] Endpoint Events Accumulation
|
||||
```sql
|
||||
SELECT
|
||||
COUNT(*) as total_events,
|
||||
@@ -363,14 +363,14 @@ FROM endpointevents;
|
||||
```
|
||||
**Alert if:** total_events > 500K
|
||||
|
||||
#### ☐ Security Advisories
|
||||
#### [ ] Security Advisories
|
||||
```bash
|
||||
cd /path/to/shopdb
|
||||
python scripts/scan_sbom.py sbom.cdx.json
|
||||
```
|
||||
**Review:** HIGH severity findings in shipped components (exclude dev-only)
|
||||
|
||||
#### ☐ Database Performance
|
||||
#### [ ] Database Performance
|
||||
```sql
|
||||
-- Check for slow queries (if slow query log enabled)
|
||||
SELECT
|
||||
@@ -387,7 +387,7 @@ LIMIT 10;
|
||||
|
||||
### Monthly Checks (1 hour)
|
||||
|
||||
#### ☐ PAT Usage Audit
|
||||
#### [ ] PAT Usage Audit
|
||||
```sql
|
||||
SELECT
|
||||
t.tokenid,
|
||||
@@ -403,13 +403,13 @@ ORDER BY days_since_use DESC;
|
||||
```
|
||||
**Action:** Revoke stale tokens (not used in 90+ days)
|
||||
|
||||
#### ☐ Certificate Expiration Check
|
||||
#### [ ] Certificate Expiration Check
|
||||
```bash
|
||||
openssl x509 -in ./certs/server.crt -noout -enddate
|
||||
```
|
||||
**Alert if:** <60 days until expiry
|
||||
|
||||
#### ☐ Backup Restoration Test
|
||||
#### [ ] Backup Restoration Test
|
||||
```bash
|
||||
# Restore to test environment
|
||||
docker compose -f docker-compose.backup.yml run --rm backup restic restore latest --target /restore-test
|
||||
@@ -424,7 +424,7 @@ docker compose exec api flask db current
|
||||
```
|
||||
**Document:** Restore time, data integrity, any issues
|
||||
|
||||
#### ☐ Plugin Version Audit
|
||||
#### [ ] Plugin Version Audit
|
||||
```bash
|
||||
# Compare plugin registry to disk versions
|
||||
docker compose run --rm api python -c "
|
||||
@@ -435,7 +435,7 @@ for name, plugin in plugin_registry.plugins.items():
|
||||
```
|
||||
**Alert if:** Version mismatch between registry and MANIFEST.json
|
||||
|
||||
#### ☐ Configuration Drift Review
|
||||
#### [ ] Configuration Drift Review
|
||||
```bash
|
||||
# Compare .env files across sites
|
||||
# dev, ops, prod should have consistent:
|
||||
@@ -448,7 +448,7 @@ for name, plugin in plugin_registry.plugins.items():
|
||||
|
||||
### Quarterly Checks (4 hours)
|
||||
|
||||
#### ☐ Full DR Drill
|
||||
#### [ ] Full DR Drill
|
||||
**Scenario:** Complete site loss, restore from backup
|
||||
|
||||
**Steps:**
|
||||
@@ -465,7 +465,7 @@ for name, plugin in plugin_registry.plugins.items():
|
||||
|
||||
**Target:** Full recovery in <2 hours
|
||||
|
||||
#### ☐ Security Log Audit
|
||||
#### [ ] Security Log Audit
|
||||
```sql
|
||||
-- Check for anomalous patterns
|
||||
SELECT
|
||||
@@ -486,7 +486,7 @@ ORDER BY action_count DESC;
|
||||
```
|
||||
**Review:** Off-hours access, bulk deletes, permission changes
|
||||
|
||||
#### ☐ Dependency Vulnerability Scan
|
||||
#### [ ] Dependency Vulnerability Scan
|
||||
```bash
|
||||
# Run OSV.dev scan
|
||||
cd /path/to/shopdb
|
||||
@@ -503,49 +503,49 @@ grep -E "HIGH|CRITICAL" vuln-report.txt | grep -v "dev-only"
|
||||
|
||||
### Critical Alerts (immediate notification)
|
||||
|
||||
#### ☐ Database Disk >85% Full
|
||||
#### [ ] Database Disk >85% Full
|
||||
**Method:** Daily disk monitor script (see Priority 2)
|
||||
**Recipient:** Admin + Developer
|
||||
**Action:** Implement retention policies or expand disk
|
||||
|
||||
#### ☐ Host Disk >85% Full
|
||||
#### [ ] Host Disk >85% Full
|
||||
**Method:** Daily disk monitor script
|
||||
**Recipient:** Admin
|
||||
**Action:** Clean logs, check Docker volumes, expand disk
|
||||
|
||||
#### ☐ Backup Failed or >24h Old
|
||||
#### [ ] Backup Failed or >24h Old
|
||||
**Method:** Check restic last snapshot timestamp
|
||||
**Recipient:** Admin
|
||||
**Action:** Investigate backup service logs, verify disk space
|
||||
|
||||
#### ☐ >10 Endpoints Offline >48 Hours
|
||||
#### [ ] >10 Endpoints Offline >48 Hours
|
||||
**Method:** Query assets table daily
|
||||
**Recipient:** Admin
|
||||
**Action:** Check network connectivity, agent service status
|
||||
|
||||
#### ☐ Application Error Rate >1% of Requests
|
||||
#### [ ] Application Error Rate >1% of Requests
|
||||
**Method:** Parse gunicorn access logs
|
||||
**Recipient:** Developer
|
||||
**Action:** Check Flask logs for exceptions, review recent changes
|
||||
|
||||
#### ☐ Certificate Expiring in <30 Days
|
||||
#### [ ] Certificate Expiring in <30 Days
|
||||
**Method:** Daily openssl check
|
||||
**Recipient:** Admin
|
||||
**Action:** Generate new self-signed cert or renew
|
||||
|
||||
### Warning Alerts (daily summary)
|
||||
|
||||
#### ☐ Audit Log >1M Rows Without Retention
|
||||
#### [ ] Audit Log >1M Rows Without Retention
|
||||
**Method:** Daily SQL query
|
||||
**Recipient:** Admin
|
||||
**Action:** Configure audit log purge job
|
||||
|
||||
#### ☐ Endpoint Events >500K Rows
|
||||
#### [ ] Endpoint Events >500K Rows
|
||||
**Method:** Daily SQL query
|
||||
**Recipient:** Admin
|
||||
**Action:** Configure event retention
|
||||
|
||||
#### ☐ Failed Login Rate >10/min from Single IP
|
||||
#### [ ] Failed Login Rate >10/min from Single IP
|
||||
**Method:** Parse Flask auth logs
|
||||
**Recipient:** Admin
|
||||
**Action:** Review for brute force attempt, consider IP block
|
||||
@@ -598,27 +598,27 @@ grep -E "HIGH|CRITICAL" vuln-report.txt | grep -v "dev-only"
|
||||
|
||||
### Pre-Deployment Checklist
|
||||
|
||||
#### ☐ Create Backup
|
||||
#### [ ] Create Backup
|
||||
```bash
|
||||
# Take manual snapshot before deploy
|
||||
docker compose -f docker-compose.prebuilt.yml -f docker-compose.backup.yml run --rm backup restic backup /app/instance --tag pre-deploy
|
||||
```
|
||||
|
||||
#### ☐ Test Bundle on Pilot Site
|
||||
#### [ ] Test Bundle on Pilot Site
|
||||
- Deploy to ops environment first
|
||||
- Verify all services start (db, migrate, api)
|
||||
- Check migration logs for errors
|
||||
- Spot-check core features
|
||||
- Monitor for 24 hours
|
||||
|
||||
#### ☐ Review Migration Chain
|
||||
#### [ ] Review Migration Chain
|
||||
```bash
|
||||
# Check what migrations will run
|
||||
docker compose run --rm api flask db heads
|
||||
docker compose run --rm api flask db current
|
||||
```
|
||||
|
||||
#### ☐ Verify Disk Space
|
||||
#### [ ] Verify Disk Space
|
||||
```bash
|
||||
# Ensure enough space for migration and new code
|
||||
df -h /var/lib/docker
|
||||
@@ -716,13 +716,13 @@ docker compose -f docker-compose.prebuilt.yml restart api
|
||||
|
||||
### Post-Deployment Verification
|
||||
|
||||
#### ☐ All Services Healthy
|
||||
#### [ ] All Services Healthy
|
||||
```bash
|
||||
docker ps --filter name=shopdb
|
||||
# Should show: db (healthy), api (healthy), migrate (exited 0)
|
||||
```
|
||||
|
||||
#### ☐ Endpoints Checking In
|
||||
#### [ ] Endpoints Checking In
|
||||
```sql
|
||||
SELECT COUNT(*) FROM assets
|
||||
WHERE assettype='endpoint'
|
||||
@@ -730,19 +730,19 @@ WHERE assettype='endpoint'
|
||||
```
|
||||
**Expect:** >95% of endpoints
|
||||
|
||||
#### ☐ No Critical Errors in Logs
|
||||
#### [ ] No Critical Errors in Logs
|
||||
```bash
|
||||
docker compose logs --since 1h api | grep -i critical
|
||||
```
|
||||
**Expect:** Empty or expected warnings only
|
||||
|
||||
#### ☐ UI Loads and Functions
|
||||
#### [ ] UI Loads and Functions
|
||||
- Login works
|
||||
- Asset search returns results
|
||||
- Can navigate to endpoint details
|
||||
- Scripts tab loads
|
||||
|
||||
#### ☐ Document Deployment
|
||||
#### [ ] Document Deployment
|
||||
```markdown
|
||||
## Deployment Log: 2026-09-11
|
||||
|
||||
|
||||
Reference in New Issue
Block a user