Files
shopdb-flask/agent/QUICK-FIX-VM.md
Proudlock d40f1a6a92 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>
2026-09-07 03:48:11 -04:00

52 lines
1.3 KiB
Markdown

# Quick Fix: Agent Can't Connect from VM
## Problem
SSL certificate errors when connecting from VM to host.
## Solution: Use HTTP on Local Network
Since the VM and host are on a trusted local network (Hyper-V), use HTTP instead of HTTPS.
### On VM - Set HTTP in Registry:
```powershell
# On VM (as Administrator):
New-Item -Path 'HKLM:\SOFTWARE\GE\ShopDB' -Force
Set-ItemProperty -Path 'HKLM:\SOFTWARE\GE\ShopDB' -Name 'BaseUrl' -Value 'http://172.31.96.1:5001'
Set-ItemProperty -Path 'HKLM:\SOFTWARE\GE\ShopDB' -Name 'CollectorKey' -Value 'shopdb_pat_b4a3fe2a01abc6bc1cb685280e65a8c35d52ec43'
```
### Test it works:
```powershell
# On VM:
curl.exe http://172.31.96.1:5001
# Should return HTML
```
### Then run the agent:
```powershell
cd C:\ProgramData\ShopDB\EndpointAgent
.\shopdb-endpoint-agent.exe --once
```
## Why HTTP is OK Here
- [X] VM and host on same physical machine (Hyper-V)
- [X] Traffic never leaves the host
- [X] Hyper-V internal network is isolated
- [X] No external network exposure
For production multi-machine deployment, use HTTPS with proper certificates.
## Alternative: Fix HTTPS (More Complex)
If you need HTTPS:
1. Export the self-signed cert from host
2. Import to VM's Trusted Root Certification Authorities
3. Use HTTPS URL
See main INSTALL-ON-VM.md for details.