|
@@ -1177,17 +1177,26 @@ def collect_analysis_inputs(
|
|
|
or td_report_payload.get("commit")
|
|
or td_report_payload.get("commit")
|
|
|
or ""
|
|
or ""
|
|
|
)
|
|
)
|
|
|
|
|
+ # DELIVERY is the package tip (git HEAD / --binding-commit). Never fall
|
|
|
|
|
+ # back to ARTIFACT or sibling filenames collapse to the wrong tip.
|
|
|
|
|
+ delivery = str(head or binding_commit or "").strip()
|
|
|
artifact = str(
|
|
artifact = str(
|
|
|
binding.get("artifact_source_commit")
|
|
binding.get("artifact_source_commit")
|
|
|
or report_artifact
|
|
or report_artifact
|
|
|
or pkg_prov.ARTIFACT_DEFAULT
|
|
or pkg_prov.ARTIFACT_DEFAULT
|
|
|
or ""
|
|
or ""
|
|
|
- )
|
|
|
|
|
- delivery = head or artifact
|
|
|
|
|
|
|
+ ).strip()
|
|
|
|
|
+ if not delivery:
|
|
|
|
|
+ raise PackagingError(
|
|
|
|
|
+ "review-compact delivery commit unavailable "
|
|
|
|
|
+ "(git head and --binding-commit both empty)"
|
|
|
|
|
+ )
|
|
|
if not artifact:
|
|
if not artifact:
|
|
|
- artifact = delivery
|
|
|
|
|
- # Guard: do not silently collapse ARTIFACT into DELIVERY when a TD
|
|
|
|
|
- # production tip is known and differs from HEAD.
|
|
|
|
|
|
|
+ raise PackagingError(
|
|
|
|
|
+ "review-compact artifact_source_commit unavailable "
|
|
|
|
|
+ "(TD report commit / ARTIFACT_DEFAULT missing)"
|
|
|
|
|
+ )
|
|
|
|
|
+ # Prefer TD production tip when binder incorrectly equates ARTIFACT to DELIVERY.
|
|
|
if report_artifact and artifact == delivery and report_artifact != delivery:
|
|
if report_artifact and artifact == delivery and report_artifact != delivery:
|
|
|
artifact = report_artifact
|
|
artifact = report_artifact
|
|
|
|
|
|