|
@@ -1593,8 +1593,8 @@ def collect_analysis_inputs(
|
|
|
old_baseline_commit=pkg_prov.BASE_DEV_COMMIT_DEFAULT,
|
|
old_baseline_commit=pkg_prov.BASE_DEV_COMMIT_DEFAULT,
|
|
|
artifact_commit=artifact,
|
|
artifact_commit=artifact,
|
|
|
delivery_commit=delivery,
|
|
delivery_commit=delivery,
|
|
|
- old_to_artifact_unchanged=None,
|
|
|
|
|
- artifact_to_delivery_unchanged=None,
|
|
|
|
|
|
|
+ old_to_artifact_unchanged=False, # A1 TD tip changed vs locked dev
|
|
|
|
|
+ artifact_to_delivery_unchanged=(artifact == delivery),
|
|
|
old_to_artifact_changed_paths=[],
|
|
old_to_artifact_changed_paths=[],
|
|
|
artifact_to_delivery_changed_paths=[],
|
|
artifact_to_delivery_changed_paths=[],
|
|
|
comparison_mode="snapshot_hash",
|
|
comparison_mode="snapshot_hash",
|
|
@@ -1618,44 +1618,46 @@ def collect_analysis_inputs(
|
|
|
release_set_id=f"intermediate-nonfinal-{delivery[:8]}",
|
|
release_set_id=f"intermediate-nonfinal-{delivery[:8]}",
|
|
|
)
|
|
)
|
|
|
polarity = motor_polarity_config_identity(root)
|
|
polarity = motor_polarity_config_identity(root)
|
|
|
- release_identity = {
|
|
|
|
|
- "schema": "prod2u-release-set-identity-v1",
|
|
|
|
|
- "algorithm_version": "prod2u-release-set-id-v1",
|
|
|
|
|
- "package_stage": "intermediate-review",
|
|
|
|
|
- "non_final": True,
|
|
|
|
|
- "release_set_id": f"intermediate-nonfinal-{delivery[:8]}",
|
|
|
|
|
- "base_dev_commit": pkg_prov.BASE_DEV_COMMIT_DEFAULT,
|
|
|
|
|
- "verification_tip": verification_tip or None,
|
|
|
|
|
- "td_bound_candidate": td_bound_candidate or None,
|
|
|
|
|
- "reused_artifact_source": td_bound_candidate or None,
|
|
|
|
|
- "artifact_source_commit": artifact,
|
|
|
|
|
- "delivery_commit": delivery,
|
|
|
|
|
- "bitstream_sha256": "b4b0eda4ee8d774109eff83b519bdaa19d5e73d770562983121a596df00952d0",
|
|
|
|
|
- "matrix_verification_tip": verification_tip or None,
|
|
|
|
|
- "td_bound_commit": td_bound_candidate or None,
|
|
|
|
|
- "verification_run_id": "mse-r7-20260812T132652Z",
|
|
|
|
|
- "td_binding_status": "pass",
|
|
|
|
|
- "production_binding": "37/37/0/0",
|
|
|
|
|
- "production_polarity_config": {
|
|
|
|
|
- "limit_active_high": polarity.get("limit_active_high"),
|
|
|
|
|
- "dir_close_level": polarity.get("dir_close_level"),
|
|
|
|
|
- "close_limit_is_ls": polarity.get("close_limit_is_ls"),
|
|
|
|
|
- "generated_masks": polarity.get("generated_masks")
|
|
|
|
|
- or polarity.get("masks"),
|
|
|
|
|
- "config_fingerprint": polarity.get("sha256"),
|
|
|
|
|
- },
|
|
|
|
|
- "td_artifact_run_id": None,
|
|
|
|
|
- "td_receipt_sha256": None,
|
|
|
|
|
- "reference_set_fingerprint": pkg_prov.reference_set_fingerprint(root)[
|
|
|
|
|
|
|
+ # Round-9: when claiming bound bitstream b4b0eda4, derive run_id +
|
|
|
|
|
+ # receipt SHA from canonical TD receipt — never leave nulls.
|
|
|
|
|
+ td_fields = pkg_prov.load_canonical_td_a1_fields(root)
|
|
|
|
|
+ release_identity = pkg_prov.build_shared_release_identity(
|
|
|
|
|
+ delivery_commit=delivery,
|
|
|
|
|
+ package_stage="intermediate-review",
|
|
|
|
|
+ matrix_verification_tip=verification_tip or None,
|
|
|
|
|
+ software_verification_run_id=(
|
|
|
|
|
+ str(binding.get("verification_run_id") or "").strip()
|
|
|
|
|
+ or os.environ.get("PRODU2_SOFTWARE_VERIFICATION_RUN_ID", "").strip()
|
|
|
|
|
+ or None
|
|
|
|
|
+ ),
|
|
|
|
|
+ config_fingerprint=str(polarity.get("sha256") or ""),
|
|
|
|
|
+ reference_set_fingerprint=pkg_prov.reference_set_fingerprint(root)[
|
|
|
"sha256"
|
|
"sha256"
|
|
|
],
|
|
],
|
|
|
- "hardware_validation": "not_run",
|
|
|
|
|
- "note": (
|
|
|
|
|
- "INTERMEDIATE / NON-FINAL MSE A1 verification closure package. "
|
|
|
|
|
- "No fresh TD/bitstream claimed this round unless receipts say so. "
|
|
|
|
|
- "Do not treat as final release set."
|
|
|
|
|
- ),
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ repo_root=root,
|
|
|
|
|
+ claim_bound_bitstream=True,
|
|
|
|
|
+ extra={
|
|
|
|
|
+ "td_bound_candidate": td_bound_candidate or None,
|
|
|
|
|
+ "reused_artifact_source": td_bound_candidate or None,
|
|
|
|
|
+ "production_polarity_config": {
|
|
|
|
|
+ "limit_active_high": polarity.get("limit_active_high"),
|
|
|
|
|
+ "dir_close_level": polarity.get("dir_close_level"),
|
|
|
|
|
+ "close_limit_is_ls": polarity.get("close_limit_is_ls"),
|
|
|
|
|
+ "generated_masks": polarity.get("generated_masks")
|
|
|
|
|
+ or polarity.get("masks"),
|
|
|
|
|
+ "config_fingerprint": polarity.get("sha256"),
|
|
|
|
|
+ },
|
|
|
|
|
+ "td_receipt_path": td_fields.get("td_receipt_path"),
|
|
|
|
|
+ "note": (
|
|
|
|
|
+ "INTERMEDIATE / NON-FINAL MSE A1 verification closure package. "
|
|
|
|
|
+ "TD identity fields derived from receipts/mse-r4-td-a1-ff44128.json; "
|
|
|
|
|
+ "Do not treat as final release set."
|
|
|
|
|
+ ),
|
|
|
|
|
+ },
|
|
|
|
|
+ )
|
|
|
|
|
+ # Keep stable intermediate sibling id label for deferred firmware name,
|
|
|
|
|
+ # but shared release_set_id already embeds td_artifact_run_id.
|
|
|
|
|
+ sibling["release_set_id"] = release_identity["release_set_id"]
|
|
|
provenance_artifacts["meta/REFERENCE-POINTER.json"] = handoff.json_bytes(
|
|
provenance_artifacts["meta/REFERENCE-POINTER.json"] = handoff.json_bytes(
|
|
|
ref_pointer
|
|
ref_pointer
|
|
|
)
|
|
)
|
|
@@ -1669,8 +1671,44 @@ def collect_analysis_inputs(
|
|
|
handoff.json_bytes(release_identity)
|
|
handoff.json_bytes(release_identity)
|
|
|
)
|
|
)
|
|
|
provenance_artifacts["meta/release-set-id.txt"] = (
|
|
provenance_artifacts["meta/release-set-id.txt"] = (
|
|
|
- f"intermediate-nonfinal-{delivery[:8]}\n"
|
|
|
|
|
|
|
+ f"{release_identity['release_set_id']}\n"
|
|
|
).encode("ascii")
|
|
).encode("ascii")
|
|
|
|
|
+ # Round-9: when identity claims bound bitstream, TD binding must be
|
|
|
|
|
+ # status=pass (not hook_ready) with run IDs + receipt SHA.
|
|
|
|
|
+ binding = dict(binding) if isinstance(binding, dict) else {}
|
|
|
|
|
+ binding.update(
|
|
|
|
|
+ {
|
|
|
|
|
+ "status": "pass",
|
|
|
|
|
+ "td_binding_status": "pass",
|
|
|
|
|
+ "artifact_source_commit": release_identity.get(
|
|
|
|
|
+ "artifact_source_commit"
|
|
|
|
|
+ ),
|
|
|
|
|
+ "td_bound_commit": release_identity.get("td_bound_commit"),
|
|
|
|
|
+ "delivery_commit": delivery,
|
|
|
|
|
+ "bitstream_sha256": release_identity.get("bitstream_sha256"),
|
|
|
|
|
+ "td_artifact_run_id": release_identity.get("td_artifact_run_id"),
|
|
|
|
|
+ "td_verification_run_id": release_identity.get(
|
|
|
|
|
+ "td_verification_run_id"
|
|
|
|
|
+ ),
|
|
|
|
|
+ "td_receipt_sha256": release_identity.get("td_receipt_sha256"),
|
|
|
|
|
+ "td_receipt_path": td_fields.get("td_receipt_path"),
|
|
|
|
|
+ "production_binding": release_identity.get("production_binding"),
|
|
|
|
|
+ "lut": release_identity.get("lut"),
|
|
|
|
|
+ "mslice": release_identity.get("mslice"),
|
|
|
|
|
+ "dsp": release_identity.get("dsp"),
|
|
|
|
|
+ "note": (
|
|
|
|
|
+ "Round-9 intermediate: TD binding derived from canonical "
|
|
|
|
|
+ "receipts/mse-r4-td-a1-ff44128.json (status=pass)."
|
|
|
|
|
+ ),
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ binding_bytes = handoff.json_bytes(binding)
|
|
|
|
|
+ provenance_artifacts["meta/td/td-source-closure-binding.json"] = (
|
|
|
|
|
+ binding_bytes
|
|
|
|
|
+ )
|
|
|
|
|
+ provenance_artifacts["meta/td-source-closure-binding.json"] = (
|
|
|
|
|
+ binding_bytes
|
|
|
|
|
+ )
|
|
|
if packaged_source_manifest is not None:
|
|
if packaged_source_manifest is not None:
|
|
|
provenance_artifacts["meta/git/packaged-source-manifest.json"] = (
|
|
provenance_artifacts["meta/git/packaged-source-manifest.json"] = (
|
|
|
handoff.json_bytes(packaged_source_manifest)
|
|
handoff.json_bytes(packaged_source_manifest)
|