- job: cap concurrent persona_analyze_account (real headless-Chromium scrape) jobs per owner to 1 in flight via CountActiveByOwnerAndTemplate; rejects with the new ErrTooManyActive (429) instead of letting a member queue up many scrapes and pin the shared 1-vCPU host, or double-schedule the same persona while a previous run is still executing. - harbor-worker@.service: CPUQuota=70% so nginx/gateway keep headroom while a scrape job briefly saturates Chromium. - backup.sh: default BACKUP_DIR now matches the systemd unit (/var/backups/harbor) instead of the stale /var/backups/haixun default. - add harbor-job-health.timer (every 5m): queries Mongo for jobs that failed in the last 15 minutes and writes a node-exporter textfile-collector metric (haixun_job_failures_recent), with new Prometheus alerts (PersonaScrapeJobsFailing / BackgroundJobsFailing / JobHealthMetricStale) so a stuck worker surfaces on its own instead of only via member reports — this would have caught the recent Playwright headless-shell bug directly. - add harbor-offsite-backup.timer + backup/offsite-sync.sh: pushes backup.sh's local backups to an off-host restic repository (client-side encrypted). Installed and enabled by default but a safe no-op until RESTIC_REPOSITORY/RESTIC_PASSWORD are set in harbor.env. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| .grok/skills/spec-driven | ||
| apps | ||
| deploy | ||
| docs/product | ||
| .gitignore | ||
| AGENTS.md | ||
| README.md | ||
README.md
Thread-Master / 巡樓(重構主線)
自 2026-07-09 起:舊程式已整包封存至 old/,從零重寫。
現在讀哪裡
| 路徑 | 說明 |
|---|---|
docs/product/haixun-console/ |
產品需求 → spec → plan → tasks(真相來源) |
old/ |
舊 monorepo 只讀封存,不在上面開新功能 |
.grok/skills/spec-driven/ |
/spec-driven 流程 skill |
目標結構(建立中)
thread-master/
apps/web/ # Harbor Desk 前端(Phase B,mock 優先)
services/api/ # 新後端(Phase A/C;名稱以 plan 為準)
docs/product/ # 產品文件
old/ # 舊碼封存
交付順序
A 地基(登入 / 權限 / Threads / Job / 通知)
→ B 新前端 + Mock(流程與風格先過關)
→ C 接真後端
→ D 業務加深(海巡等)
前端(apps/web)
cd apps/web
npm install
npm run dev # 本機開發,監聽 0.0.0.0:5173(區網可連)
npm run build # 型別檢查 + 生產建置
部署(dev 一鍵清乾淨重裝)
cp deploy/.env.example deploy/.env.dev # 首次:填密鑰
./deploy/scripts/redeploy.sh --yes --kill-orphan
# 可選 nginx:./deploy/scripts/install-nginx.sh
產品任務進度:docs/product/haixun-console/tasks/INDEX.md(目前從 T001 起)。
開發流程
/spec-driven haixun-console
# 或依 tasks 逐題實作,例如「做 T002」
查舊行為請到 old/backend/(只讀)。