fix(wiki): basic conflict detection in CompileReport
Add _detect_conflicts() using adversative keyword heuristic (but, however, in contrast, …) between chunks of different bibkeys; results populate CompileReport.conflicts and appear in wiki/log.md. Also add CompileReport.quarantined field (used by Fix 2). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
13
codex/cli.py
13
codex/cli.py
@@ -329,6 +329,19 @@ def wiki_check(
|
||||
typer.echo(f"⚠ Ungrounded claim(s) in: {page.name}", err=True)
|
||||
found_ungrounded = True
|
||||
|
||||
# Check for quarantined pages in wiki/draft/
|
||||
draft_dir = wiki_dir / "draft"
|
||||
draft_pages = sorted(draft_dir.glob("*.md")) if draft_dir.exists() else []
|
||||
if draft_pages:
|
||||
n = len(draft_pages)
|
||||
typer.echo(
|
||||
f"⚠ {n} page(s) quarantined in wiki/draft/ (grounding rate below threshold)",
|
||||
err=True,
|
||||
)
|
||||
for dp in draft_pages:
|
||||
typer.echo(f" - {dp.name}", err=True)
|
||||
raise typer.Exit(2)
|
||||
|
||||
if found_ungrounded:
|
||||
raise typer.Exit(1)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user