feat: require pagination proof in reconciliation PR inventory (#308)
Add assess_reconcile_inventory_report verifier to block complete queue scan and all-already-landed claims without final-page metadata, requested page size, pages fetched, per-page counts, and no-next-page proof. Wire into build_final_report and export from review_proofs. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
@@ -1476,6 +1476,11 @@ def build_final_report(checkout_proof, inventory, validation, contamination,
|
||||
if report_text
|
||||
else {"proven": True, "block": False, "reasons": [], "violations": []}
|
||||
)
|
||||
reconcile_inventory = (
|
||||
assess_reconcile_inventory_report(report_text)
|
||||
if report_text and _RECONCILE_INVENTORY_HINT.search(report_text)
|
||||
else {"proven": True, "block": False, "reasons": []}
|
||||
)
|
||||
if baseline_validation is None and report_text:
|
||||
baseline_validation = assess_reviewer_baseline_validation_proof(
|
||||
report_text=report_text,
|
||||
@@ -1632,6 +1637,11 @@ def build_final_report(checkout_proof, inventory, validation, contamination,
|
||||
"queue-status report violates loaded workflow proof gates (#339)"
|
||||
)
|
||||
downgrade_reasons.extend(queue_status_report.get("reasons", []))
|
||||
if not reconcile_inventory.get("proven"):
|
||||
downgrade_reasons.append(
|
||||
"reconciliation PR inventory lacks pagination proof (#308)"
|
||||
)
|
||||
downgrade_reasons.extend(reconcile_inventory.get("reasons", []))
|
||||
if not baseline_validation.get("proven"):
|
||||
downgrade_reasons.append(
|
||||
"reviewer baseline validation proof missing or failed (#325)"
|
||||
@@ -1717,6 +1727,10 @@ def build_final_report(checkout_proof, inventory, validation, contamination,
|
||||
"queue_status_violations": list(
|
||||
queue_status_report.get("violations") or []
|
||||
),
|
||||
"reconcile_inventory_proven": bool(reconcile_inventory.get("proven")),
|
||||
"reconcile_inventory_violations": list(
|
||||
reconcile_inventory.get("reasons") or []
|
||||
),
|
||||
"baseline_validation_proven": bool(baseline_validation.get("proven")),
|
||||
"baseline_validation_violations": list(
|
||||
baseline_validation.get("violations") or []
|
||||
@@ -3753,6 +3767,12 @@ _QUEUE_STATUS_REPORT_HINT = re.compile(
|
||||
re.I,
|
||||
)
|
||||
|
||||
_RECONCILE_INVENTORY_HINT = re.compile(
|
||||
r"already[- ]landed reconciliation|reconcile[- ]landed|"
|
||||
r"open pr inventory|inventory pagination proof",
|
||||
re.I,
|
||||
)
|
||||
|
||||
_GATE_PASSED_VALUE = re.compile(r"\bpassed\b", re.I)
|
||||
|
||||
_NOT_APPLICABLE_VALUE = re.compile(
|
||||
@@ -4142,3 +4162,10 @@ def assess_non_mergeable_skip_proof(report_text, **kwargs):
|
||||
from reviewer_mergeability_skip import assess_non_mergeable_skip_proof as _assess
|
||||
|
||||
return _assess(report_text, **kwargs)
|
||||
|
||||
|
||||
def assess_reconcile_inventory_report(report_text, **kwargs):
|
||||
"""#308: prove PR inventory pagination in reconciliation reports."""
|
||||
from reviewer_reconcile_inventory import assess_reconcile_inventory_report as _assess
|
||||
|
||||
return _assess(report_text, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user