Merge pull request 'feat: classify already-landed PRs as reconciliation-only (Closes #295)' (#382) from feat/issue-295-already-landed-classification into master
This commit was merged in pull request #382.
This commit is contained in:
@@ -1742,6 +1742,17 @@ def build_final_report(checkout_proof, inventory, validation, contamination,
|
||||
"reasons": [],
|
||||
"violations": [],
|
||||
}
|
||||
if report_text:
|
||||
already_landed_classification = assess_already_landed_classification_report(
|
||||
report_text
|
||||
)
|
||||
else:
|
||||
already_landed_classification = {
|
||||
"proven": True,
|
||||
"block": False,
|
||||
"reasons": [],
|
||||
"violations": [],
|
||||
}
|
||||
|
||||
contamination_status = contamination.get("status", "unknown")
|
||||
checkout_proven = bool(checkout_proof.get("proven"))
|
||||
@@ -1921,6 +1932,11 @@ def build_final_report(checkout_proof, inventory, validation, contamination,
|
||||
"reviewer baseline validation proof missing or failed (#325)"
|
||||
)
|
||||
downgrade_reasons.extend(baseline_validation.get("reasons", []))
|
||||
if not already_landed_classification.get("proven"):
|
||||
downgrade_reasons.append(
|
||||
"already-landed classification wording missing or invalid (#295)"
|
||||
)
|
||||
downgrade_reasons.extend(already_landed_classification.get("reasons", []))
|
||||
|
||||
merge_allowed = (
|
||||
identity_eligible
|
||||
@@ -2035,6 +2051,12 @@ def build_final_report(checkout_proof, inventory, validation, contamination,
|
||||
"baseline_validation_violations": list(
|
||||
baseline_validation.get("violations") or []
|
||||
),
|
||||
"already_landed_classification_proven": bool(
|
||||
already_landed_classification.get("proven")
|
||||
),
|
||||
"already_landed_classification_violations": list(
|
||||
already_landed_classification.get("reasons") or []
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -5331,6 +5353,15 @@ def assess_validation_integrity_report(report_text, **kwargs):
|
||||
return _assess(report_text, **kwargs)
|
||||
|
||||
|
||||
def assess_already_landed_classification_report(report_text, **kwargs):
|
||||
"""#295: already-landed PRs are reconciliation-only, not review eligible."""
|
||||
from reviewer_already_landed_classification import (
|
||||
assess_already_landed_classification_report as _assess,
|
||||
)
|
||||
|
||||
return _assess(report_text, **kwargs)
|
||||
|
||||
|
||||
def assess_prior_blocker_skip_proof(report_text, **kwargs):
|
||||
"""#318: require live blocker proof before skipping earlier open PRs."""
|
||||
from reviewer_blocker_skip import assess_prior_blocker_skip_proof as _assess
|
||||
|
||||
Reference in New Issue
Block a user