disable: Control Library checks until doc-check Master Controls are ready
8 false positives from generic canonical_controls. Regex checks (9+5) are accurate. Re-enable when ~80 specific doc-check controls exist. See INSTRUCTION-master-controls-for-doc-check.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -199,28 +199,10 @@ async def _check_single_document(entry: DocCheckEntry) -> list[DocCheckResult]:
|
||||
# Main document check (full text against primary type)
|
||||
main_result = _run_checklist(doc_text, entry.doc_type, entry.label, entry.url, word_count)
|
||||
|
||||
# Control Library deep check — verifies against canonical_controls (SQL)
|
||||
try:
|
||||
from compliance.services.rag_document_checker import check_document_with_controls
|
||||
from classroom_engine.database import SessionLocal
|
||||
db = SessionLocal()
|
||||
try:
|
||||
ctrl_checks = await check_document_with_controls(
|
||||
doc_text, entry.doc_type, entry.label, db,
|
||||
)
|
||||
logger.info("Control check: %d results for '%s'", len(ctrl_checks) if ctrl_checks else 0, entry.label)
|
||||
if ctrl_checks:
|
||||
for rc in ctrl_checks:
|
||||
main_result.checks.append(CheckItem(
|
||||
id=rc["id"], label=rc["label"], passed=rc["passed"],
|
||||
severity=rc["severity"], matched_text=rc.get("matched_text", ""),
|
||||
))
|
||||
if not rc["passed"]:
|
||||
main_result.findings_count += 1
|
||||
finally:
|
||||
db.close()
|
||||
except Exception as e:
|
||||
logger.warning("Control check failed for %s: %s %s", entry.label, type(e).__name__, e)
|
||||
# Control Library deep check — DISABLED until doc-check-specific
|
||||
# Master Controls with binary pass/fail criteria are available.
|
||||
# See: zeroclaw/INSTRUCTION-master-controls-for-doc-check.md
|
||||
# Code: compliance/services/rag_document_checker.py (ready to re-enable)
|
||||
|
||||
all_results.append(main_result)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user