fix(ia): IA גל-1 — סנכרון-cache + נתונים-שגויים + מחיקת-מתים (#130, X17)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 13s
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 13s
גל-1 מבקלוג #127 (docs/ia-audit-redesign.md §4) — תיקון מקומי, ללא הגירת-IA. מקיים G2 בשכבת-ה-UI דרך INV-IA1/IA2/IA5/IA6 (docs/spec/X17). א) פערי-סנכרון (INV-IA2 — mutation מבטל כל קורא): - CAS-1/2: העלאת-DOCX/export מבטלים ['decision-blocks'] (מחוון source_of_truth) - APR-1/4: פתרון/יצירת-הערה מבטלים ['chair','pending'] (תיבה+תג-סרגל) - APR-5/ADM-2: אישור/batch הלכות מבטלים ['chair','pending']+['operations'] - APR-6/ADM-3: create/update/delete/upload פסיקה-חסרה מבטלים שניהם - LRN-6: ComparePanel גוזר בחירה מהקורפוס המרוענן (אין POST ל-id מחוק → 404) - LRN-8: מחיקת-קורפוס מבטלת רשימת-צ'אטים (chat שהתייתם לא נשאר עם קישור-קורפוס תקוע) - LRN-10/MET-1/MET-8: promote מבטל גם lessons וגם methodology (LessonsTab+/methodology) ב) נתונים-שגויים (INV-IA5 — סטטוס מגובה-צרכן): - LRN-4: KPI "דפוסי סגנון" — הוסר היחס-השקרי "מתוך total_patterns" (שאילתות עצמאיות) - LRN-5: findings_applied (דגל אינפורמטיבי-בלבד) → findings_approved (שער INV-LRN1 האמיתי) - ADM-1: halacha_backlog שהוחזר ונזרק → מרונדר ב-/diagnostics, מצביע ל-/approvals (INV-IA1) - ADM-6: מוני-סוכנים מסמנים "חלקי+" כשחברת-Paperclip לא נטענה - APR-3: מכוסה ע"י APR-1 (count+sample מאותה שאילתה; הבעיה היתה staleness-cache) - MET-6: עורך-צ'קליסטים מציג איזה case בוחר כל צ'קליסט (explainer-תחולה) - ADM-5: ערך-Container מסומן "ממתין ל-redeploy" כש-Coolify≠Container ג) מתים/jargon: - PRE-2: הוסר GET /api/precedent-library/queue/pending (אפס צרכני-frontend) - PRE-3/5: AuthorityBadge (binding/persuasive) מרונדר גם בחיפוש, לא רק בתור-הביקורת - MET-5: הוסר ז'רגון T7/T15 מטקסט-העזר ב-/methodology (INV-IA6) Invariants: מקיים INV-IA1/IA2/IA5/IA6 (X17), G2 (מקור-אמת יחיד בשכבת-UI), G10 (לא הוסר שום שער-אנושי — רק סנכרון/נתון/קוד-מת). שומר INV-LRN1. בדיקות: py_compile web/app.py ✓ · tsc --noEmit ✓ · eslint ✓ (לבד מ-learning-panel:109 unescaped-quote — קיים-מראש ב-main, מחוץ לסט-הממצאים). next build נכשל רק בגלל symlink node_modules ב-worktree (Turbopack) — ה-build ב-Docker/CI תקין. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -129,6 +129,57 @@ export default function DiagnosticsPage() {
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
{/* Halacha review backlog (ADM-1, INV-IA5): render the human-gate
|
||||
counter the backend returns; the action lives at /approvals
|
||||
(INV-IA1 — this surface only points, never decides). */}
|
||||
<Card className="bg-surface border-rule shadow-sm">
|
||||
<CardContent className="px-6 py-5">
|
||||
<h2 className="text-navy text-lg mb-3 flex items-center gap-2">
|
||||
<Clock className="w-4 h-4" />
|
||||
תור אישור הלכות
|
||||
<Badge variant="outline" className="text-[0.7rem] tabular-nums">
|
||||
{isPending ? "—" : (data?.halacha_backlog?.pending_review ?? 0)}
|
||||
</Badge>
|
||||
<Link
|
||||
href="/approvals"
|
||||
className="ms-auto text-[0.75rem] text-gold-deep hover:underline"
|
||||
>
|
||||
לאישור ←
|
||||
</Link>
|
||||
</h2>
|
||||
{isPending ? (
|
||||
<Skeleton className="h-12 w-full" />
|
||||
) : (
|
||||
<dl className="grid grid-cols-2 md:grid-cols-4 gap-y-2 gap-x-4">
|
||||
<div className="space-y-0.5">
|
||||
<dt className="text-[0.72rem] text-ink-muted">ממתינים (נקי)</dt>
|
||||
<dd className="font-display font-bold text-navy text-xl tabular-nums">
|
||||
{data?.halacha_backlog?.pending_clean ?? 0}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<dt className="text-[0.72rem] text-ink-muted">דורש תיקון</dt>
|
||||
<dd className="font-display font-bold text-warn text-xl tabular-nums">
|
||||
{data?.halacha_backlog?.pending_flagged ?? 0}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<dt className="text-[0.72rem] text-ink-muted">אושרו</dt>
|
||||
<dd className="font-display font-bold text-success text-xl tabular-nums">
|
||||
{data?.halacha_backlog?.approved ?? 0}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<dt className="text-[0.72rem] text-ink-muted">הוותיק ביותר</dt>
|
||||
<dd className="text-sm text-ink-soft">
|
||||
{formatRelativeTime(data?.halacha_backlog?.oldest_pending_at ?? null)}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* Active tasks */}
|
||||
<Card className="bg-surface border-rule shadow-sm">
|
||||
<CardContent className="px-6 py-5">
|
||||
|
||||
@@ -45,14 +45,14 @@ export default function MethodologyPage() {
|
||||
<TabsContent value="transitions" className="mt-5">
|
||||
<GenericMethodologyPanel
|
||||
category="transition_phrases"
|
||||
hint="ביטויי-מעבר של דפנה, מקובצים לפי תוצאה. עריכה כאן זורמת לכותב (T15). ערך = רשימת מחרוזות JSON."
|
||||
hint="ביטויי-מעבר של דפנה, מקובצים לפי תוצאה. עריכה כאן זורמת לכותב. ערך = רשימת מחרוזות JSON."
|
||||
/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="antipatterns" className="mt-5">
|
||||
<GenericMethodologyPanel
|
||||
category="anti_patterns"
|
||||
hint="דפוסים שדפנה נמנעת מהם — נמדדים ע״י מדד מרחק-הסגנון (T7) ומוזרקים לכותב. ערך = {regex, note}."
|
||||
hint="דפוסים שדפנה נמנעת מהם — נמדדים ע״י מדד מרחק-הסגנון ומוזרקים לכותב. ערך = {regex, note}."
|
||||
/>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
|
||||
@@ -443,8 +443,23 @@ function LiveAgentsPanel() {
|
||||
<h2 className="text-navy text-lg mb-0">סוכנים פעילים</h2>
|
||||
{data ? (
|
||||
<div className="flex items-center gap-2 text-[0.72rem]">
|
||||
<Badge variant="default" className="font-normal">רצים {data.running}</Badge>
|
||||
<Badge variant="secondary" className="font-normal">בתור {data.queued}</Badge>
|
||||
{/* ADM-6 (INV-IA5): counts sum only the companies that loaded.
|
||||
When a company errored, mark the totals as a floor ("+") so
|
||||
the operator isn't shown a shrunken depth as if complete. */}
|
||||
<Badge variant="default" className="font-normal">
|
||||
רצים {data.running}{data.errors.length > 0 ? "+" : ""}
|
||||
</Badge>
|
||||
<Badge variant="secondary" className="font-normal">
|
||||
בתור {data.queued}{data.errors.length > 0 ? "+" : ""}
|
||||
</Badge>
|
||||
{data.errors.length > 0 ? (
|
||||
<span
|
||||
className="text-warn"
|
||||
title={`ספירה חלקית — חברות שלא נטענו: ${data.errors.join(" · ")}`}
|
||||
>
|
||||
⚠ חלקי
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -87,11 +87,23 @@ export function EnvVarRow({
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
<span className="text-[0.72rem] text-ink-muted w-20">Container:</span>
|
||||
<span className="font-mono text-ink" dir="ltr">
|
||||
{spec.container_value ?? <em className="text-ink-muted">— לא מוגדר —</em>}
|
||||
</span>
|
||||
{/* ADM-5 (INV-IA5/INV-IA6): when Coolify ≠ Container the container is
|
||||
running a stale value until a redeploy — say so in plain Hebrew
|
||||
right here, not only via the top "Drift" badge. */}
|
||||
{coolifyAvailable && spec.drift && (
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="text-[0.7rem] text-warn border-warn/40"
|
||||
title="הערך נשמר ב-Coolify אך הקונטיינר עדיין מריץ את הקודם — נדרש redeploy"
|
||||
>
|
||||
ממתין ל-redeploy
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user