Skip to content

Commit 54e93a2

Browse files
JihaoXinclaude
andcommitted
Run citation verification as final step before sending PDF
Citation NEEDS-CHECK tags were being deleted by writer agent in subsequent iterations. Now citation verification runs twice: 1. After compile (Step 1) — for CORRECTED fixes before review 2. Before send PDF (pre-delivery) — re-applies NEEDS-CHECK tags that writer may have removed. No writer runs after this point. Applied to both Dev phase delivery and Review loop delivery. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cf5ff1a commit 54e93a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ark/pipeline.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,9 @@ def run_paper_iteration(self) -> bool:
452452
# Hard page count enforcement before delivery
453453
self._enforce_page_count(context="pre-delivery")
454454

455+
# Final citation verification — re-apply NEEDS-CHECK tags that writer may have removed
456+
self._run_citation_verification()
457+
455458
# Send iteration summary + PDF to Telegram
456459
self.send_iteration_summary(score, current_score, review_output)
457460

@@ -1224,6 +1227,7 @@ def _run_dev_phase(self):
12241227

12251228
if draft_compiled:
12261229
self._enforce_page_count(context="dev-phase-delivery")
1230+
self._run_citation_verification()
12271231

12281232
if draft_compiled and self.telegram.is_configured:
12291233
pdf_path = self.latex_dir / "main.pdf"

0 commit comments

Comments
 (0)