fix: bug: supervisor hardcodes ops repo expectation — fails silently on deployments without one (#544)
Add OPS repo presence detection in supervisor-run.sh with degraded mode support: - Detect if OPS_REPO_ROOT is missing and log WARNING message - Set OPS_REPO_DEGRADED=1 flag and configure fallback paths - Bundle minimal knowledge files as fallback for degraded mode - Update formula to use OPS_KNOWLEDGE_ROOT, OPS_JOURNAL_ROOT, OPS_VAULT_ROOT - Support local vault destination and journal fallback when ops repo absent Knowledge files bundled: disk.md, memory.md, ci.md, git.md, dev-agent.md, review-agent.md, forge.md The supervisor now runs with full functionality when ops repo is available, or gracefully degrades to local paths when absent, making the failure mode explicit rather than silent.
This commit is contained in:
parent
be5957f127
commit
f299bae77b
11 changed files with 278 additions and 16 deletions
35
knowledge/disk.md
Normal file
35
knowledge/disk.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Disk Management — Best Practices
|
||||
|
||||
## Disk Pressure Response (P1)
|
||||
|
||||
When disk usage exceeds 80%, take these actions in order:
|
||||
|
||||
### Immediate Actions
|
||||
1. **Docker cleanup** (safe, low impact):
|
||||
```bash
|
||||
sudo docker system prune -f
|
||||
```
|
||||
|
||||
2. **Aggressive Docker cleanup** (if still >80%):
|
||||
```bash
|
||||
sudo docker system prune -a -f
|
||||
```
|
||||
This removes unused images in addition to containers/volumes.
|
||||
|
||||
3. **Log rotation**:
|
||||
```bash
|
||||
for f in "$FACTORY_ROOT"/{dev,review,supervisor,gardener,planner,predictor}/*.log; do
|
||||
[ -f "$f" ] && [ "$(du -k "$f" | cut -f1)" -gt 10240 ] && truncate -s 0 "$f"
|
||||
done
|
||||
```
|
||||
|
||||
### Prevention
|
||||
- Monitor disk with alerts at 70% (warning) and 80% (critical)
|
||||
- Set up automatic log rotation for agent logs
|
||||
- Clean up old Docker images regularly
|
||||
- Consider using separate partitions for `/var/lib/docker`
|
||||
|
||||
### When to Escalate
|
||||
- Disk stays >80% after cleanup (indicates legitimate growth)
|
||||
- No unused Docker images to clean
|
||||
- Critical data filling disk (check /home, /var/log)
|
||||
Loading…
Add table
Add a link
Reference in a new issue