feat(ops): דף /operations — כל מה שרץ ברקע #149

Merged
chaim merged 1 commits from worktree-ops-dashboard into main 2026-06-08 07:29:19 +00:00
Owner

למה

נוספו הרבה תהליכי-רקע (שירות-אחזור + 3 cron-drains + reaper + תורי court-fetch/מטא/הלכות/אישור/פסיקה-חסרה/יומונים). דף חי אחד שמראה כל מה שמוריד ומנתח אוטומטית, במקום לנחש.

מה נבנה (3 שכבות)

  • court_fetch_service: GET /pm2 (ללא-auth, host-only) → pm2 jlist מסונן לשירותי legal-* (status/restarts/mem/cron).
  • FastAPI GET /api/operations — מאחד את התורים מה-DB (court_fetch jobs, חילוץ מטא+הלכות, שער-אישור-הלכות, פסיקה-חסרה, יומונים, קליטות-אחרונות) + proxy ל-/pm2 של המארח דרך גשר-הדוקר (graceful אם המארח למטה).
  • web-ui /operations (+ hook lib/api/operations.ts, פריט-ניווט תחת admin): רשת-שירותים (תוויות עברית + לוחות-זמנים) + כרטיסי-pipeline + רשימות אחזור/קליטה אחרונים. מתרענן כל 5 שניות.

בטיחות

pm2 status לא נושא מידע רגיש וה-bind (10.0.1.1) הוא host/container-only → /pm2 ללא secret.

אימות

  • tsc --noEmit נקי (0 שגיאות); קבצי החדשים לא ב-lint-errors (ה-3 הקיימים הם ב-training panels של main).
  • next build בעץ-העבודה נכשל רק בגלל symlink של node_modules (Turbopack) — לא קוד; build של Coolify (node_modules נקי) יעבור.

deploy

  • container: push→Coolify (FastAPI + web-ui).
  • host: pm2 restart legal-court-fetch-service (ל-/pm2).

🤖 Generated with Claude Code

## למה נוספו הרבה תהליכי-רקע (שירות-אחזור + 3 cron-drains + reaper + תורי court-fetch/מטא/הלכות/אישור/פסיקה-חסרה/יומונים). דף חי אחד שמראה **כל מה שמוריד ומנתח אוטומטית**, במקום לנחש. ## מה נבנה (3 שכבות) - **`court_fetch_service`: `GET /pm2`** (ללא-auth, host-only) → `pm2 jlist` מסונן לשירותי `legal-*` (status/restarts/mem/cron). - **FastAPI `GET /api/operations`** — מאחד את התורים מה-DB (court_fetch jobs, חילוץ מטא+הלכות, שער-אישור-הלכות, פסיקה-חסרה, יומונים, קליטות-אחרונות) + proxy ל-`/pm2` של המארח דרך גשר-הדוקר (graceful אם המארח למטה). - **web-ui `/operations`** (+ hook `lib/api/operations.ts`, פריט-ניווט תחת admin): רשת-שירותים (תוויות עברית + לוחות-זמנים) + כרטיסי-pipeline + רשימות אחזור/קליטה אחרונים. **מתרענן כל 5 שניות.** ## בטיחות `pm2 status` לא נושא מידע רגיש וה-bind (`10.0.1.1`) הוא host/container-only → `/pm2` ללא secret. ## אימות - ✅ `tsc --noEmit` נקי (0 שגיאות); קבצי החדשים לא ב-lint-errors (ה-3 הקיימים הם ב-training panels של main). - ⚠ `next build` בעץ-העבודה נכשל רק בגלל symlink של node_modules (Turbopack) — לא קוד; build של Coolify (node_modules נקי) יעבור. ## deploy - container: push→Coolify (FastAPI + web-ui). - host: `pm2 restart legal-court-fetch-service` (ל-`/pm2`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chaim added 1 commit 2026-06-08 07:29:06 +00:00
A single live page for all the background work that downloads/analyses, so the
chair can see what's running instead of guessing.

- court_fetch_service: GET /pm2 (unauthenticated, host-only) → trimmed pm2 jlist
  for the legal-* services (status, restarts, mem, cron schedule).
- FastAPI GET /api/operations: aggregates the DB-backed pipelines (court_fetch
  jobs, metadata + halacha extraction queues, halacha review gate,
  missing_precedents, digests, recent court ingests) and proxies the host /pm2
  over the docker bridge (graceful if the host service is down).
- web-ui /operations page (+ src/lib/api/operations.ts hook, nav entry under
  admin): services grid (with Hebrew labels + schedules) + pipeline cards +
  recent-fetch / recent-ingest lists. Auto-refreshes every 5s.

tsc --noEmit clean; pm2 status carries nothing sensitive and the bind
(10.0.1.1) is host/container-only, so /pm2 needs no secret.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chaim merged commit 6ec67d1a11 into main 2026-06-08 07:29:19 +00:00
chaim deleted branch worktree-ops-dashboard 2026-06-08 07:29:19 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ezer-mishpati/legal-ai#149