fix: replace unicode characters and fix finalize-restore endpoint

Style check fixes:
- Replace unicode box-drawing characters with ASCII (|-- instead of ├──)
- Replace emoji status markers with [OK]/[FAIL]/[WARN] tags
- Replace arrows (→ with ->, ↔ with <->) and em-dashes (— with --)
- Add venv-quick to excluded directories in check script
- Exclude darkwing report files (findings.sarif, report.md)

Backup finalization fix:
- Fix finalize-restore endpoint to not claim the upgrade sentinel
- Endpoint now checks for pending upgrade and returns {queued: true}
- Leaves UPGRADE_SENTINEL for background watcher to claim and process
- Prevents inline Alembic runs that can outlast request timeout

Claude Code context:
- Add .claude/ directory with INDEX.md and QUICK-REFERENCE.md
- Add CLAUDE.md with project overview and conventions
- Helps Claude Code understand project structure and rules

Fixes failing test: test_the_endpoint_does_not_run_the_upgrade_itself
Fixes naming/style CI check violations

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Proudlock
2026-09-07 03:48:11 -04:00
parent 397c02611a
commit d40f1a6a92
13 changed files with 536 additions and 105 deletions

View File

@@ -5,7 +5,7 @@
## Executive Summary
🔴 **NOT PRODUCTION READY** in current state without significant operational investment.
[CRITICAL] **NOT PRODUCTION READY** in current state without significant operational investment.
The Docker deployment requires extensive manual setup, multiple services, and assumes expertise with Docker Compose, restic backup systems, and Flask plugin architecture. This assessment documents current gaps and provides recommendations.
@@ -13,22 +13,22 @@ The Docker deployment requires extensive manual setup, multiple services, and as
### What Works
✅ **Flask application code** - Stable, tested, 17 plugins functional
✅ **Database schema** - Migrations work, data model is sound
✅ **Frontend build** - Vue 3 SPA compiles and serves correctly
✅ **Docker images** - Build successfully (with caveats below)
✅ **Plugin architecture** - Clean, documented, extensible
[OK] **Flask application code** - Stable, tested, 17 plugins functional
[OK] **Database schema** - Migrations work, data model is sound
[OK] **Frontend build** - Vue 3 SPA compiles and serves correctly
[OK] **Docker images** - Build successfully (with caveats below)
[OK] **Plugin architecture** - Clean, documented, extensible
### Critical Gaps
❌ **One-command deployment** - Requires 7-10 manual steps
❌ **Corporate proxy handling** - Zscaler cert extraction needed for npm
❌ **Backup system complexity** - 3 containers + restic + scheduler
❌ **TLS certificate generation** - Manual OpenSSL commands required
❌ **Plugin initialization** - Must run `apply-profile` after first start
❌ **Password reset** - No default admin password, requires manual SQL
❌ **Build time** - 15+ minutes with corporate proxy
❌ **Documentation scattered** - 3 different setup guides (Docker, Local, Backup)
[FAIL] **One-command deployment** - Requires 7-10 manual steps
[FAIL] **Corporate proxy handling** - Zscaler cert extraction needed for npm
[FAIL] **Backup system complexity** - 3 containers + restic + scheduler
[FAIL] **TLS certificate generation** - Manual OpenSSL commands required
[FAIL] **Plugin initialization** - Must run `apply-profile` after first start
[FAIL] **Password reset** - No default admin password, requires manual SQL
[FAIL] **Build time** - 15+ minutes with corporate proxy
[FAIL] **Documentation scattered** - 3 different setup guides (Docker, Local, Backup)
## Why Is This So Complex?
@@ -86,7 +86,7 @@ The Docker deployment requires extensive manual setup, multiple services, and as
- Manual updates
- No containerization benefits
**Production Ready:** ⚠️ **YES** (with installer improvements)
**Production Ready:** [WARN] **YES** (with installer improvements)
### Option 2: Docker Pre-Built Images (RECOMMENDED)
@@ -110,7 +110,7 @@ The Docker deployment requires extensive manual setup, multiple services, and as
- Need image registry
- Initial registry setup
**Production Ready:** ✅ **YES** (requires CI/CD setup)
**Production Ready:** [OK] **YES** (requires CI/CD setup)
### Option 3: Docker Source Build (CURRENT)
@@ -141,7 +141,7 @@ The Docker deployment requires extensive manual setup, multiple services, and as
- Many failure points
- Requires Docker expertise
**Production Ready:** 🔴 **NO** (too complex for operations)
**Production Ready:** [CRITICAL] **NO** (too complex for operations)
### Option 4: Kubernetes (FUTURE)
@@ -265,10 +265,10 @@ https://your-server:5001
**Problem:** Which one do I follow?
**Solution:** Create decision tree:
- Developer on Windows → LOCAL-DEV-SETUP.md
- Ops deploying to prod → (DOESN'T EXIST YET - need simplified guide)
- Custom development → DOCKER-SETUP.md
- Backup questions → scripts/backup/README.md
- Developer on Windows -> LOCAL-DEV-SETUP.md
- Ops deploying to prod -> (DOESN'T EXIST YET - need simplified guide)
- Custom development -> DOCKER-SETUP.md
- Backup questions -> scripts/backup/README.md
### Missing Guides
@@ -279,12 +279,12 @@ https://your-server:5001
## What We Did Today (Honest Assessment)
✅ **Merged wilm→wj** - 98 commits, wilm features now in wj
✅ **Fixed local dev** - `run_dev.py` works for Windows development
✅ **Documented Docker** - Comprehensive but too complex
✅ **Added backup docs** - System works but needs expertise
⚠️ **Docker "production ready"** - Technically works, operationally complex
❌ **Simple deployment** - Still requires too many manual steps
[OK] **Merged wilm->wj** - 98 commits, wilm features now in wj
[OK] **Fixed local dev** - `run_dev.py` works for Windows development
[OK] **Documented Docker** - Comprehensive but too complex
[OK] **Added backup docs** - System works but needs expertise
[WARN] **Docker "production ready"** - Technically works, operationally complex
[FAIL] **Simple deployment** - Still requires too many manual steps
## Next Steps (Priority Order)
@@ -301,7 +301,7 @@ https://your-server:5001
- Document any issues
3. **Create deployment decision tree**
- Flowchart: what's my situation → which method to use
- Flowchart: what's my situation -> which method to use
- Don't make users read 4 docs to figure out where to start
### Short Term (Next Sprint)