MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / passes_quality_check

Function passes_quality_check

core/recursive.py:207–221  ·  view source on GitHub ↗

Return True if the critique indicates acceptable quality (no refinement needed). Logic: - If a numeric X/10 rating is present: pass if rating >= threshold * 10 - If no rating: fail if any critical issue marker is found in the critique

(critique: str, threshold: float = 0.7)

Source from the content-addressed store, hash-verified

205
206
207def passes_quality_check(critique: str, threshold: float = 0.7) -> bool:
208 """
209 Return True if the critique indicates acceptable quality (no refinement needed).
210
211 Logic:
212 - If a numeric X/10 rating is present: pass if rating >= threshold * 10
213 - If no rating: fail if any critical issue marker is found in the critique
214 """
215 rating = extract_rating(critique)
216 if rating is not None:
217 return rating >= threshold * 10
218
219 # No numeric rating — check for critical problem markers
220 lower = critique.lower()
221 return not any(marker in lower for marker in _CRITICAL_MARKERS)
222
223
224# ── Internal helpers ──────────────────────────────────────────────────────────

Callers 1

recursive_inferFunction · 0.85

Calls 1

extract_ratingFunction · 0.85

Tested by

no test coverage detected