Spaces:
Running
Running
Deploy 2b148d8b
Browse files- frontend/src/main.jsx +1 -1
- nodes/executor.py +5 -1
frontend/src/main.jsx
CHANGED
|
@@ -23,7 +23,7 @@ function Findings({ findings = [] }) {
|
|
| 23 |
|
| 24 |
function Receipt({ result }) {
|
| 25 |
if (!result) return null;
|
| 26 |
-
return <section className="result-card receipt" aria-labelledby="receipt-title"><span className="panel-kicker">Delivery receipt</span><h3 id="receipt-title">{pretty(result.status || "completed")}</h3><div className="metrics"><span>Inline: {result.inline_posted || 0}</span><span>Fallback: {result.fallback_posted || 0}</span><span>
|
| 27 |
}
|
| 28 |
|
| 29 |
function Ragas({ ragas }) { if (!ragas) return null; const text = ragas.status === "pending" ? "Computing scores in the background…" : ragas.status === "failed" ? `Scoring failed: ${ragas.error || "provider error"}` : ragas.status === "skipped" ? `Skipped: ${ragas.reason || "retrieval context was unavailable"}` : ragas.status === "unavailable" ? `Unavailable: ${ragas.error || "the scoring task was lost"}` : ragas.status === "completed_no_scores" ? (ragas.error || "Completed without metric values") : Object.entries(ragas.scores || {}).map(([key, value]) => `${key}: ${typeof value === "number" ? value.toFixed(3) : value}`).join(" · ") || "Completed without scores"; return <section className="result-card receipt" aria-label="RAGAS retrieval quality"><span className="panel-kicker">Retrieval quality (RAGAS)</span><p>{text}</p></section>; }
|
|
|
|
| 23 |
|
| 24 |
function Receipt({ result }) {
|
| 25 |
if (!result) return null;
|
| 26 |
+
return <section className="result-card receipt" aria-labelledby="receipt-title"><span className="panel-kicker">Delivery receipt</span><h3 id="receipt-title">{pretty(result.status || "completed")}</h3><div className="metrics"><span>Inline: {result.inline_posted || 0}</span><span>Fallback: {result.fallback_posted || 0}</span><span>Finding failures: {result.finding_failed || 0}</span><span>Verdict: {result.verdict_posted ? "posted" : "failed"}</span></div></section>;
|
| 27 |
}
|
| 28 |
|
| 29 |
function Ragas({ ragas }) { if (!ragas) return null; const text = ragas.status === "pending" ? "Computing scores in the background…" : ragas.status === "failed" ? `Scoring failed: ${ragas.error || "provider error"}` : ragas.status === "skipped" ? `Skipped: ${ragas.reason || "retrieval context was unavailable"}` : ragas.status === "unavailable" ? `Unavailable: ${ragas.error || "the scoring task was lost"}` : ragas.status === "completed_no_scores" ? (ragas.error || "Completed without metric values") : Object.entries(ragas.scores || {}).map(([key, value]) => `${key}: ${typeof value === "number" ? value.toFixed(3) : value}`).join(" · ") || "Completed without scores"; return <section className="result-card receipt" aria-label="RAGAS retrieval quality"><span className="panel-kicker">Retrieval quality (RAGAS)</span><p>{text}</p></section>; }
|
nodes/executor.py
CHANGED
|
@@ -294,7 +294,9 @@ def executor_node(state: OpenCodeReviewState) -> dict:
|
|
| 294 |
"posted" if state.verdict else "skipped",
|
| 295 |
owner, repo_name, pr_number,
|
| 296 |
)
|
| 297 |
-
|
|
|
|
|
|
|
| 298 |
# A review is fully posted only when every finding and the verdict were
|
| 299 |
# accepted by GitHub. Keep the per-part counts so the API/UI can explain a
|
| 300 |
# partial result instead of reporting a misleading success.
|
|
@@ -314,5 +316,7 @@ def executor_node(state: OpenCodeReviewState) -> dict:
|
|
| 314 |
"inline_posted": inline_ok,
|
| 315 |
"fallback_posted": fallback_ok,
|
| 316 |
"failed": failed,
|
|
|
|
|
|
|
| 317 |
"verdict_posted": verdict_posted,
|
| 318 |
}}
|
|
|
|
| 294 |
"posted" if state.verdict else "skipped",
|
| 295 |
owner, repo_name, pr_number,
|
| 296 |
)
|
| 297 |
+
finding_failed = total - inline_ok - fallback_ok
|
| 298 |
+
verdict_failed = int(state.verdict is not None and not verdict_posted)
|
| 299 |
+
failed = finding_failed + verdict_failed
|
| 300 |
# A review is fully posted only when every finding and the verdict were
|
| 301 |
# accepted by GitHub. Keep the per-part counts so the API/UI can explain a
|
| 302 |
# partial result instead of reporting a misleading success.
|
|
|
|
| 316 |
"inline_posted": inline_ok,
|
| 317 |
"fallback_posted": fallback_ok,
|
| 318 |
"failed": failed,
|
| 319 |
+
"finding_failed": finding_failed,
|
| 320 |
+
"verdict_failed": verdict_failed,
|
| 321 |
"verdict_posted": verdict_posted,
|
| 322 |
}}
|