Add systemd timer and service for daily log pruning at 03:00 UTC. Includes manual prune API endpoint, setup script, and updated documentation. ## Changes - Add `fabric-prune.service` - systemd oneshot service for log pruning - Add `fabric-prune.timer` - daily timer (03:00 UTC) with persistent=true - Add `POST /api/retention/prune` - manual prune trigger with auth - Add `scripts/setup-fabric-prune.sh` - one-shot timer installer - Update `CLAUDE.md` - document retention policy and usage ## Retention Policy - `archiveAfterDays: 3` - files older than 3d → archive/ - `maxAgeDays: 7` - files older than 7d → delete (safety net) - `archiveRetentionDays: 30` - archives older than 30d → delete ## Integration - Emits `mend.logs_pruned` events to `fabric-mend.jsonl` - FABRIC DirectoryTailer auto-discovers events - `/api/retention` endpoint shows current state and last prune Resolves bd-ch6.2 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
12 lines
292 B
Desktop File
12 lines
292 B
Desktop File
[Unit]
|
|
Description=FABRIC Log Pruner
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
WorkingDirectory=/home/coding/FABRIC
|
|
ExecStart=/usr/bin/node dist/cli.js prune --source ~/.needle/logs
|
|
Environment=NODE_ENV=production
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=fabric-prune
|