#!/usr/bin/env python3 """Build an index-only, receipt-bound merged C++ view for the frozen site payload. The output contains no copied or transformed measurements. Every selected row is an integer index into the exact frozen ``ui-data.json`` compact record array. Pair-level campaign selection is atomic: missing scopes in the selected campaign are tombstoned and can never be filled from an older campaign. """ from __future__ import annotations import gzip import hashlib import json from collections import Counter, defaultdict from pathlib import Path from typing import Any HERE = Path(__file__).resolve().parent ROOT = HERE.parents[2] CANDIDATE = HERE.parent / "candidate" OUTPUT = CANDIDATE / "cpp-latest-view.json" EXPECTED_UI_SHA256 = "ef5aa05289f609f2f62ceed009ee17247c8b4767bba8f4aa8cd522ce83d3521d" EXPECTED_DATA_SHA256 = "b7b542c5731786d0486e89de889f024c7e6f69eacb68a7df67bc00179b07af4c" EXPECTED_BASELINE_VERIFIED_SHA256 = "9b5ea536ddf8e60db9dcc54d7d0b98420fba222a38b499b50aa193cdc3fd25a9" BASELINE_REVISION = "d84ab7155ac1d2279610facdebe8aae1681b655b" PUBLISHED_INPUTS = { "ui-data.json", "data.json", "native86-terminal-matrix.jsonl.gz", "native86-row-support-v4-portable-results.jsonl.gz", "corrected-five425-portable-results.jsonl.gz", "NATIVE86_FULL_MATRIX_INTEGRATION_V6.json", "NATIVE86_ACCEPTED_COMPLETION_V7.json", "CORRECTED_FIVE425_INDEPENDENT_ACCEPTANCE.json", "CORRECTED_FIVE425_PORTABLE_MANIFEST.json", "native86-recovery-reconciliation.json", } EXPECTED_RECEIPTS = { "NATIVE86_FULL_MATRIX_INTEGRATION_V6.json": ("site-native86-full-matrix-integration-v2", "passed"), "NATIVE86_ACCEPTED_COMPLETION_V7.json": ("compressionbenchmark-native86-accepted-completion-integration-v1", "passed_not_published"), "CORRECTED_FIVE425_INDEPENDENT_ACCEPTANCE.json": ("compressionbenchmark-corrected-five425-independent-acceptance-v2", "accepted"), "CORRECTED_FIVE425_PORTABLE_MANIFEST.json": ("compressionbenchmark-corrected-five425-portable-manifest-v1", "accepted_portable_export"), "native86-recovery-reconciliation.json": ("paper164-recovery-key-reconciliation-v1", "passed_all_original_problem_identities_have_accepted_rate_byte_replacements"), } MAIN = "cpp-native166-main-458a218f" V9 = "cpp-native166-v9-recovery-baseline86-fixed-profiles-20260919-v3" COMPLETION_REUSE = "cpp-native166-current-recovery-v3-baseline86-fixed-profiles-20260919-v3" COMPLETION_RERUN = "cpp-native166-row-support-v4-baseline86-fixed-profiles-20260919-v3" CORRECTED = "cpp-native166-corrected-five-20261012-v1" HOST192 = { "cpp-native192-first12-baseline86-fixed-profiles-20260919-v3", "cpp-native192-lzg-level5-fastfalse-lzg-level5-fast0-ngf1-empty-fixed-20261010-v2", "cpp-native192-lzg-level5-fastfalse-lzg-level5-fast0-ngf1-fixed-20261010-v1", "cpp-native192-next5-baseline86-fixed-profiles-20260919-v3", } RECOVERY_PROFILES = {V9, *HOST192} CORRECTED_DATASETS = { "github_top_projects", "magseven_ml_ready_high_frequency_anomaly", "traqq_weekly_activity", "trending_stocks_yahoo_finance", "us_stock_financial_ratios", } # These are directional legacy-label -> active Native85-label overrides. They # are backed by the explicit alias and family-membership registries, not fuzzy # matching. SAFE_ALIASES = { "TS_2DIFF": "2DIFF", "CHIMP": "Chimp", "Dictionary": "Dict.", "FPCompress DPratio": "FPCmp-R", "FPCompress DPspeed": "FPCmp-S", "GORILLA": "Gorilla", "GZIP": "gzip", "LZO1X": "LZO1", "SNAPPY": "Snappy", "Slz_deflate": "SLZ", "Slz_gzip": "SLZ", "Slz_zlib": "SLZ", "SPRINTZ": "Sprintz", "Stream VByte": "SVB", "UCL NRV": "NRV", "UCL NRV2b": "NRV", "ZSTD": "Zstd", } AMBIGUOUS_NOT_ALIASED: dict[str, str] = {} def sha256(path: Path) -> str: return hashlib.sha256(path.read_bytes()).hexdigest() def load_json(path: Path) -> Any: return json.loads(path.read_text()) def load_jsonl_gz(path: Path) -> list[dict[str, Any]]: with gzip.open(path, "rt") as stream: return [json.loads(line) for line in stream if line.strip()] def compact_rows(ui: dict[str, Any]) -> list[dict[str, Any]]: tables = ui["record_tables"] rows = [] for index, row in enumerate(ui["compact_records"]): rows.append( { "raw_compact_index": index, "dataset": tables["datasets"][row[0]], "scope": tables["scopes"][row[1]], "source_runtime": tables["runtimes"][row[2]], "source_comparison_profile": tables["comparison_profiles"][row[3]], "source_family": tables["families"][row[4]], "algorithm_variant": tables["configurations"][row[5]], "eligible_support_sha256": tables["support_sets"][row[13]], "measurement_status": tables["measurement_statuses"][row[14]], "timing_profile_status": tables["timing_statuses"][row[15]], } ) return rows def receipt_entry(path: Path) -> dict[str, Any]: value = load_json(path) return { "path": path.name, "sha256": sha256(path), "schema": value.get("schema"), "status": value.get("status"), "created_at": value.get("created_at"), } def main() -> None: ui_path = CANDIDATE / "ui-data.json" data_path = CANDIDATE / "data.json" if sha256(ui_path) != EXPECTED_UI_SHA256: raise RuntimeError("frozen ui-data.json SHA mismatch") if sha256(data_path) != EXPECTED_DATA_SHA256: raise RuntimeError("frozen data.json SHA mismatch") baseline_verified_path = HERE.parent / "BASELINE_VERIFIED.json" if sha256(baseline_verified_path) != EXPECTED_BASELINE_VERIFIED_SHA256: raise RuntimeError("published baseline verification receipt SHA mismatch") baseline_verified = load_json(baseline_verified_path) verified_files = {item["path"]: item["sha256"] for item in baseline_verified["files"]} if ( baseline_verified.get("status") != "verified" or baseline_verified.get("revision") != BASELINE_REVISION or verified_files.get("ui-data.json") != EXPECTED_UI_SHA256 or verified_files.get("data.json") != EXPECTED_DATA_SHA256 ): raise RuntimeError("published baseline verification receipt does not bind the frozen payload") for name in sorted(PUBLISHED_INPUTS): path = CANDIDATE / name if not path.is_file() or name not in verified_files or sha256(path) != verified_files[name]: raise RuntimeError(f"published input is absent or differs from BASELINE_VERIFIED: {name}") for name, (expected_schema, expected_status) in EXPECTED_RECEIPTS.items(): value = load_json(CANDIDATE / name) if value.get("schema") != expected_schema or value.get("status") != expected_status: raise RuntimeError(f"published receipt schema/status mismatch: {name}") ui = load_json(ui_path) data = load_json(data_path) rows = compact_rows(ui) all_scopes = tuple(ui["record_tables"]["scopes"]) hosts = data["benchmark"]["runtime_hosts"] by_profile_pair: dict[tuple[str, str, str], list[dict[str, Any]]] = defaultdict(list) legacy_families: set[str] = set() for row in rows: by_profile_pair[(row["source_comparison_profile"], row["dataset"], row["source_family"])].append(row) if row["source_comparison_profile"] == "cpp": legacy_families.add(row["source_family"]) terminal = load_jsonl_gz(CANDIDATE / "native86-terminal-matrix.jsonl.gz") if any(row.get("record_type") != "terminal_pair" for row in terminal): raise RuntimeError("Native85 terminal matrix contains a non-terminal-pair record") active85 = sorted({row["method_label"] for row in terminal}) datasets164 = sorted({row["dataset_id"] for row in terminal}) if len(active85) != 85 or len(datasets164) != 164 or len(terminal) != 13_940: raise RuntimeError("Native85 terminal matrix cardinality mismatch") terminal_pairs = {(row["dataset_id"], row["method_label"]): row for row in terminal} if len(terminal_pairs) != 13_940: raise RuntimeError("Native85 terminal matrix pair duplication") # authority[pair] always describes exactly one winning campaign, or an # explicit terminal tombstone. It is never a best-value selection. authority: dict[tuple[str, str], dict[str, Any]] = {} for pair, row in terminal_pairs.items(): if row["terminal_status"] == "final_numeric_available": authority[pair] = { "status": "numeric", "profile": MAIN, "authority": "native85_main_terminal_matrix", "reason": "Native85 terminal matrix reports accepted numeric support in the main campaign.", "recency_rank": 10, } elif row["terminal_status"] == "not_applicable_no_eligible_columns": authority[pair] = { "status": "not_applicable", "profile": MAIN, "authority": "native85_main_terminal_matrix", "reason": "Native85 terminal matrix is final all-N/A; legacy numeric rows are blocked.", "recency_rank": 10, } else: authority[pair] = { "status": "unresolved_original_problem", "profile": None, "authority": "native85_main_terminal_matrix", "reason": "Original Native85 problem; an accepted recovery overlay is required.", "recency_rank": 10, } # Independently accepted V9 plus server-192 recovery: 174 unique pairs. recovery_candidates: dict[tuple[str, str], set[str]] = defaultdict(set) for profile in RECOVERY_PROFILES: for candidate_profile, dataset, family in by_profile_pair: if candidate_profile == profile: recovery_candidates[(dataset, family)].add(profile) if len(recovery_candidates) != 174: raise RuntimeError(f"expected 174 unique accepted V9/192 recovery pairs, found {len(recovery_candidates)}") for pair, profiles in recovery_candidates.items(): if pair not in terminal_pairs: raise RuntimeError(f"recovery pair outside Native85 matrix: {pair}") if len(profiles) == 1: profile = next(iter(profiles)) overlap_rule = None elif pair == ("weather_data_bavaria", "LZG") and profiles == { V9, "cpp-native192-lzg-level5-fastfalse-lzg-level5-fast0-ngf1-empty-fixed-20261010-v2", }: profile = "cpp-native192-lzg-level5-fastfalse-lzg-level5-fast0-ngf1-empty-fixed-20261010-v2" overlap_rule = "explicit current LZG parameter contract level=5, fast=false; not ratio-based" else: raise RuntimeError(f"unadjudicated recovery overlap for {pair}: {sorted(profiles)}") authority[pair] = { "status": "numeric", "profile": profile, "authority": "native85_v9_or_192_independently_accepted_recovery", "reason": overlap_rule or "Unique independently accepted recovery source for this pair.", "recency_rank": 20, "candidate_profiles": sorted(profiles), } # Accepted completion repairs exactly the other 328 original problem pairs. completion = load_jsonl_gz(CANDIDATE / "native86-row-support-v4-portable-results.jsonl.gz") if len(completion) != 328: raise RuntimeError("accepted completion must contain exactly 328 pairs") if any(row.get("schema") != "compressionbenchmark-native328-portable-pair-v1" for row in completion): raise RuntimeError("accepted completion row schema mismatch") completion_profiles = { "reuse_v3_recovered": COMPLETION_REUSE, "rerun_v4": COMPLETION_RERUN, } for item in completion: pair = (item["dataset_id"], item["method"]) if pair in recovery_candidates: raise RuntimeError(f"completion overlaps prior accepted recovery: {pair}") profile = completion_profiles[item["action"]] authority[pair] = { "status": "numeric", "profile": profile, "authority": "native328_independently_accepted_completion", "reason": f"Accepted Native328 completion action={item['action']}.", "recency_rank": 30, "pair_receipt_sha256": item["receipt_sha256"], } unresolved = [pair for pair, decision in authority.items() if decision["status"] == "unresolved_original_problem"] if unresolved: raise RuntimeError(f"unresolved Native85 problem pairs remain: {unresolved[:3]}") # Latest corrected-input campaign atomically supersedes every older version # for all five datasets and all 85 active methods, including unsupported and # mixed pairs with no overall row. corrected = load_jsonl_gz(CANDIDATE / "corrected-five425-portable-results.jsonl.gz") if any(row.get("schema") != "compressionbenchmark-corrected-five425-portable-pair-v1" for row in corrected): raise RuntimeError("corrected-five portable row schema mismatch") corrected_pairs = {(row["dataset_id"], row["method"]): row for row in corrected} expected_corrected = {(dataset, family) for dataset in CORRECTED_DATASETS for family in active85} if set(corrected_pairs) != expected_corrected or len(corrected) != 425: raise RuntimeError("corrected-five pair coverage is not exactly 5 x 85") for pair, item in corrected_pairs.items(): if item["numeric_result"]: status = "numeric" reason = "Latest independently accepted corrected-input pair; all older scopes/configurations are superseded." profile: str | None = CORRECTED else: status = "unsupported" reason = "Latest corrected-input pair is all-unsupported; all prior numeric/configuration rows are tombstoned." profile = CORRECTED authority[pair] = { "status": status, "profile": profile, "authority": "corrected_five425_independent_acceptance", "reason": reason, "recency_rank": 40, "pair_terminal_class": item["pair_terminal_class"], "pair_receipt_sha256": item["receipt_sha256"], } selected_rows: list[dict[str, Any]] = [] pair_ledger: list[dict[str, Any]] = [] selected_indices: set[int] = set() pair_status_counts: Counter[str] = Counter() for dataset, family in sorted(authority): decision = authority[(dataset, family)] profile = decision["profile"] chosen = [] if profile is None else list(by_profile_pair.get((profile, dataset, family), [])) if decision["status"] == "numeric" and not chosen: raise RuntimeError(f"numeric authority has no compact rows: {(dataset, family, profile)}") if decision["status"] != "numeric" and chosen: raise RuntimeError(f"terminal tombstone unexpectedly has rows: {(dataset, family, profile)}") # Do not allow duplicate scientific row identity within a winning # campaign. Multiple configurations remain distinct by contract. identities = [ ( row["scope"], row["algorithm_variant"], row["eligible_support_sha256"], row["source_runtime"], ) for row in chosen ] if len(identities) != len(set(identities)): raise RuntimeError(f"duplicate row identity in winning campaign: {(dataset, family, profile)}") source_host = None if profile is None else hosts[profile] pair_indices = sorted(row["raw_compact_index"] for row in chosen) scopes = sorted({row["scope"] for row in chosen}) for row in chosen: index = row["raw_compact_index"] if index in selected_indices: raise RuntimeError(f"compact row selected twice: {index}") selected_indices.add(index) timing_admitted = row["timing_profile_status"].startswith("timing_admitted_") selected_rows.append( { "raw_compact_index": index, "canonical_family": family, "source_family": row["source_family"], "source_comparison_profile": profile, "source_runtime": row["source_runtime"], "source_host": source_host, "authority": decision["authority"], "pair_status": decision["status"], "timing_admitted": timing_admitted, "measurement_status": row["measurement_status"], "timing_profile_status": row["timing_profile_status"], } ) pair_status_counts[decision["status"]] += 1 pair_ledger.append( { "dataset": dataset, "canonical_family": family, "decision": "select_winning_campaign" if chosen else "terminal_tombstone", "status": decision["status"], "source_comparison_profile": profile, "source_host": source_host, "selected_raw_indices": pair_indices, "selected_scopes": scopes, "missing_scopes_tombstoned": sorted(set(all_scopes) - set(scopes)), "recency_rank": decision["recency_rank"], "authority": decision["authority"], "reason": decision["reason"], **({"pair_terminal_class": decision["pair_terminal_class"]} if "pair_terminal_class" in decision else {}), **({"pair_receipt_sha256": decision["pair_receipt_sha256"]} if "pair_receipt_sha256" in decision else {}), **({"candidate_profiles": decision["candidate_profiles"]} if "candidate_profiles" in decision else {}), } ) # Preserve concrete legacy-only algorithm families and every configuration # within their legacy campaign. Safe aliases into Native85 are excluded, # because their Native85 terminal/tombstone decision is authoritative. mapped_legacy = {SAFE_ALIASES.get(family, family) for family in legacy_families} legacy_extras = sorted(family for family in legacy_families if SAFE_ALIASES.get(family, family) not in active85) expected_extras = sorted(["BSS+LZ4", "Sub-column"]) if legacy_extras != expected_extras: raise RuntimeError(f"unexpected legacy extra families: {legacy_extras}") if not set(active85).issubset(mapped_legacy): missing = sorted(set(active85) - mapped_legacy) raise RuntimeError(f"active Native85 labels absent after explicit legacy aliases: {missing}") for family in legacy_extras: family_rows = [row for row in rows if row["source_comparison_profile"] == "cpp" and row["source_family"] == family] for row in family_rows: index = row["raw_compact_index"] if index in selected_indices: raise RuntimeError(f"legacy compact row selected twice: {index}") selected_indices.add(index) selected_rows.append( { "raw_compact_index": index, "canonical_family": family, "source_family": family, "source_comparison_profile": "cpp", "source_runtime": row["source_runtime"], "source_host": hosts["cpp"], "authority": "legacy_extra_family_preserved_all_configurations", "pair_status": "numeric", "timing_admitted": row["timing_profile_status"].startswith("timing_admitted_"), "measurement_status": row["measurement_status"], "timing_profile_status": row["timing_profile_status"], } ) for dataset in sorted({row["dataset"] for row in family_rows}): chosen = [row for row in family_rows if row["dataset"] == dataset] pair_ledger.append( { "dataset": dataset, "canonical_family": family, "decision": "preserve_legacy_extra_family_all_configurations", "status": "numeric", "source_comparison_profile": "cpp", "source_host": hosts["cpp"], "selected_raw_indices": sorted(row["raw_compact_index"] for row in chosen), "selected_scopes": sorted({row["scope"] for row in chosen}), "missing_scopes_tombstoned": [], "recency_rank": 0, "authority": "legacy_extra_family_preserved_all_configurations", "reason": "Concrete legacy-only family has no evidenced Native85 equivalent; all legacy configurations are preserved.", } ) selected_rows.sort(key=lambda item: item["raw_compact_index"]) pair_ledger.sort(key=lambda item: (item["dataset"], item["canonical_family"])) timing_indices = [row["raw_compact_index"] for row in selected_rows if row["timing_admitted"]] selected_index_to_source = {row["raw_compact_index"]: row for row in rows} scope_numeric_dataset_counts = { scope: len( { selected_index_to_source[row["raw_compact_index"]]["dataset"] for row in selected_rows if selected_index_to_source[row["raw_compact_index"]]["scope"] == scope } ) for scope in all_scopes } scope_numeric_pair_counts = { scope: len( { ( selected_index_to_source[row["raw_compact_index"]]["dataset"], row["canonical_family"], ) for row in selected_rows if selected_index_to_source[row["raw_compact_index"]]["scope"] == scope } ) for scope in all_scopes } receipts = { name: receipt_entry(CANDIDATE / name) for name in [ "NATIVE86_FULL_MATRIX_INTEGRATION_V6.json", "NATIVE86_ACCEPTED_COMPLETION_V7.json", "CORRECTED_FIVE425_INDEPENDENT_ACCEPTANCE.json", "CORRECTED_FIVE425_PORTABLE_MANIFEST.json", "native86-recovery-reconciliation.json", ] } receipts.update( { "native86-terminal-matrix.jsonl.gz": { "path": "native86-terminal-matrix.jsonl.gz", "sha256": sha256(CANDIDATE / "native86-terminal-matrix.jsonl.gz"), }, "native86-row-support-v4-portable-results.jsonl.gz": { "path": "native86-row-support-v4-portable-results.jsonl.gz", "sha256": sha256(CANDIDATE / "native86-row-support-v4-portable-results.jsonl.gz"), }, "corrected-five425-portable-results.jsonl.gz": { "path": "corrected-five425-portable-results.jsonl.gz", "sha256": sha256(CANDIDATE / "corrected-five425-portable-results.jsonl.gz"), }, } ) alias_source = ROOT / "scripts" / "operator86_required_paths_v1.py" alias_evidence_paths = [ alias_source, ROOT / "cpp" / "native_baseline86_v1" / "UPSTREAM_SPECIALISTS_SOURCE_AUDIT.md", ROOT / "cpp" / "native_baseline86_v1" / "upstream_specialists.cpp", ROOT / "cpp" / "src" / "remaining_codec_action_catalog.cpp", ROOT / "backend" / "myapp" / "method_catalog.py", ] sidecar = { "schema": "compressionbenchmark-cpp-latest-view-v1", "status": "built_from_frozen_published_admitted_sources", "baseline": { "revision": BASELINE_REVISION, "ui_data_path": "ui-data.json", "ui_data_sha256": EXPECTED_UI_SHA256, "data_path": "data.json", "data_sha256": EXPECTED_DATA_SHA256, "compact_record_count": len(rows), "verification_receipt": { "path": "../BASELINE_VERIFIED.json", "sha256": sha256(baseline_verified_path), "observed_at": baseline_verified.get("observed_at"), }, }, "identity_contract": { "winning_campaign_identity": ["dataset", "canonical_family"], "selected_row_identity": [ "raw_compact_index", "scope", "algorithm_variant", "eligible_support_sha256", "source_runtime", ], "atomicity": "One accepted campaign wins per dataset and canonical family. All its compact rows are selected; absent scopes are tombstoned and never backfilled.", "numeric_policy": "The sidecar stores indices and provenance only. Numeric values are read unchanged from the SHA-bound compact record.", "normalized_runtime": "cpp", "source_profile_retention": "source_comparison_profile/source_runtime/source_host remain visible provenance metadata", }, "alias_contract": { "direction": "legacy_source_family_to_native85_canonical_family", "overrides": SAFE_ALIASES, "source": { "path": "scripts/operator86_required_paths_v1.py", "sha256": sha256(alias_source), "evidence": "PIPELINE_ALIASES, documented punctuation-insensitive resolution, and method_catalog family-membership lists; direction is inverted only for evidenced legacy spellings.", }, "evidence_files": [ {"path": str(path.relative_to(ROOT)), "sha256": sha256(path)} for path in alias_evidence_paths ], "ambiguous_not_aliased": AMBIGUOUS_NOT_ALIASED, "legacy_extra_families": legacy_extras, }, "precedence": [ {"rank": 0, "authority": "legacy_extra_family_preserved_all_configurations", "scope": "families without an evidenced Native85 equivalent"}, {"rank": 10, "authority": "native85_main_terminal_matrix", "scope": "164 x 85 base terminal matrix; N/A blocks legacy fallback"}, {"rank": 20, "authority": "native85_v9_or_192_independently_accepted_recovery", "scope": "174 accepted original-problem repairs"}, {"rank": 30, "authority": "native328_independently_accepted_completion", "scope": "remaining 328 accepted original-problem repairs"}, {"rank": 40, "authority": "corrected_five425_independent_acceptance", "scope": "latest corrected inputs for five datasets x 85 methods; supersedes every older scope/configuration"}, ], "receipts": receipts, "selectors": ["cpp", "java", "python"], "cpp": { "merged_runtime": "cpp", "selected_rows": selected_rows, "pair_ledger": pair_ledger, "active_native85_families": active85, "legacy_extra_families": legacy_extras, "counts": { "active_native85_pair_conclusions": len(authority), "active_native85_pair_status": dict(sorted(pair_status_counts.items())), "active_native85_numeric_pairs": pair_status_counts["numeric"], "active_native85_terminal_tombstone_pairs": pair_status_counts["not_applicable"] + pair_status_counts["unsupported"], "legacy_extra_pair_count": sum(1 for row in pair_ledger if row["authority"] == "legacy_extra_family_preserved_all_configurations"), "selected_compact_row_count": len(selected_rows), "timing_admitted_selected_row_count": len(timing_indices), "scope_numeric_dataset_counts": scope_numeric_dataset_counts, "scope_numeric_pair_counts": scope_numeric_pair_counts, }, "timing_subset": { "contract": "Only exact rows already marked timing_admitted_* in the frozen payload enter timing rankings. No timing is borrowed across campaigns, hosts, configurations, or tombstones.", "selected_raw_indices": timing_indices, "selected_row_count": len(timing_indices), "source_profile_counts": dict( sorted( Counter( row["source_comparison_profile"] for row in selected_rows if row["timing_admitted"] ).items() ) ), }, }, "warnings": [ "N/A and unsupported are terminal support conclusions, not zero-valued measurements.", "A corrected mixed-support pair may intentionally lack overall scope; the missing overall result is tombstoned rather than taken from an older input version.", "FreshRetailNet-50K corrected 114-column rerun is pending and is not represented as a newer accepted campaign in this sidecar.", "Only BSS+LZ4 and Sub-column remain legacy extras; all other legacy spellings are explicitly mapped by the bound registries.", "The server-192 LZG overlap is resolved by the explicit current level=5, fast=false parameter contract, never by compression ratio.", ], } OUTPUT.write_text(json.dumps(sidecar, ensure_ascii=False, sort_keys=True, separators=(",", ":"), allow_nan=False) + "\n") result = { "status": "pass", "builder": Path(__file__).name, "builder_sha256": sha256(Path(__file__)), "output": str(OUTPUT.relative_to(ROOT)), "output_sha256": sha256(OUTPUT), "baseline_ui_data_sha256": EXPECTED_UI_SHA256, "counts": sidecar["cpp"]["counts"], "pair_status": dict(sorted(pair_status_counts.items())), "legacy_extra_families": legacy_extras, } (HERE / "BUILD_RESULT.json").write_text(json.dumps(result, ensure_ascii=False, indent=2, sort_keys=True) + "\n") (HERE / "REPORT.md").write_text( "# C++ latest accepted view\n\n" f"Status: **PASS** (derived view validation)\n\n" f"The sidecar selects `{len(selected_rows)}` frozen compact rows by raw index and contains no copied numeric measurements. " f"It records all `{len(authority)}` Native85 pair conclusions: `{pair_status_counts['numeric']}` numeric, " f"`{pair_status_counts['not_applicable']}` N/A, and `{pair_status_counts['unsupported']}` unsupported. " f"It also preserves `{len(legacy_extras)}` concrete legacy-only families.\n\n" "Pair selection is atomic by dataset and canonical family. Corrected-five conclusions supersede every prior version, including missing-overall and all-unsupported tombstones. " "Timing rankings use only unchanged rows already marked `timing_admitted_*`.\n\n" f"Output SHA-256: `{result['output_sha256']}`\n" ) print(json.dumps(result, ensure_ascii=False, indent=2, sort_keys=True)) if __name__ == "__main__": main()