jzxiao commited on
Commit
799b74b
Β·
verified Β·
1 Parent(s): d84ab71

Merge latest C++ results and clarify Overall timing coverage

Browse files

Unify published C++ profiles by dataset and canonical method, selecting the latest authoritative campaign and preserving unsupported/N/A conclusions. Show admitted timed-subset coverage without borrowing old timing. Preserve immutable science payload and ranking formula. Independent source/data reviews and 756 UI regression assertions passed.

.gitattributes CHANGED
@@ -36,3 +36,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
36
  data.json filter=lfs diff=lfs merge=lfs -text
37
  dbp-audit-columns.csv filter=lfs diff=lfs merge=lfs -text
38
  dbp-audit.json filter=lfs diff=lfs merge=lfs -text
 
 
36
  data.json filter=lfs diff=lfs merge=lfs -text
37
  dbp-audit-columns.csv filter=lfs diff=lfs merge=lfs -text
38
  dbp-audit.json filter=lfs diff=lfs merge=lfs -text
39
+ cpp-latest-view.json filter=lfs diff=lfs merge=lfs -text
CPP_LATEST_VIEW_INDEPENDENT_MERGE_REVIEW_V1.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema": "compressionbenchmark-cpp-latest-independent-review-v1",
3
+ "status": "pass",
4
+ "approved_for_ui_integration": true,
5
+ "review_source_sha256": "492cfd30139c94734a8a0047f9ead9ffb3aced84fae96fa084c4c858370ecec2",
6
+ "builder_sha256": "5e403d286a5ffa8669c6ee52deda903cf4487e4dbb1e962c65c224f12a7dbbda",
7
+ "sidecar_sha256": "5d2a8bb4fb5c38fbc4fa130a08b7608c7568f3959ef9dd2706f245862907f90f",
8
+ "build_result_sha256": "1a7bf2407c72563454658a4730644c559553d114404f13038182da9680a67810",
9
+ "check_count": 10,
10
+ "checks": [
11
+ "frozen source/output/receipt hashes",
12
+ "all ten published source inputs match online ledger",
13
+ "schema, build receipt and explicit alias map",
14
+ "all selected rows are unique immutable compact references with original provenance",
15
+ "13,940 active pairs independently reconstruct to the same atomic winning campaigns",
16
+ "all 425 corrected-five decisions supersede old rows, including 39 tombstones",
17
+ "canonical aliases remove duplicate legacy families; two evidenced extras remain",
18
+ "timed subset is exact, admitted and single-contract server-166 main evidence",
19
+ "terminal tombstones block four old overall datasets; Fresh114 remains pending",
20
+ "tampered published input and baseline receipt are rejected before output"
21
+ ],
22
+ "counts": {
23
+ "active_native85_pair_conclusions": 13940,
24
+ "active_native85_numeric_pairs": 11692,
25
+ "active_native85_pair_status": {
26
+ "numeric": 11692,
27
+ "not_applicable": 2209,
28
+ "unsupported": 39
29
+ },
30
+ "active_native85_terminal_tombstone_pairs": 2248,
31
+ "legacy_extra_pair_count": 35,
32
+ "selected_compact_row_count": 26834,
33
+ "timing_admitted_selected_row_count": 24617,
34
+ "overall_numeric_dataset_count": 160,
35
+ "overall_numeric_pair_count": 9991
36
+ },
37
+ "notes": [
38
+ "This approves a derived index view, not a new independent measurement claim.",
39
+ "No timing, rate, byte or status field was synthesized or promoted.",
40
+ "UI integration must preserve per-row source profile, host, measurement status, timing status and the strict score gate."
41
+ ]
42
+ }
CPP_LATEST_VIEW_INDEPENDENT_UI_REVIEW_V2.json ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema": "compressionbenchmark-overall-cpp-latest-ui-independent-review-v2",
3
+ "status": "PASS",
4
+ "supersedes_review_receipt_sha256": "a42281dcb141c6b9feb00e6bd8875861b73979d3cbc0a38b5e76378bf04d4573",
5
+ "checks": 756,
6
+ "source_sha256": {
7
+ "app.js": "aff79c2796cceca48e12afcdb3f8d21300897bb272b0e444517a197a714718dc",
8
+ "availability.js": "d0608c40c7490dbb9881c9a3b22e4af5a4b6af6041fba8cc3a8efbd8061418b5",
9
+ "index.html": "27a97c650260a382aa77e41df1203c626eca82d9462692d6523b9e372833a6de",
10
+ "style.css": "6be468cbbed9bdef493ee7a3ce424d45faecb620cb0dbca23cbb5822067f0e71",
11
+ "README.md": "eb0d0cf52f6d8868deef92dd1b1032f5fb4a5649b23188c1f7e6477f9f014834",
12
+ "cpp-latest-view.json": "5d2a8bb4fb5c38fbc4fa130a08b7608c7568f3959ef9dd2706f245862907f90f"
13
+ },
14
+ "baseline_unchanged_sha256": {
15
+ "ranking.js": "6e14543b42050ec7ad6a04948e8abd6f3589c477035708f9d01814d05a16c076",
16
+ "data.json": "b7b542c5731786d0486e89de889f024c7e6f69eacb68a7df67bc00179b07af4c",
17
+ "ui-data.json": "ef5aa05289f609f2f62ceed009ee17247c8b4767bba8f4aa8cd522ce83d3521d",
18
+ "manifest.json": "c226349a05d564cfc2498397c30e51308cc8dcfb65df94e9e7927527af955b88"
19
+ },
20
+ "legacy_imported_timing_receipt": {
21
+ "path": "legacy-dbp-medium-posts-timing-receipt.json",
22
+ "sha256": "10359f6f1153655710f7ce9b59d04e5460babe5606487b7794a47ba874ef4324",
23
+ "status": "passed",
24
+ "declared_environment_hostname": "server",
25
+ "published_runtime_host_descriptor": "source snapshot"
26
+ },
27
+ "real_fixture": {
28
+ "catalog_datasets": 164,
29
+ "cpp_selected_compact_rows": 26834,
30
+ "cpp_overall_numeric_datasets": 160,
31
+ "cpp_overall_family_rows": 86,
32
+ "rate_rows": 86,
33
+ "strict_timing_rows": 1,
34
+ "strict_timing_families": [
35
+ {
36
+ "method": "BUFF",
37
+ "coverage": 1,
38
+ "timed_subset_coverage": 1,
39
+ "source_profiles": [
40
+ "cpp-native166-main-458a218f"
41
+ ],
42
+ "hosts": [
43
+ "166"
44
+ ]
45
+ }
46
+ ],
47
+ "timed_subset_rows": 84,
48
+ "average_rank_rows": 84,
49
+ "no_average_rank_families": [
50
+ "BSS+LZ4",
51
+ "Sub-column"
52
+ ],
53
+ "composite_score_rows": 0,
54
+ "java_compact_rows": 23884,
55
+ "python_compact_rows": 17762,
56
+ "imported_admitted_rows": 4,
57
+ "imported_profiles": {
58
+ "java": {
59
+ "family_rows": 92,
60
+ "numeric_datasets": 164,
61
+ "dbp_timed_subset_coverage": 1,
62
+ "dbp_rate_denominator": 164,
63
+ "medium_posts_dbp_compression_time": 278.32101832066036,
64
+ "medium_posts_dbp_decompression_time": 58.34620516102439,
65
+ "medium_posts_dbp_average_rank": 1,
66
+ "full_strict_timing_rows": 0,
67
+ "full_timed_subset_rows": 1,
68
+ "full_average_rank_rows": 1,
69
+ "full_composite_rows": 0
70
+ },
71
+ "python": {
72
+ "family_rows": 90,
73
+ "numeric_datasets": 164,
74
+ "dbp_timed_subset_coverage": 1,
75
+ "dbp_rate_denominator": 164,
76
+ "medium_posts_dbp_compression_time": 1332.4766408868545,
77
+ "medium_posts_dbp_decompression_time": 2295.383334598822,
78
+ "medium_posts_dbp_average_rank": 1,
79
+ "full_strict_timing_rows": 0,
80
+ "full_timed_subset_rows": 1,
81
+ "full_average_rank_rows": 1,
82
+ "full_composite_rows": 0
83
+ }
84
+ }
85
+ },
86
+ "boundaries": [
87
+ "latest accepted pair selection is read from the SHA-bound index-only sidecar",
88
+ "timed-subset rows use only current selected admitted timing from one profile/host/contract",
89
+ "strict timings and composite scores remain unavailable under incomplete current coverage",
90
+ "terminal N/A and unsupported decisions are not backfilled from older numeric rows",
91
+ "pending FreshRetailNet-50K full114 results are excluded",
92
+ "Java and Python preserve their decoded source profile/runtime and use only the frozen published runtime-host descriptor",
93
+ "only four receipt-admitted imported rows retain timing; diagnostic imported timings remain unavailable",
94
+ "ranking.js and frozen data payloads remain byte-identical"
95
+ ]
96
+ }
CPP_LATEST_VIEW_INTEGRATION_V1.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema": "compressionbenchmark-cpp-latest-view-integration-v1",
3
+ "status": "validated_view_publication_input",
4
+ "created_at": "2026-10-13T18:46:52.217252+08:00",
5
+ "parent_revision": "d84ab7155ac1d2279610facdebe8aae1681b655b",
6
+ "scope": "Derived C++ latest authoritative campaign selection and availability UI. Immutable published science payload unchanged.",
7
+ "selection": "One latest admitted published campaign per dataset and canonical method; retain all configurations and scopes of winning campaign; terminal unsupported/N/A suppress older numeric fallback.",
8
+ "language_options": [
9
+ "cpp",
10
+ "java",
11
+ "python"
12
+ ],
13
+ "counts": {
14
+ "catalog_datasets": 164,
15
+ "active_native85_pair_conclusions": 13940,
16
+ "active_native85_numeric_pairs": 11692,
17
+ "not_applicable_pairs": 2209,
18
+ "unsupported_pairs": 39,
19
+ "legacy_extra_pairs": 35,
20
+ "selected_compact_rows": 26834,
21
+ "admitted_timing_rows": 24617,
22
+ "overall_numeric_datasets": 160,
23
+ "overall_method_families": 86,
24
+ "overall_families_with_admitted_timed_subset": 84
25
+ },
26
+ "timing": "Strict complete timing/composite stay unavailable when incomplete. Separate admitted subset time is explicitly covered N/M and restricted to one source contract/profile/host. Superseded times are never borrowed. Original ranking.js unchanged.",
27
+ "pending": [
28
+ "FreshRetailNet-50K corrected 114-column new experiment is not independently accepted and is excluded from this view; last completed old input remains visibly identified."
29
+ ],
30
+ "unchanged_science_sha256": {
31
+ "ranking.js": "6e14543b42050ec7ad6a04948e8abd6f3589c477035708f9d01814d05a16c076",
32
+ "data.json": "b7b542c5731786d0486e89de889f024c7e6f69eacb68a7df67bc00179b07af4c",
33
+ "ui-data.json": "ef5aa05289f609f2f62ceed009ee17247c8b4767bba8f4aa8cd522ce83d3521d",
34
+ "manifest.json": "c226349a05d564cfc2498397c30e51308cc8dcfb65df94e9e7927527af955b88"
35
+ },
36
+ "assets": {
37
+ "README.md": {
38
+ "bytes": 10350,
39
+ "sha256": "eb0d0cf52f6d8868deef92dd1b1032f5fb4a5649b23188c1f7e6477f9f014834"
40
+ },
41
+ "app.js": {
42
+ "bytes": 66083,
43
+ "sha256": "aff79c2796cceca48e12afcdb3f8d21300897bb272b0e444517a197a714718dc"
44
+ },
45
+ "index.html": {
46
+ "bytes": 17532,
47
+ "sha256": "27a97c650260a382aa77e41df1203c626eca82d9462692d6523b9e372833a6de"
48
+ },
49
+ "style.css": {
50
+ "bytes": 21877,
51
+ "sha256": "6be468cbbed9bdef493ee7a3ce424d45faecb620cb0dbca23cbb5822067f0e71"
52
+ },
53
+ "availability.js": {
54
+ "bytes": 11264,
55
+ "sha256": "d0608c40c7490dbb9881c9a3b22e4af5a4b6af6041fba8cc3a8efbd8061418b5"
56
+ },
57
+ "cpp-latest-view.json": {
58
+ "bytes": 19973658,
59
+ "sha256": "5d2a8bb4fb5c38fbc4fa130a08b7608c7568f3959ef9dd2706f245862907f90f"
60
+ },
61
+ "build_cpp_latest_view.py": {
62
+ "bytes": 31236,
63
+ "sha256": "5e403d286a5ffa8669c6ee52deda903cf4487e4dbb1e962c65c224f12a7dbbda"
64
+ },
65
+ "CPP_LATEST_VIEW_INDEPENDENT_MERGE_REVIEW_V1.json": {
66
+ "bytes": 2081,
67
+ "sha256": "51b9c3aea87f6aec836a127be72fdd97815b37b4e974db1a37ad91616f9fb077"
68
+ },
69
+ "CPP_LATEST_VIEW_INDEPENDENT_UI_REVIEW_V2.json": {
70
+ "bytes": 3977,
71
+ "sha256": "c49ad3033ac519b6c390603d56938d7733f4e8a753501f97cf0922dfe6b35e29"
72
+ }
73
+ },
74
+ "reviews": {
75
+ "merge": "51b9c3aea87f6aec836a127be72fdd97815b37b4e974db1a37ad91616f9fb077",
76
+ "ui_v2": "c49ad3033ac519b6c390603d56938d7733f4e8a753501f97cf0922dfe6b35e29",
77
+ "ui_assertions_passed": 756
78
+ },
79
+ "local_browser_qa": {
80
+ "LOCAL_PAGE_PROOF.json": "756b1de2353d22429f66feee61bc249e71a710557bbd26e82b3424416b2eb327",
81
+ "LOCAL_OVERALL_CSV_REVIEW.json": "bd85985c44a10e6b0fd96efec7c2fbb3d8ad74fda8a99c331cabe500657e075d",
82
+ "LOCAL_CORRECTED_PRECEDENCE_CSV_REVIEW.json": "b23b0ebedf597f3870c6f93fb9f24ec4f02cea1c84bf8bb29286511e5d3ddd17",
83
+ "LOCAL_LEGACY_TIMING_REGRESSION.json": "875b9973afd30176f79392ccb82cfc24aadc5e13c4403f3ab76cb2d593e3690b"
84
+ },
85
+ "publication_state": "Not published by this receipt; actual commit and live browser checks recorded separately after publication."
86
+ }
README.md CHANGED
@@ -48,7 +48,7 @@ The reviewed 164-dataset scope contains 89 directly measured real datasets and 7
48
 
49
  ## Interface
50
 
51
- - Overall and per-dataset leaderboards with runtime, data-type, precision, family, and method filters
52
  - Sortable metrics, optional columns, and CSV download of the selected ranking
53
  - Compression rate versus compression/decompression cost plots
54
  - Dataset-level method details, snapshot provenance, and metric definitions
@@ -57,13 +57,19 @@ The reviewed 164-dataset scope contains 89 directly measured real datasets and 7
57
  - Overall composite score and average dataset Rank, with 66 valid non-negative one-decimal weight combinations, including zero weights
58
  - Searchable Methods documentation and a 30-family operator catalog with 102 implementation-directory entries, references, I/O contracts, examples, and status
59
 
60
- The summary dataset count and Dataset coverage denominator use the same measured dataset set for the selected comparison profile, data type, and dataset selection; the default Overall view has 164 measured datasets. All 164 reviewed datasets remain searchable and selectable in the dataset browser. Dataset coverage can differ by method and profile; unavailable combinations show **No published measurements**, remain excluded from rankings, and are never converted to zero-valued results. The default family view selects the lowest-rate measured exact variant independently for each dataset only when every candidate for that dataset/family has the same eligible aggregate-id set; it can therefore choose different binaries across datasets. Ambiguous support sets are omitted. Switch to **Exact configuration** to inspect each fixed variant, support hash, source profile, and binary. Native server results use host/campaign/measurement-contract comparison profiles; exact adapter and binary identities remain visible and are never merged into one configuration.
61
 
62
  The Overall score is `a Γ— average rate + b Γ— normalized average compression time + c Γ— normalized average decompression time`. It is available only when displayed methods share one exact dataset/support signature. Average Rank compares methods within each matching `(dataset, eligible aggregate-id set)` cohort, applies dataset-local time normalization and fractional ties, then averages the available ranks. Missing, N/A, failed, and unlike-support rows are omitted. Coverage and candidate counts can differ; method details expose support hashes, dataset scores, ranks and candidate counts. CSV downloads include weights, support hashes, evidence status and rank coverage. The default weights are `a=0.4, b=0.3, c=0.3`.
63
 
64
- Compression and decompression costs are calculated independently for each usable numeric column as ns/point, then reported as the arithmetic mean across those columns; each column contributes equally. Overall timing pools all measured columns across the selected datasets when every selected dataset has column-level evidence. If any selected dataset/configuration is backed only by aggregate timing, the method uses an arithmetic mean of its selected per-dataset ns/point values, giving every dataset equal weight. Aggregate-only dataset timing uses recorded elapsed time divided by recorded points; these records keep a zero measured-column count. Truly missing measurements remain unavailable. Method details and CSV expose the timing basis. Native-float measurements use valid native values; historical imported rows retain their source 8-byte-equivalent point definition. Timing comparisons stay within the same host/campaign/measurement-contract comparison profile. Finite source timings with only diagnostic provenance are published as unavailable and cannot enter time or composite rankings.
65
 
66
- The server-166 terminal matrix contains all `164 Γ— 85 = 13,940` dataset/method pairs: 11,164 main pairs have at least one numeric aggregate, 2,274 are explicit N/A, and 502 ended with problems. Current V9 contributes receipt/result/cold-SHA-bound rate and byte replacements for 154 problem identities. Server 192 contributes 21 independently pair-verified replacements; one (`weather_data_bavaria/LZG`) overlaps V9. The union therefore repairs 174 problem identities and leaves 328 unresolved, including the separately scheduled `wids2023_competition_weather_forecasting/Shrinker` sidecar. Only result rows with `status=ok` and matching fresh-cold evidence enter numeric views; mixed-support pairs have no overall row. The old main profile's timing is admitted by a frozen source/build/binary/boundary proof. V9 and server-192 timings remain unavailable until their exact variants receive independent source/build/timing-boundary proof. Legacy source-snapshot timings with unspecified host or build boundary are also unavailable to timing and composite rankings; the six receipt-bound DBP `medium_posts` rows retain admitted timing. Server-192 results remain separate from server 166.
 
 
 
 
 
 
67
 
68
  The independent evidence review covers 773 archived strict-admission pairs. Its 147 non-adjudicated entries belong to the earlier 920-pair recovery bundle and retain the explicit `partial_verification_blocked` status; the site does not generalize that review to all 13,940 terminal pairs.
69
 
 
48
 
49
  ## Interface
50
 
51
+ - Overall and per-dataset leaderboards with C++ / Java / Python, data-type, precision, family, and method filters
52
  - Sortable metrics, optional columns, and CSV download of the selected ranking
53
  - Compression rate versus compression/decompression cost plots
54
  - Dataset-level method details, snapshot provenance, and metric definitions
 
57
  - Overall composite score and average dataset Rank, with 66 valid non-negative one-decimal weight combinations, including zero weights
58
  - Searchable Methods documentation and a 30-family operator catalog with 102 implementation-directory entries, references, I/O contracts, examples, and status
59
 
60
+ The summary dataset count and Dataset coverage denominator are derived from the selected language and data scope. The catalog remains 164 datasets; a selected result view can contain fewer numeric datasets because terminal N/A or unsupported conclusions are not converted to measurements. The C++ view uses the latest receipt-bound authority for each logical dataset/method pair. A newer terminal N/A or unsupported conclusion blocks fallback to an older numeric result. Earlier rows remain preserved in the immutable snapshot and evidence files, while method details and CSV retain the selected row's source family, source comparison profile, host, binary and measurement status. The default family view selects the lowest-rate measured exact variant independently for each dataset only when every candidate for that dataset/family has the same eligible aggregate-id set. Ambiguous support sets are omitted. Switch to **Exact configuration** to inspect fixed variants and provenance.
61
 
62
  The Overall score is `a Γ— average rate + b Γ— normalized average compression time + c Γ— normalized average decompression time`. It is available only when displayed methods share one exact dataset/support signature. Average Rank compares methods within each matching `(dataset, eligible aggregate-id set)` cohort, applies dataset-local time normalization and fractional ties, then averages the available ranks. Missing, N/A, failed, and unlike-support rows are omitted. Coverage and candidate counts can differ; method details expose support hashes, dataset scores, ranks and candidate counts. CSV downloads include weights, support hashes, evidence status and rank coverage. The default weights are `a=0.4, b=0.3, c=0.3`.
63
 
64
+ Compression and decompression costs are calculated independently for each usable numeric column as ns/point, then reported as the arithmetic mean across those columns; each column contributes equally. Strict timing is available only when every current rate dataset for that method has admitted timing under one valid workload. A separately labeled **timed subset** is shown when the current winning rows include admitted timing for only N of M rate datasets, and only when all N rows share one exact source profile, host and timing contract. The N/M coverage is displayed inline and exported to CSV. Timed-subset values never enter strict composite scores. Finite source timings with diagnostic or unbound provenance remain unavailable and are not borrowed from superseded rows.
65
 
66
+ The server-166 terminal matrix contains all `164 Γ— 85 = 13,940` dataset/method pairs. Later independently reviewed recovery, completion and corrected-input receipts can supersede those base pair results. The combined C++ rate view does not average timings across servers or campaigns. Main-profile timing is admitted by a frozen source/build/binary/boundary proof; recovery timing remains unavailable without the same proof. Source environments and original measurement statuses remain explicit provenance fields.
67
+
68
+ Java and Python rows retain their original comparison profile and use the explicit runtime host label already stored in the frozen browser payload. This metadata is never inferred from the selected UI language. The receipt-bound `medium_posts` DBP records keep their admitted timing; other imported timings remain diagnostic and unavailable to strict timing or composite scoring.
69
+
70
+ ## Combined C++ latest-result view
71
+
72
+ `cpp-latest-view.json` is an index-only, SHA-bound selection sidecar. It stores no copied or transformed measurement values. The frozen sidecar SHA-256 is `5d2a8bb4fb5c38fbc4fa130a08b7608c7568f3959ef9dd2706f245862907f90f`; it selects 26,834 compact rows, including 24,617 admitted-timing rows from one main-server timing contract. Each selected C++ row refers to an integer index in the unchanged `ui-data.json` compact table and records its canonical family, original family, source profile, runtime, host, authority and pair status. Pair-level campaign selection is atomic, so scopes absent from a newer winning campaign are tombstoned instead of backfilled from an older campaign. The browser verifies the sidecar SHA, frozen payload SHA, source-data SHA, index bounds, uniqueness, source family, language boundary and timing-admission index before rendering. A mismatch fails closed. FreshRetailNet-50K corrected full114 remains pending and is not represented as a newer accepted campaign.
73
 
74
  The independent evidence review covers 773 archived strict-admission pairs. Its 147 non-adjudicated entries belong to the earlier 920-pair recovery bundle and retain the explicit `partial_verification_blocked` status; the site does not generalize that review to all 13,940 terminal pairs.
75
 
app.js CHANGED
@@ -1,11 +1,12 @@
1
  import {WEIGHT_TENTHS,parseWeights,addRankingMetrics} from './ranking.js?v=20261011-support-matched-v1';
 
 
2
  const $ = (id) => document.getElementById(id);
3
  const escape = (value) => String(value ?? '').replace(/[&<>"']/g, (c) => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
4
  const number = (v) => v != null && Number.isFinite(Number(v)) ? Number(v) : null;
5
  const mean = (values) => { const a = values.map(number).filter((n) => n !== null); return a.length ? a.reduce((s,n) => s+n,0)/a.length : null; };
6
  function timingMode(input) {
7
- if(!input.length||input.some(r=>number(r.compression_time)===null||number(r.decompression_time)===null||!Number.isInteger(r.timing_column_count)||r.timing_column_count<0||!((r.timing_aggregation==='column_mean'&&r.timing_column_count>0)||(r.timing_aggregation==='dataset_aggregate'&&r.timing_column_count===0))))return 'unavailable';
8
- return input.some(r=>r.timing_aggregation==='dataset_aggregate')?'dataset_mean':'column_mean';
9
  }
10
  function aggregateTime(input,key) {
11
  const mode=timingMode(input);
@@ -13,33 +14,38 @@ function aggregateTime(input,key) {
13
  if(mode==='dataset_mean')return mean(input.map(r=>r[key]));
14
  return input.reduce((sum,r)=>sum+r[key]*r.timing_column_count,0)/input.reduce((sum,r)=>sum+r.timing_column_count,0);
15
  }
16
- const timingLabel=mode=>({column_mean:'Equal-column arithmetic mean',dataset_mean:'Equal-dataset arithmetic mean',dataset_aggregate:'Dataset aggregate',unavailable:'Not reported'}[mode]??'Not reported');
17
- const fmt = (v, digits=3) => number(v) === null ? 'Not reported' : Number(v).toLocaleString('en-US',{maximumFractionDigits:digits,minimumFractionDigits:digits});
18
  const countFmt = (v) => Number(v).toLocaleString('en-US');
19
- const runtimeName = (v) => snapshot?.benchmark?.runtime_labels?.[v] || ({cpp:'C++',java:'Java',python:'Python','cpp-native166':'Native C++ Β· server 166','cpp-native192':'Native C++ Β· server 192'}[v] || v);
20
- const runtimeHost = (v) => snapshot?.benchmark?.runtime_hosts?.[v] || ({'cpp-native166':'166','cpp-native192':'192'}[v] || 'source snapshot');
21
  const THULAB_DATASET_PREFIX='https://huggingface.co/datasets/THULab/';
22
  const requestedDataset=new URLSearchParams(location.search).get('dataset')?.trim()||'';
23
  let requestedDatasetApplied=false;
24
  const cols = [
25
- {key:'average_rank',label:'Average Rank ↓',digits:2,visible:true,overallOnly:true},
26
- {key:'rank_coverage',label:'Rank coverage',digits:0,visible:false,overallOnly:true},
27
- {key:'composite_score',label:'Composite score ↓',digits:4,visible:true,overallOnly:true},
28
- {key:'compression_rate',label:'Average rate ↓',digits:4,visible:true},
29
- {key:'overall_rate',label:'Overall rate ↓',digits:4,visible:false},
30
- {key:'compression_time',label:'Compress ns/point ↓',digits:2,visible:true},
31
- {key:'decompression_time',label:'Decompress ns/point ↓',digits:2,visible:true},
32
- {key:'normalized_compression_time',label:'Normalized compress ↓',digits:4,visible:false,overallOnly:true},
33
- {key:'normalized_decompression_time',label:'Normalized decompress ↓',digits:4,visible:false,overallOnly:true},
34
- {key:'timing_column_count',label:'Measured columns',digits:0,visible:false},
35
- {key:'compressed_bytes',label:'Compressed bytes',digits:0,visible:false},
36
- {key:'original_bytes',label:'Original bytes',digits:0,visible:false},
 
 
37
  ];
38
  let snapshot, records=[], methods=new Map(), datasets=new Map(), currentRows=[], activeTab='overall';
 
39
  let referenceCatalog=null,referenceCatalogError=null,datasetCatalog=null,datasetCatalogError=null;
40
  let operatorEffect=null,operatorEffectError=null;
41
  let sort={key:'compression_rate',direction:1};
42
  let selectedMethod=null;
 
 
43
  const state = () => ({runtime:$('runtime').value,dataset:$('dataset').value,dtype:$('dtype').value,precision:$('precision').value,family:$('family').value,mode:$('row-mode').value,search:$('search').value.trim().toLowerCase(),complete:$('complete-only').checked});
44
  function scopeKey() { const s=state(); return s.dtype==='overall'?'overall':s.dtype==='int'?'integer':s.precision==='fixed'?'fixed_float':s.precision==='non_fixed'?'nonfixed_float':'float'; }
45
  function normalizeRecord(r) {
@@ -62,6 +68,13 @@ function filteredRecords(ignoreMethod=false) {
62
  return ignoreMethod?result:result.filter(r=>(s.family==='all'||r.family===s.family)&&(!s.search||(s.mode==='family'?r.family:`${r.method} ${r.family}`).toLowerCase().includes(s.search)));
63
  }
64
  function coverageDatasetCount() { return new Set(filteredRecords(true).map(r=>r.dataset)).size; }
 
 
 
 
 
 
 
65
  function aggregate(input) {
66
  const groups=new Map();
67
  const exact=state().mode==='configuration',familiesByConfiguration=new Map();
@@ -73,25 +86,50 @@ function aggregate(input) {
73
  const configuration=source[0].method,method=exact&&familiesByConfiguration.get(configuration).size>1?`${source[0].family} Β· ${configuration}`:configuration;
74
  const hasBytes=source.every(r=>r.original_bytes!==null && r.original_bytes>0 && r.compressed_bytes!==null && r.compressed_bytes>0);
75
  const original=hasBytes?source.reduce((s,r)=>s+r.original_bytes,0):null, compressed=hasBytes?source.reduce((s,r)=>s+r.compressed_bytes,0):null;
76
- rows.push({method,family:source[0].family,runtime:source[0].runtime,compression_rate:mean(source.map(r=>r.compression_rate)),compression_time:aggregateTime(source,'compression_time'),decompression_time:aggregateTime(source,'decompression_time'),timing_column_count:source.reduce((sum,r)=>sum+r.timing_column_count,0),timing_aggregation:timingMode(source),overall_rate:hasBytes?compressed/original:null,original_bytes:original,compressed_bytes:compressed,coverage:new Set(source.map(r=>r.dataset)).size,totalDatasets,source});
 
77
  }
78
  const s=state();
79
- return addRankingMetrics(rows,parseWeights($('weights').value)).filter(r=>(s.family==='all'||r.family===s.family)&&(!s.search||(s.mode==='family'?r.family:`${r.method} ${r.family}`).toLowerCase().includes(s.search))&&(!s.complete||r.coverage===totalDatasets)).sort((a,b)=>{
80
  const av=number(a[sort.key]),bv=number(b[sort.key]);
81
  if(av===null&&bv===null)return a.method.localeCompare(b.method);
82
  if(av===null)return 1;if(bv===null)return -1;
83
  return sort.direction*(av-bv)||a.method.localeCompare(b.method);
84
  });
85
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  function renderTable() {
87
- const visible=cols.filter(c=>c.visible&&(!c.overallOnly||activeTab==='overall'));
 
88
  $('leaderboard').querySelector('thead').innerHTML=`<tr><th>Position</th><th>Method / configuration</th>${visible.map(c=>`<th aria-sort="${sort.key===c.key?(sort.direction===1?'ascending':'descending'):'none'}"><button data-sort="${c.key}" title="Sort ${escape(c.label)}">${escape(c.label)}${sort.key===c.key?(sort.direction===1?' β–΄':' β–Ύ'):''}</button></th>`).join('')}<th>Dataset coverage</th></tr>`;
89
  const minima=Object.fromEntries(visible.map(c=>[c.key,Math.min(...currentRows.map(r=>number(r[c.key])).filter(n=>n!==null))]));
90
- $('leaderboard').querySelector('tbody').innerHTML=currentRows.length?currentRows.map((r,i)=>`<tr><td class="rank numeric">${i+1}</td><td><button class="method-button" data-method="${escape(r.method)}">${escape(r.method)}</button><span class="method-family">${escape(r.family)} Β· ${escape(runtimeName(r.runtime))}</span></td>${visible.map(c=>`<td class="numeric ${!['compressed_bytes','original_bytes','rank_coverage','timing_column_count'].includes(c.key)&&number(r[c.key])!==null&&r[c.key]===minima[c.key]?'best':''}">${c.key==='rank_coverage'?`${r.rank_coverage} / ${r.totalDatasets}`:fmt(r[c.key],c.digits)}</td>`).join('')}<td><span class="coverage ${r.coverage===r.totalDatasets?'full':''}">${r.coverage} / ${r.totalDatasets}</span></td></tr>`).join(''):`<tr><td colspan="${visible.length+3}" class="empty-cell">No measurements match this selection. Try another runtime, data type, or dataset.</td></tr>`;
91
  for(const button of $('leaderboard').querySelectorAll('[data-sort]'))button.addEventListener('click',()=>{const key=button.dataset.sort;sort={key,direction:sort.key===key?-sort.direction:1};refresh();});
92
  for(const button of $('leaderboard').querySelectorAll('[data-method]'))button.addEventListener('click',()=>showMethod(button.dataset.method,true));
93
  $('row-count').textContent=`${currentRows.length} ${state().mode==='family'?'method families':'method configurations'} Β· sorted by ${cols.find(c=>c.key===sort.key)?.label??sort.key}`;
94
  $('download').disabled=!currentRows.length;
 
 
 
 
95
  }
96
  function refresh() {
97
  if(!snapshot)return;
@@ -105,13 +143,17 @@ function refresh() {
105
  $('results-note').textContent=`All-float measurements are not available in this snapshot. Select a precision category. ${columnCoverageNote}`;
106
  } else $('results-note').textContent=`${state().mode==='family'?'Each family uses its lowest-rate measured configuration only when that dataset/family has one exact support set; ambiguous support sets are omitted. Configurations may differ across datasets; use Exact configuration for fixed parameters.':'Each row retains one exact configuration and its eligible support-set hash. Lower compression rates and lower ns/point are better.'} ${columnCoverageNote}`;
107
  currentRows=aggregate(filteredRecords(true));
 
108
  const weights=parseWeights($('weights').value);
109
- const comparable=currentRows.length&&currentRows.every(r=>r.workload_signature_count<=1);
110
- $('score-note').textContent=`Score = ${weights[0].toFixed(1)} Γ— average rate + ${weights[1].toFixed(1)} Γ— normalized compress + ${weights[2].toFixed(1)} Γ— normalized decompress. Lower is better. ${comparable?'Composite scores use one shared dataset/support signature.':'Composite scores are withheld because the displayed methods do not share one exact dataset/support signature.'} Average Rank is computed only among rows with the same dataset and eligible aggregate-id support hash; ties share their average position. Missing, N/A, failed, and unlike-support results receive no rank. Compare rank coverage and inspect method details.`;
 
111
  const s=state(),scope=scopeKey(),measuredCount=coverageDatasetCount(),ds=s.dataset==='all'?`all ${measuredCount} measured datasets`:datasetDisplayName(s.dataset);
112
  $('dataset-count').textContent=countFmt(measuredCount);$('dataset-count-label').textContent='measured datasets';
 
113
  const names={overall:'available numeric measurements',integer:'integer columns',float:'floating-point columns',fixed_float:'fixed-precision float columns',nonfixed_float:'non-fixed-precision float columns'};
114
  $('selection-summary').textContent=`${runtimeName(s.runtime)} Β· ${names[scope]||scope} Β· ${ds} Β· ${currentRows.length} methods`;
 
115
  $('view-title').textContent=activeTab==='dataset'?`${s.dataset==='all'?'Dataset':datasetDisplayName(s.dataset)} leaderboard`:activeTab==='tradeoffs'?'Storage and execution trade-offs':'Overall leaderboard';
116
  const selectedEntry=s.dataset==='all'?null:datasets.get(s.dataset),selectedDatasetUrl=thulabDatasetUrl(selectedEntry),selectedBadge=$('selected-dataset-badge');
117
  selectedBadge.hidden=!selectedDatasetUrl;
@@ -138,12 +180,14 @@ function showMethod(method,focus=false) {
138
  if(!row){selectedMethod=null;detail.hidden=true;return;}selectedMethod=method;
139
  const meta=methods.get(method)??methods.get(row.source[0].configuration), pipeline=meta?.operator_pipeline;
140
  const source=row.source.slice().sort((a,b)=>a.dataset.localeCompare(b.dataset));
141
- detail.innerHTML=`<div class="detail-head"><div><h2 id="detail-title">${escape(method)}</h2><p class="muted">${escape(row.family)} Β· ${escape(runtimeName(row.runtime))} Β· ${row.coverage} measured datasets</p></div><button id="close-detail" class="quiet-button">Close details</button></div><div class="detail-grid"><div><strong>${fmt(row.compression_rate,4)}</strong><span>average compression rate</span></div><div><strong>${fmt(row.compression_time,2)}</strong><span>Compress ns/point</span></div><div><strong>${fmt(row.decompression_time,2)}</strong><span>Decompress ns/point</span></div><div><strong>${row.coverage} / ${row.totalDatasets}</strong><span>dataset coverage</span></div></div>${pipeline?`<p class="source-code">Interpretive operator mapping: ${escape(typeof pipeline==='string'?pipeline:JSON.stringify(pipeline))}</p>`:''}<p class="muted">Timing average: ${escape(timingLabel(row.timing_aggregation))}. Dataset metrics below come from the published result files. Measurement boundaries, matched support-set hashes, source hashes, and available verification evidence are recorded in the manifest.</p><div class="detail-table"><table><thead><tr><th>Dataset</th><th>Configuration</th><th>Rate ↓</th><th>Compress ns/point ↓</th><th>Decompress ns/point ↓</th><th>Timing basis</th><th>Measurement evidence</th><th>Timing profile</th><th>Source profile / binary</th><th>Support set</th><th>Original bytes</th><th>Compressed bytes</th><th>Dataset score ↓</th><th>Dataset Rank ↓</th><th>Rank candidates</th></tr></thead><tbody>${source.map(r=>`<tr><td>${escape(r.dataset)}</td><td>${escape(r.configuration)}</td><td class="numeric">${fmt(r.compression_rate,4)}</td><td class="numeric">${fmt(r.compression_time,2)}</td><td class="numeric">${fmt(r.decompression_time,2)}</td><td>${escape(timingLabel(r.timing_aggregation))}</td><td>${escape(r.measurement_status)}</td><td>${escape(r.timing_profile_status)}</td><td class="source-code">${escape(r.source_runtime)} / ${escape(String(r.binary_sha256).slice(0,16))}</td><td class="source-code">${escape(String(r.eligible_column_set_sha256).slice(0,16))}</td><td class="numeric">${fmt(r.original_bytes,0)}</td><td class="numeric">${fmt(r.compressed_bytes,0)}</td><td class="numeric">${fmt(r.dataset_score,4)}</td><td class="numeric">${fmt(r.dataset_rank,2)}</td><td class="numeric">${fmt(r.dataset_candidate_count,0)}</td></tr>`).join('')}</tbody></table></div>`;
 
142
  detail.hidden=false;$('close-detail').addEventListener('click',()=>{detail.hidden=true;selectedMethod=null;});
143
  if(focus){detail.scrollIntoView({block:'nearest',behavior:'auto'});detail.focus({preventScroll:true});}
144
  }
145
  function renderChart() {
146
  const metric=$('chart-metric').value;
 
147
  const valid=currentRows.filter(r=>r.compression_rate>0&&r[metric]>0);
148
  if(!valid.length){$('chart').innerHTML='<p class="chart-empty muted">No positive measurements to plot for this selection.</p>';return;}
149
  const width=1100,height=410,pad={left:85,right:35,top:30,bottom:65};
@@ -153,16 +197,16 @@ function renderChart() {
153
  let graph='';
154
  for(let i=0;i<=5;i++){const rate=maxRate*i/5,px=x(rate);graph+=`<line class="gridline" x1="${px}" y1="${pad.top}" x2="${px}" y2="${height-pad.bottom}"/><text class="axis-label" x="${px}" y="${height-pad.bottom+25}" text-anchor="middle">${fmt(rate,2)}</text>`;}
155
  for(let i=minLog;i<=maxLog;i++){const n=10**i,py=y(n);graph+=`<line class="gridline" x1="${pad.left}" y1="${py}" x2="${width-pad.right}" y2="${py}"/><text class="axis-label" x="${pad.left-12}" y="${py+4}" text-anchor="end">${n.toLocaleString('en-US',{maximumFractionDigits:3})}</text>`;}
156
- for(const r of valid)graph+=`<circle class="point" tabindex="0" role="button" aria-label="${escape(r.method)}: compression rate ${fmt(r.compression_rate,4)}, ${metric==='compression_time'?'compression':'decompression'} ${fmt(r[metric],2)} ns per point" data-method="${escape(r.method)}" cx="${x(r.compression_rate)}" cy="${y(r[metric])}" r="6"><title>${escape(r.method)} | rate ${fmt(r.compression_rate,4)} | ${fmt(r[metric],2)} ns/point | coverage ${r.coverage}/${r.totalDatasets}</title></circle>`;
157
- graph+=`<text class="axis-label" x="${width/2}" y="${height-13}" text-anchor="middle">Average compression rate (compressed / original) ↓</text><text class="axis-label" transform="translate(20 ${height/2}) rotate(-90)" text-anchor="middle">${metric==='compression_time'?'Compress':'Decompress'} ns/point (log scale) ↓</text>`;
158
- $('chart').innerHTML=`<svg viewBox="0 0 ${width} ${height}" role="img" aria-label="Measured compression rates versus ${metric==='compression_time'?'compression':'decompression'} cost">${graph}</svg>`;
159
  for(const p of $('chart').querySelectorAll('[data-method]')){p.addEventListener('click',()=>showMethod(p.dataset.method,true));p.addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();showMethod(p.dataset.method,true);}});}
160
  }
161
  function csv() {
162
  const quote=v=>{let text=String(v??'');if(typeof v==='string'&&/^[=+@-]/.test(text))text="'"+text;return `"${text.replace(/"/g,'""')}"`;};
163
  const weights=parseWeights($('weights').value);
164
- const columns=['position','method','comparison_profile','execution_host','scope','row_mode','selected_dataset','sort_metric','sort_direction','average_compression_rate','overall_compression_rate','compress_ns_per_point','decompress_ns_per_point','weight_a','weight_b','weight_c','normalized_compress','normalized_decompress','composite_score','average_rank','rank_dataset_coverage','normalization_reference_rows','compress_min','compress_max','decompress_min','decompress_max','normalization','rank_definition','dataset_coverage','datasets_in_scope','selected_configuration_by_dataset','source_profile_by_dataset','binary_sha256_by_dataset','eligible_column_set_sha256_by_dataset','measurement_status_by_dataset','timing_profile_status_by_dataset','timing_column_count','timing_aggregation'];
165
- const body=currentRows.map((r,i)=>[i+1,r.method,r.runtime,runtimeHost(r.runtime),scopeKey(),state().mode,state().dataset,sort.key,sort.direction===1?'ascending':'descending',r.compression_rate,r.overall_rate,r.compression_time,r.decompression_time,...weights.map(w=>w.toFixed(1)),r.normalized_compression_time,r.normalized_decompression_time,r.composite_score,r.average_rank,r.rank_coverage,r.normalization_reference_rows,r.encode_min,r.encode_max,r.decode_min,r.decode_max,'min-max over all measured rows in selected comparison profile/scope/row-mode before search and visibility filters','mean per-dataset composite-score fractional rank; per-dataset min-max times',r.coverage,r.totalDatasets,JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.configuration]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.source_runtime]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.binary_sha256]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.eligible_column_set_sha256]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.measurement_status]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.timing_profile_status]))),r.timing_column_count,r.timing_aggregation].map(quote).join(','));
166
  const url=URL.createObjectURL(new Blob(['\ufeff'+[columns.join(','),...body].join('\r\n')],{type:'text/csv;charset=utf-8'}));const a=document.createElement('a');a.href=url;a.download=`THULab-compression-${state().runtime}-${scopeKey()}-${state().dataset}.csv`;a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);
167
  }
168
  function safeHttpUrl(value) {
@@ -326,11 +370,44 @@ function renderAbout() {
326
  const exclusions=c.exclusions||c.excluded_datasets||snapshot.exclusions||[];
327
  const catalogCount=number(datasetCatalog?.summary?.dataset_count??c.catalog_dataset_count)??datasetEntries().length,measuredCount=number(datasetCatalog?.summary?.published_result_dataset_count??datasetCatalog?.summary?.published_measurement_dataset_count??datasetCatalog?.summary?.measured_dataset_count??c.measured_dataset_count)??new Set(records.map(r=>r.dataset)).size;
328
  const terminal=c.native86_terminal_coverage||{};
329
- const info={ 'Snapshot exported':snapshot.exported_at||s.exported_at||'Not reported','Dataset catalog':`${catalogCount} datasets; ${measuredCount} currently have published measurements and participate in rankings`,'Native86 server-166 terminal matrix':terminal.expected_pair_count?`${terminal.observed_pair_count} / ${terminal.expected_pair_count} dataset-method pairs; ${terminal.numeric_pair_count??0} contain published numeric aggregates, ${terminal.not_applicable_pair_count??0} are explicit N/A, ${terminal.problem_pair_count??0} ended with a failure status`:'See manifest and terminal coverage download','Dataset scope generated':s.generated_at||'Not reported', 'Source checkout':s.git_commit||'Not reported','Source files':`${s.source_files?.length??0} metadata inputs and ${s.result_csv_files_used?.length??0} result CSVs (hashes in manifest)`,'Result entries across scopes':`${records.length} (scope slices can reuse a measurement)`,'Worktree source state':s.worktree_dirty_inputs?.length?'Includes current local changes; input file hashes identify the published snapshot.':'See manifest for source file hashes.','Runtime environment':b.hardware||'Hardware details are not recorded in this exported result snapshot.','Lossless evidence':b.roundtrip_evidence||'Lossless-design method filter from the source project; per-run round-trip verification is not recorded here.'};
330
  $('provenance').innerHTML=`<table class="provenance-table"><tbody>${Object.entries(info).map(([k,v])=>`<tr><th>${escape(k)}</th><td class="source-code">${escape(v)}</td></tr>`).join('')}</tbody></table>${exclusions.length?`<h3>Excluded or unavailable results</h3><p class="source-code">${escape(typeof exclusions==='string'?exclusions:JSON.stringify(exclusions))}</p>`:''}`;
331
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  function init() {
333
- if(snapshot.compact_records){const t=snapshot.record_tables;snapshot.dataset_results=snapshot.compact_records.map(r=>({dataset:t.datasets[r[0]],scope:t.scopes[r[1]],runtime:t.runtimes[r[2]],comparison_profile:t.comparison_profiles[r[3]],family:t.families[r[4]],method:t.configurations[r[5]],algorithm_variant:t.configurations[r[5]],compression_rate:r[6],compression_time_ns_per_point:r[7],decompression_time_ns_per_point:r[8],original_size_bytes:r[9],compressed_size_bytes:r[10],timing_column_count:r[11],timing_aggregation:t.timing_aggregations[r[12]],eligible_column_set_sha256:t.support_sets[r[13]],measurement_status:t.measurement_statuses[r[14]],timing_profile_status:t.timing_statuses[r[15]],binary_sha256:t.binary_hashes[r[16]]}));delete snapshot.compact_records;}
334
  for(const m of snapshot.methods||[]) { const method=typeof m==='string'?{name:m}:m;methods.set(method.name??method.method,method);for(const c of method.configurations||[])methods.set(c.algorithm_variant,{...method,name:c.algorithm_variant,family:method.name}); }
335
  for(const d of snapshot.datasets||[])datasets.set(d.key??d.dataset,d);
336
  records=(snapshot.dataset_results||snapshot.records||[]).map(normalizeRecord).filter(r=>r.method&&r.dataset&&r.compression_rate>0);
@@ -340,16 +417,21 @@ function init() {
340
  $('runtime').innerHTML=runtimes.map(r=>`<option value="${escape(r)}">${escape(runtimeName(r))}</option>`).join('');
341
  const requestedProfile=new URLSearchParams(location.search).get('profile');
342
  if(runtimes.includes(requestedProfile))$('runtime').value=requestedProfile;
 
 
343
  populateDatasetControls();
344
- $('family').innerHTML='<option value="all">All method families</option>'+[...new Set(records.map(r=>r.family))].sort().map(f=>`<option value="${escape(f)}">${escape(f)}</option>`).join('');
345
- $('method-count').textContent=countFmt(new Set(records.map(r=>r.family)).size);$('runtime-count').textContent=runtimes.length;$('record-count').textContent=countFmt(snapshot.coverage?.runtime_configuration_count??new Set(records.map(r=>`${r.runtime}\0${r.method}`)).size);
346
- const exported=snapshot.exported_at||snapshot.source?.exported_at||'not reported';$('snapshot').textContent=`Result snapshot exported Β· ${String(exported).replace('T',' ').slice(0,19)}${exported==='not reported'?'':' UTC'}`;$('footer-snapshot').textContent=`Source inputs documented in the manifest`;
347
- $('column-options').innerHTML=cols.map(c=>`<label><input type="checkbox" data-column="${c.key}" ${c.visible?'checked':''}>${escape(c.label)}</label>`).join('');
348
  $('weights').innerHTML=WEIGHT_TENTHS.map(w=>`<option value="${w.join(',')}" ${w.join(',')==='4,3,3'?'selected':''}>a = ${(w[0]/10).toFixed(1)} Β· b = ${(w[1]/10).toFixed(1)} Β· c = ${(w[2]/10).toFixed(1)}</option>`).join('');
349
  $('weights').addEventListener('change',refresh);
350
- for(const input of $('column-options').querySelectorAll('input'))input.addEventListener('change',()=>{cols.find(c=>c.key===input.dataset.column).visible=input.checked;renderTable();});
351
- for(const id of ['runtime','dtype','precision','family','row-mode','complete-only'])$(id).addEventListener('change',refresh);$('dataset').addEventListener('change',()=>{updateUrlState();refresh();if(activeTab==='dataset')renderDatasetCatalog();});$('search').addEventListener('input',refresh);$('chart-metric').addEventListener('change',renderChart);$('download').addEventListener('click',csv);
352
- $('reset').addEventListener('click',()=>{$('runtime').value=runtimes.includes('cpp')?'cpp':runtimes[0];$('dtype').value='overall';$('precision').value='all';$('dataset').value='all';$('row-mode').value='family';$('search').value='';$('family').value='all';$('weights').value='4,3,3';$('complete-only').checked=false;selectedMethod=null;$('method-detail').hidden=true;sort={key:'compression_rate',direction:1};setTab(activeTab);});
 
 
 
353
  for(const tab of document.querySelectorAll('[data-tab]'))tab.addEventListener('click',()=>setTab(tab.dataset.tab));
354
  $('method-doc-search').addEventListener('input',renderMethodDocumentation);$('operator-doc-search').addEventListener('input',renderOperatorDocumentation);$('dataset-catalog-search').addEventListener('input',renderDatasetCatalog);$('dataset-group-filter').addEventListener('change',renderDatasetCatalog);
355
  renderAbout();renderDocumentationViews();renderDatasetCatalog();setTab(location.hash.slice(1)||(requestedDataset&&$('dataset').value===requestedDataset?'dataset':'overall'));
@@ -357,6 +439,7 @@ function init() {
357
  }
358
  function updateUrlState() {
359
  const url=new URL(location.href);url.hash=activeTab;
 
360
  const selected=$('dataset')?.value;
361
  if(selected&&selected!=='all')url.searchParams.set('dataset',selected);else url.searchParams.delete('dataset');
362
  history.replaceState(null,'',`${url.pathname}${url.search}${url.hash}`);
@@ -372,5 +455,14 @@ setupTheme();
372
  void loadReferenceCatalog();
373
  void loadOperatorEffect();
374
  void loadDatasetCatalog();
375
- try { const response=await fetch('./ui-data.json?v=20261013-corrected-five-v1',{cache:'no-cache'});if(!response.ok)throw new Error(`Snapshot request returned ${response.status}`);snapshot=await response.json();init(); }
 
 
 
 
 
 
 
 
 
376
  catch(e){$('load-error').hidden=false;$('load-error').textContent=`The result snapshot could not be loaded. Please reload the page or download the JSON from the repository. ${e.message}`;$('snapshot').textContent='Snapshot unavailable';$('leaderboard').querySelector('tbody').innerHTML='<tr><td class="empty-cell">Results unavailable.</td></tr>';}
 
1
  import {WEIGHT_TENTHS,parseWeights,addRankingMetrics} from './ranking.js?v=20261011-support-matched-v1';
2
+ import {DEFAULT_PROFILE,profileLabel,defaultColumnVisible,metricAvailability,summarizeAvailability,visibleColumns,profileScopeText,aggregateTimedSubset,strictTimingMode} from './availability.js?v=20261013-overall-availability-v3';
3
+ const CPP_LATEST_VIEW_SHA256='5d2a8bb4fb5c38fbc4fa130a08b7608c7568f3959ef9dd2706f245862907f90f';
4
  const $ = (id) => document.getElementById(id);
5
  const escape = (value) => String(value ?? '').replace(/[&<>"']/g, (c) => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
6
  const number = (v) => v != null && Number.isFinite(Number(v)) ? Number(v) : null;
7
  const mean = (values) => { const a = values.map(number).filter((n) => n !== null); return a.length ? a.reduce((s,n) => s+n,0)/a.length : null; };
8
  function timingMode(input) {
9
+ return strictTimingMode(input);
 
10
  }
11
  function aggregateTime(input,key) {
12
  const mode=timingMode(input);
 
14
  if(mode==='dataset_mean')return mean(input.map(r=>r[key]));
15
  return input.reduce((sum,r)=>sum+r[key]*r.timing_column_count,0)/input.reduce((sum,r)=>sum+r.timing_column_count,0);
16
  }
17
+ const timingLabel=mode=>({column_mean:'Equal-column arithmetic mean',dataset_mean:'Equal-dataset arithmetic mean',dataset_aggregate:'Dataset aggregate',unavailable:'Unavailable'}[mode]??'Unavailable');
18
+ const fmt = (v, digits=3) => number(v) === null ? 'Unavailable' : Number(v).toLocaleString('en-US',{maximumFractionDigits:digits,minimumFractionDigits:digits});
19
  const countFmt = (v) => Number(v).toLocaleString('en-US');
20
+ const runtimeName = (v) => profileLabel(v,snapshot?.benchmark?.runtime_labels?.[v] || ({cpp:'C++',java:'Java',python:'Python','cpp-native166':'Native C++ Β· server 166','cpp-native192':'Native C++ Β· server 192'}[v] || v));
21
+ const runtimeHost = (v) => v==='cpp'?'multiple source environments; see per-dataset provenance':snapshot?.benchmark?.runtime_hosts?.[v] || ({'cpp-native166':'166','cpp-native192':'192'}[v] || 'source snapshot');
22
  const THULAB_DATASET_PREFIX='https://huggingface.co/datasets/THULab/';
23
  const requestedDataset=new URLSearchParams(location.search).get('dataset')?.trim()||'';
24
  let requestedDatasetApplied=false;
25
  const cols = [
26
+ {key:'average_rank',label:'Average Rank ↓',digits:2,visible:true,defaultVisible:true,overallOnly:true},
27
+ {key:'rank_coverage',label:'Rank coverage',digits:0,visible:true,defaultVisible:true,overallOnly:true},
28
+ {key:'composite_score',label:'Composite score ↓',digits:4,visible:true,defaultVisible:true,overallOnly:true},
29
+ {key:'compression_rate',label:'Average rate ↓',digits:4,visible:true,defaultVisible:true},
30
+ {key:'overall_rate',label:'Overall rate ↓',digits:4,visible:false,defaultVisible:false},
31
+ {key:'compression_time',label:'Compress ns/point ↓',digits:2,visible:true,defaultVisible:true},
32
+ {key:'decompression_time',label:'Decompress ns/point ↓',digits:2,visible:true,defaultVisible:true},
33
+ {key:'compression_time_timed_subset',label:'Compress ns/point Β· timed subset ↓',digits:2,visible:true,defaultVisible:true},
34
+ {key:'decompression_time_timed_subset',label:'Decompress ns/point Β· timed subset ↓',digits:2,visible:true,defaultVisible:true},
35
+ {key:'normalized_compression_time',label:'Normalized compress ↓',digits:4,visible:false,defaultVisible:false,overallOnly:true},
36
+ {key:'normalized_decompression_time',label:'Normalized decompress ↓',digits:4,visible:false,defaultVisible:false,overallOnly:true},
37
+ {key:'timing_column_count',label:'Measured columns',digits:0,visible:false,defaultVisible:false},
38
+ {key:'compressed_bytes',label:'Compressed bytes',digits:0,visible:false,defaultVisible:false},
39
+ {key:'original_bytes',label:'Original bytes',digits:0,visible:false,defaultVisible:false},
40
  ];
41
  let snapshot, records=[], methods=new Map(), datasets=new Map(), currentRows=[], activeTab='overall';
42
+ let cppLatestView=null;
43
  let referenceCatalog=null,referenceCatalogError=null,datasetCatalog=null,datasetCatalogError=null;
44
  let operatorEffect=null,operatorEffectError=null;
45
  let sort={key:'compression_rate',direction:1};
46
  let selectedMethod=null;
47
+ const touchedColumns=new Set();
48
+ let legacyProfileRequested='';
49
  const state = () => ({runtime:$('runtime').value,dataset:$('dataset').value,dtype:$('dtype').value,precision:$('precision').value,family:$('family').value,mode:$('row-mode').value,search:$('search').value.trim().toLowerCase(),complete:$('complete-only').checked});
50
  function scopeKey() { const s=state(); return s.dtype==='overall'?'overall':s.dtype==='int'?'integer':s.precision==='fixed'?'fixed_float':s.precision==='non_fixed'?'nonfixed_float':'float'; }
51
  function normalizeRecord(r) {
 
68
  return ignoreMethod?result:result.filter(r=>(s.family==='all'||r.family===s.family)&&(!s.search||(s.mode==='family'?r.family:`${r.method} ${r.family}`).toLowerCase().includes(s.search)));
69
  }
70
  function coverageDatasetCount() { return new Set(filteredRecords(true).map(r=>r.dataset)).size; }
71
+ function populateFamilyControl() {
72
+ const control=$('family');if(!control)return;
73
+ const selected=control.value,scope=scopeKey(),runtime=$('runtime').value;
74
+ const families=[...new Set(records.filter(record=>record.runtime===runtime&&record.scope===scope).map(record=>record.family))].sort((a,b)=>a.localeCompare(b));
75
+ control.innerHTML='<option value="all">All method families</option>'+families.map(family=>`<option value="${escape(family)}">${escape(family)}</option>`).join('');
76
+ control.value=families.includes(selected)?selected:'all';
77
+ }
78
  function aggregate(input) {
79
  const groups=new Map();
80
  const exact=state().mode==='configuration',familiesByConfiguration=new Map();
 
86
  const configuration=source[0].method,method=exact&&familiesByConfiguration.get(configuration).size>1?`${source[0].family} Β· ${configuration}`:configuration;
87
  const hasBytes=source.every(r=>r.original_bytes!==null && r.original_bytes>0 && r.compressed_bytes!==null && r.compressed_bytes>0);
88
  const original=hasBytes?source.reduce((s,r)=>s+r.original_bytes,0):null, compressed=hasBytes?source.reduce((s,r)=>s+r.compressed_bytes,0):null;
89
+ const timedSubset=aggregateTimedSubset(source);
90
+ rows.push({method,family:source[0].family,runtime:source[0].runtime,compression_rate:mean(source.map(r=>r.compression_rate)),compression_time:aggregateTime(source,'compression_time'),decompression_time:aggregateTime(source,'decompression_time'),timing_column_count:source.reduce((sum,r)=>sum+(Number.isInteger(r.timing_column_count)?r.timing_column_count:0),0),timing_aggregation:timingMode(source),overall_rate:hasBytes?compressed/original:null,original_bytes:original,compressed_bytes:compressed,coverage:new Set(source.map(r=>r.dataset)).size,totalDatasets,source,...timedSubset});
91
  }
92
  const s=state();
93
+ return addRankingMetrics(rows,parseWeights($('weights').value)).map(row=>row.normalization_reference_rows>=2?row:{...row,normalized_compression_time:null,normalized_decompression_time:null,composite_score:null}).filter(r=>(s.family==='all'||r.family===s.family)&&(!s.search||(s.mode==='family'?r.family:`${r.method} ${r.family}`).toLowerCase().includes(s.search))&&(!s.complete||r.coverage===totalDatasets)).sort((a,b)=>{
94
  const av=number(a[sort.key]),bv=number(b[sort.key]);
95
  if(av===null&&bv===null)return a.method.localeCompare(b.method);
96
  if(av===null)return 1;if(bv===null)return -1;
97
  return sort.direction*(av-bv)||a.method.localeCompare(b.method);
98
  });
99
  }
100
+ function requestedColumns() {
101
+ const profile=state().runtime;
102
+ return cols.filter(column => touchedColumns.has(column.key)?column.visible:defaultColumnVisible(profile,column));
103
+ }
104
+ function syncColumnOptions() {
105
+ for(const input of $('column-options').querySelectorAll('input')){
106
+ const column=cols.find(item=>item.key===input.dataset.column);
107
+ input.checked=touchedColumns.has(column.key)?column.visible:defaultColumnVisible(state().runtime,column);
108
+ }
109
+ }
110
+ function metricCell(row,column) {
111
+ if(column.key==='rank_coverage'&&number(row[column.key])!==null)return `${row.rank_coverage} / ${row.totalDatasets}`;
112
+ if(number(row[column.key])!==null){
113
+ const subset=['compression_time_timed_subset','decompression_time_timed_subset'].includes(column.key);
114
+ return `${fmt(row[column.key],column.digits)}${subset?` <span class="metric-coverage" title="Timed subset coverage">${row.timing_subset_coverage} / ${row.timing_subset_denominator}</span>`:''}`;
115
+ }
116
+ const unavailable=metricAvailability(row,column.key);
117
+ return `<span class="unavailable-value" title="${escape(unavailable.detail)}">${escape(unavailable.short)}</span>`;
118
+ }
119
  function renderTable() {
120
+ const eligibleColumns=cols.filter(c=>!c.overallOnly||activeTab==='overall');
121
+ const visible=visibleColumns(eligibleColumns,currentRows,state().runtime,$('show-unavailable-columns').checked,touchedColumns);
122
  $('leaderboard').querySelector('thead').innerHTML=`<tr><th>Position</th><th>Method / configuration</th>${visible.map(c=>`<th aria-sort="${sort.key===c.key?(sort.direction===1?'ascending':'descending'):'none'}"><button data-sort="${c.key}" title="Sort ${escape(c.label)}">${escape(c.label)}${sort.key===c.key?(sort.direction===1?' β–΄':' β–Ύ'):''}</button></th>`).join('')}<th>Dataset coverage</th></tr>`;
123
  const minima=Object.fromEntries(visible.map(c=>[c.key,Math.min(...currentRows.map(r=>number(r[c.key])).filter(n=>n!==null))]));
124
+ $('leaderboard').querySelector('tbody').innerHTML=currentRows.length?currentRows.map((r,i)=>`<tr><td class="rank numeric">${i+1}</td><td><button class="method-button" data-method="${escape(r.method)}">${escape(r.method)}</button><span class="method-family">${escape(r.family)} Β· ${escape(runtimeName(r.runtime))}</span></td>${visible.map(c=>`<td class="numeric ${!['compressed_bytes','original_bytes','rank_coverage','timing_column_count'].includes(c.key)&&number(r[c.key])!==null&&r[c.key]===minima[c.key]?'best':''}">${metricCell(r,c)}</td>`).join('')}<td><span class="coverage ${r.coverage===r.totalDatasets?'full':''}">${r.coverage} / ${r.totalDatasets}</span></td></tr>`).join(''):`<tr><td colspan="${visible.length+3}" class="empty-cell">No measurements match this selection. Try another runtime, data type, or dataset.</td></tr>`;
125
  for(const button of $('leaderboard').querySelectorAll('[data-sort]'))button.addEventListener('click',()=>{const key=button.dataset.sort;sort={key,direction:sort.key===key?-sort.direction:1};refresh();});
126
  for(const button of $('leaderboard').querySelectorAll('[data-method]'))button.addEventListener('click',()=>showMethod(button.dataset.method,true));
127
  $('row-count').textContent=`${currentRows.length} ${state().mode==='family'?'method families':'method configurations'} Β· sorted by ${cols.find(c=>c.key===sort.key)?.label??sort.key}`;
128
  $('download').disabled=!currentRows.length;
129
+ const availability=summarizeAvailability(currentRows,requestedColumns());
130
+ const visibleKeys=new Set(visible.map(column=>column.key)),hiddenLabels=requestedColumns().filter(column=>!visibleKeys.has(column.key)).map(column=>column.label.replace(' ↓',''));
131
+ const timedSubsetRows=currentRows.filter(row=>number(row.compression_time_timed_subset)!==null&&number(row.decompression_time_timed_subset)!==null).length;
132
+ $('availability-summary').textContent=`Availability: ${availability.parts.join(' Β· ')} Β· ${timedSubsetRows}/${availability.total} timed-subset rows (each cell shows timed datasets / current rate datasets).${availability.reasons.length?` ${availability.reasons.join('; ')}.`:''}${hiddenLabels.length&&!$('show-unavailable-columns').checked?` Hidden columns without complete row coverage: ${hiddenLabels.join(', ')}. Use β€œShow unavailable metric columns” to inspect their explicit reasons.`:''}`;
133
  }
134
  function refresh() {
135
  if(!snapshot)return;
 
143
  $('results-note').textContent=`All-float measurements are not available in this snapshot. Select a precision category. ${columnCoverageNote}`;
144
  } else $('results-note').textContent=`${state().mode==='family'?'Each family uses its lowest-rate measured configuration only when that dataset/family has one exact support set; ambiguous support sets are omitted. Configurations may differ across datasets; use Exact configuration for fixed parameters.':'Each row retains one exact configuration and its eligible support-set hash. Lower compression rates and lower ns/point are better.'} ${columnCoverageNote}`;
145
  currentRows=aggregate(filteredRecords(true));
146
+ syncColumnOptions();
147
  const weights=parseWeights($('weights').value);
148
+ const scoreAvailability=summarizeAvailability(currentRows,cols);
149
+ const scoreStatus=!currentRows.length?'No candidate rows are visible; comparability is not inferred.':scoreAvailability.counts.composite_score===currentRows.length?'Composite scores use one complete exact dataset/support signature.':`Composite scores are withheld: ${scoreAvailability.reasons.length?scoreAvailability.reasons.join('; '):'a complete eligible normalization cohort is unavailable'}.`;
150
+ $('score-note').textContent=`Score = ${weights[0].toFixed(1)} Γ— average rate + ${weights[1].toFixed(1)} Γ— normalized compress + ${weights[2].toFixed(1)} Γ— normalized decompress. Lower is better. ${scoreStatus} Average Rank is computed only among rows with the same dataset and eligible aggregate-id support hash; ties share their average position. Missing, N/A, failed, and unlike-support results receive no rank.`;
151
  const s=state(),scope=scopeKey(),measuredCount=coverageDatasetCount(),ds=s.dataset==='all'?`all ${measuredCount} measured datasets`:datasetDisplayName(s.dataset);
152
  $('dataset-count').textContent=countFmt(measuredCount);$('dataset-count-label').textContent='measured datasets';
153
+ $('method-count').textContent=countFmt(new Set(records.filter(record=>record.runtime===s.runtime&&record.scope===scope).map(record=>record.family)).size);
154
  const names={overall:'available numeric measurements',integer:'integer columns',float:'floating-point columns',fixed_float:'fixed-precision float columns',nonfixed_float:'non-fixed-precision float columns'};
155
  $('selection-summary').textContent=`${runtimeName(s.runtime)} Β· ${names[scope]||scope} Β· ${ds} Β· ${currentRows.length} methods`;
156
+ $('profile-scope-note').textContent=profileScopeText({profile:s.runtime,measuredDatasets:measuredCount,catalogDatasets:datasetEntries().length})+(legacyProfileRequested?` The requested historical profile β€œ${legacyProfileRequested}” is now included in the combined C++ view; this is not an environment-specific view.`:'');
157
  $('view-title').textContent=activeTab==='dataset'?`${s.dataset==='all'?'Dataset':datasetDisplayName(s.dataset)} leaderboard`:activeTab==='tradeoffs'?'Storage and execution trade-offs':'Overall leaderboard';
158
  const selectedEntry=s.dataset==='all'?null:datasets.get(s.dataset),selectedDatasetUrl=thulabDatasetUrl(selectedEntry),selectedBadge=$('selected-dataset-badge');
159
  selectedBadge.hidden=!selectedDatasetUrl;
 
180
  if(!row){selectedMethod=null;detail.hidden=true;return;}selectedMethod=method;
181
  const meta=methods.get(method)??methods.get(row.source[0].configuration), pipeline=meta?.operator_pipeline;
182
  const source=row.source.slice().sort((a,b)=>a.dataset.localeCompare(b.dataset));
183
+ const strictCompress=metricCell(row,cols.find(column=>column.key==='compression_time')),strictDecompress=metricCell(row,cols.find(column=>column.key==='decompression_time')),subsetCompress=metricCell(row,cols.find(column=>column.key==='compression_time_timed_subset')),subsetDecompress=metricCell(row,cols.find(column=>column.key==='decompression_time_timed_subset'));
184
+ detail.innerHTML=`<div class="detail-head"><div><h2 id="detail-title">${escape(method)}</h2><p class="muted">${escape(row.family)} Β· ${escape(runtimeName(row.runtime))} Β· ${row.coverage} measured datasets</p></div><button id="close-detail" class="quiet-button">Close details</button></div><div class="detail-grid"><div><strong>${fmt(row.compression_rate,4)}</strong><span>average compression rate</span></div><div><strong>${strictCompress}</strong><span>strict Compress ns/point</span></div><div><strong>${strictDecompress}</strong><span>strict Decompress ns/point</span></div><div><strong>${subsetCompress}</strong><span>Compress ns/point Β· timed subset</span></div><div><strong>${subsetDecompress}</strong><span>Decompress ns/point Β· timed subset</span></div><div><strong>${row.coverage} / ${row.totalDatasets}</strong><span>dataset coverage</span></div></div>${pipeline?`<p class="source-code">Interpretive operator mapping: ${escape(typeof pipeline==='string'?pipeline:JSON.stringify(pipeline))}</p>`:''}<p class="muted">Strict timing average: ${escape(timingLabel(row.timing_aggregation))}. Timed-subset values are shown only when every included timing row has one exact source profile, host, and timing contract; they never enter strict composite scores. Dataset metrics below retain the winning row's source family, profile, and host.</p><div class="detail-table"><table><thead><tr><th>Dataset</th><th>Configuration</th><th>Source family</th><th>Rate ↓</th><th>Compress ns/point ↓</th><th>Decompress ns/point ↓</th><th>Timing basis</th><th>Measurement evidence</th><th>Timing profile</th><th>Selected source profile / host</th><th>Runtime / binary</th><th>Support set</th><th>Original bytes</th><th>Compressed bytes</th><th>Dataset score ↓</th><th>Dataset Rank ↓</th><th>Rank candidates</th></tr></thead><tbody>${source.map(r=>`<tr><td>${escape(r.dataset)}</td><td>${escape(r.configuration)}</td><td>${escape(r.source_family??r.family)}</td><td class="numeric">${fmt(r.compression_rate,4)}</td><td class="numeric">${metricCell(r,cols.find(column=>column.key==='compression_time'))}</td><td class="numeric">${metricCell(r,cols.find(column=>column.key==='decompression_time'))}</td><td>${escape(timingLabel(r.timing_aggregation))}</td><td>${escape(r.measurement_status)}</td><td>${escape(r.timing_profile_status)}</td><td class="source-code">${escape(r.source_comparison_profile??r.runtime)} / ${escape(r.source_execution_host??'source snapshot')}</td><td class="source-code">${escape(r.source_runtime)} / ${escape(String(r.binary_sha256).slice(0,16))}</td><td class="source-code">${escape(String(r.eligible_column_set_sha256).slice(0,16))}</td><td class="numeric">${fmt(r.original_bytes,0)}</td><td class="numeric">${fmt(r.compressed_bytes,0)}</td><td class="numeric">${metricCell(r,{key:'dataset_score',digits:4})}</td><td class="numeric">${metricCell(r,{key:'dataset_rank',digits:2})}</td><td class="numeric">${fmt(r.dataset_candidate_count,0)}</td></tr>`).join('')}</tbody></table></div>`;
185
  detail.hidden=false;$('close-detail').addEventListener('click',()=>{detail.hidden=true;selectedMethod=null;});
186
  if(focus){detail.scrollIntoView({block:'nearest',behavior:'auto'});detail.focus({preventScroll:true});}
187
  }
188
  function renderChart() {
189
  const metric=$('chart-metric').value;
190
+ const compressionMetric=metric.startsWith('compression'),subsetMetric=metric.includes('timed_subset');
191
  const valid=currentRows.filter(r=>r.compression_rate>0&&r[metric]>0);
192
  if(!valid.length){$('chart').innerHTML='<p class="chart-empty muted">No positive measurements to plot for this selection.</p>';return;}
193
  const width=1100,height=410,pad={left:85,right:35,top:30,bottom:65};
 
197
  let graph='';
198
  for(let i=0;i<=5;i++){const rate=maxRate*i/5,px=x(rate);graph+=`<line class="gridline" x1="${px}" y1="${pad.top}" x2="${px}" y2="${height-pad.bottom}"/><text class="axis-label" x="${px}" y="${height-pad.bottom+25}" text-anchor="middle">${fmt(rate,2)}</text>`;}
199
  for(let i=minLog;i<=maxLog;i++){const n=10**i,py=y(n);graph+=`<line class="gridline" x1="${pad.left}" y1="${py}" x2="${width-pad.right}" y2="${py}"/><text class="axis-label" x="${pad.left-12}" y="${py+4}" text-anchor="end">${n.toLocaleString('en-US',{maximumFractionDigits:3})}</text>`;}
200
+ for(const r of valid)graph+=`<circle class="point" tabindex="0" role="button" aria-label="${escape(r.method)}: compression rate ${fmt(r.compression_rate,4)}, ${compressionMetric?'compression':'decompression'} ${fmt(r[metric],2)} ns per point${subsetMetric?`, timed subset ${r.timing_subset_coverage} of ${r.timing_subset_denominator} datasets`:''}" data-method="${escape(r.method)}" cx="${x(r.compression_rate)}" cy="${y(r[metric])}" r="6"><title>${escape(r.method)} | rate ${fmt(r.compression_rate,4)} | ${fmt(r[metric],2)} ns/point | ${subsetMetric?`timed subset ${r.timing_subset_coverage}/${r.timing_subset_denominator}`:`coverage ${r.coverage}/${r.totalDatasets}`}</title></circle>`;
201
+ graph+=`<text class="axis-label" x="${width/2}" y="${height-13}" text-anchor="middle">Average compression rate (compressed / original) ↓</text><text class="axis-label" transform="translate(20 ${height/2}) rotate(-90)" text-anchor="middle">${compressionMetric?'Compress':'Decompress'} ns/point${subsetMetric?' Β· timed subset':''} (log scale) ↓</text>`;
202
+ $('chart').innerHTML=`<svg viewBox="0 0 ${width} ${height}" role="img" aria-label="Measured compression rates versus ${compressionMetric?'compression':'decompression'} cost${subsetMetric?' for a timing-admitted subset':''}">${graph}</svg>`;
203
  for(const p of $('chart').querySelectorAll('[data-method]')){p.addEventListener('click',()=>showMethod(p.dataset.method,true));p.addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();showMethod(p.dataset.method,true);}});}
204
  }
205
  function csv() {
206
  const quote=v=>{let text=String(v??'');if(typeof v==='string'&&/^[=+@-]/.test(text))text="'"+text;return `"${text.replace(/"/g,'""')}"`;};
207
  const weights=parseWeights($('weights').value);
208
+ const columns=['position','method','comparison_profile','execution_host','scope','row_mode','selected_dataset','sort_metric','sort_direction','average_compression_rate','overall_compression_rate','compress_ns_per_point','decompress_ns_per_point','weight_a','weight_b','weight_c','normalized_compress','normalized_decompress','composite_score','average_rank','rank_dataset_coverage','normalization_reference_rows','compress_min','compress_max','decompress_min','decompress_max','normalization','rank_definition','dataset_coverage','datasets_in_scope','selected_configuration_by_dataset','source_profile_by_dataset','binary_sha256_by_dataset','eligible_column_set_sha256_by_dataset','measurement_status_by_dataset','timing_profile_status_by_dataset','timing_column_count','timing_aggregation','timed_subset_compress_ns_per_point','timed_subset_decompress_ns_per_point','timed_subset_dataset_coverage','timed_subset_dataset_denominator','timed_subset_status','timed_subset_source_profiles','timed_subset_source_hosts','selected_source_family_by_dataset','selected_source_comparison_profile_by_dataset','selected_source_host_by_dataset','strict_timing_reason','composite_reason'];
209
+ const body=currentRows.map((r,i)=>[i+1,r.method,r.runtime,runtimeHost(r.runtime),scopeKey(),state().mode,state().dataset,sort.key,sort.direction===1?'ascending':'descending',r.compression_rate,r.overall_rate,r.compression_time,r.decompression_time,...weights.map(w=>w.toFixed(1)),r.normalized_compression_time,r.normalized_decompression_time,r.composite_score,r.average_rank,r.rank_coverage,r.normalization_reference_rows,r.encode_min,r.encode_max,r.decode_min,r.decode_max,'min-max over all measured rows in selected language/scope/row-mode before search and visibility filters','mean per-dataset composite-score fractional rank; per-dataset min-max times',r.coverage,r.totalDatasets,JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.configuration]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.source_runtime]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.binary_sha256]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.eligible_column_set_sha256]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.measurement_status]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.timing_profile_status]))),r.timing_column_count,r.timing_aggregation,r.compression_time_timed_subset,r.decompression_time_timed_subset,r.timing_subset_coverage,r.timing_subset_denominator,r.timing_subset_status,JSON.stringify(r.timing_subset_source_profiles),JSON.stringify(r.timing_subset_hosts),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.source_family??s.family]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.source_comparison_profile??s.runtime]))),JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.source_execution_host??'source snapshot']))),metricAvailability(r,'compression_time').code,metricAvailability(r,'composite_score').code].map(quote).join(','));
210
  const url=URL.createObjectURL(new Blob(['\ufeff'+[columns.join(','),...body].join('\r\n')],{type:'text/csv;charset=utf-8'}));const a=document.createElement('a');a.href=url;a.download=`THULab-compression-${state().runtime}-${scopeKey()}-${state().dataset}.csv`;a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);
211
  }
212
  function safeHttpUrl(value) {
 
370
  const exclusions=c.exclusions||c.excluded_datasets||snapshot.exclusions||[];
371
  const catalogCount=number(datasetCatalog?.summary?.dataset_count??c.catalog_dataset_count)??datasetEntries().length,measuredCount=number(datasetCatalog?.summary?.published_result_dataset_count??datasetCatalog?.summary?.published_measurement_dataset_count??datasetCatalog?.summary?.measured_dataset_count??c.measured_dataset_count)??new Set(records.map(r=>r.dataset)).size;
372
  const terminal=c.native86_terminal_coverage||{};
373
+ const info={ 'Snapshot exported':snapshot.exported_at||s.exported_at||'Unavailable in snapshot','Dataset catalog':`${catalogCount} datasets; ${measuredCount} currently have published measurements and participate in rankings`,'Native86 server-166 terminal matrix':terminal.expected_pair_count?`${terminal.observed_pair_count} / ${terminal.expected_pair_count} dataset-method pairs; ${terminal.numeric_pair_count??0} contain published numeric aggregates, ${terminal.not_applicable_pair_count??0} are explicit N/A, ${terminal.problem_pair_count??0} ended with a failure status`:'See manifest and terminal coverage download','Dataset scope generated':s.generated_at||'Unavailable in snapshot', 'Source checkout':s.git_commit||'Unavailable in snapshot','Source files':`${s.source_files?.length??0} metadata inputs and ${s.result_csv_files_used?.length??0} result CSVs (hashes in manifest)`,'Result entries across scopes':`${records.length} (scope slices can reuse a measurement)`,'Worktree source state':s.worktree_dirty_inputs?.length?'Includes current local changes; input file hashes identify the published snapshot.':'See manifest for source file hashes.','Runtime environment':b.hardware||'Hardware details are unavailable in this exported result snapshot.','Lossless evidence':b.roundtrip_evidence||'Lossless-design method filter from the source project; per-run round-trip verification is unavailable here.'};
374
  $('provenance').innerHTML=`<table class="provenance-table"><tbody>${Object.entries(info).map(([k,v])=>`<tr><th>${escape(k)}</th><td class="source-code">${escape(v)}</td></tr>`).join('')}</tbody></table>${exclusions.length?`<h3>Excluded or unavailable results</h3><p class="source-code">${escape(typeof exclusions==='string'?exclusions:JSON.stringify(exclusions))}</p>`:''}`;
375
  }
376
+ function decodeCompactRecord(row,index) {
377
+ const t=snapshot.record_tables;
378
+ return {_compact_index:index,dataset:t.datasets[row[0]],scope:t.scopes[row[1]],runtime:t.runtimes[row[2]],comparison_profile:t.comparison_profiles[row[3]],family:t.families[row[4]],method:t.configurations[row[5]],algorithm_variant:t.configurations[row[5]],compression_rate:row[6],compression_time_ns_per_point:row[7],decompression_time_ns_per_point:row[8],original_size_bytes:row[9],compressed_size_bytes:row[10],timing_column_count:row[11],timing_aggregation:t.timing_aggregations[row[12]],eligible_column_set_sha256:t.support_sets[row[13]],measurement_status:t.measurement_statuses[row[14]],timing_profile_status:t.timing_statuses[row[15]],binary_sha256:t.binary_hashes[row[16]]};
379
+ }
380
+ function applyCppLatestView() {
381
+ if(!cppLatestView||cppLatestView.schema!=='compressionbenchmark-cpp-latest-view-v1'||cppLatestView.status!=='built_from_frozen_published_admitted_sources')throw new Error('The combined C++ selection sidecar has an invalid schema or status.');
382
+ const compact=snapshot.compact_records;if(!Array.isArray(compact))throw new Error('The SHA-bound compact record table is missing.');
383
+ if(cppLatestView.baseline?.compact_record_count!==compact.length)throw new Error('The combined C++ sidecar compact-record count does not match the frozen payload.');
384
+ if(cppLatestView.baseline?.data_sha256!==snapshot.source_data_sha256)throw new Error('The combined C++ sidecar source data hash does not match the frozen payload.');
385
+ const selectors=cppLatestView.selectors;if(!Array.isArray(selectors)||selectors.join('\0')!=='cpp\0java\0python')throw new Error('The combined view must expose exactly C++, Java, and Python.');
386
+ const selected=cppLatestView.cpp?.selected_rows;if(!Array.isArray(selected))throw new Error('The combined C++ selected-row index is missing.');
387
+ const seen=new Set(),cpp=[];
388
+ for(const item of selected){
389
+ const index=item?.raw_compact_index;
390
+ if(!Number.isInteger(index)||index<0||index>=compact.length||seen.has(index))throw new Error('The combined C++ selected-row indices are invalid or duplicated.');
391
+ seen.add(index);
392
+ const decoded=decodeCompactRecord(compact[index],index);
393
+ if(['java','python'].includes(decoded.comparison_profile)||decoded.comparison_profile!==item.source_comparison_profile||decoded.runtime!==item.source_runtime||decoded.family!==item.source_family)throw new Error(`Combined C++ provenance mismatch at compact row ${index}.`);
394
+ if(typeof item.canonical_family!=='string'||!item.canonical_family||typeof item.source_host!=='string'||!item.source_host)throw new Error(`Combined C++ identity metadata is incomplete at compact row ${index}.`);
395
+ const decodedTimingAdmitted=/^timing_admitted_/i.test(String(decoded.timing_profile_status??''));
396
+ if(Boolean(item.timing_admitted)!==decodedTimingAdmitted||item.pair_status!=='numeric')throw new Error(`Combined C++ admission metadata mismatch at compact row ${index}.`);
397
+ cpp.push({...decoded,comparison_profile:'cpp',family:item.canonical_family,source_family:item.source_family,source_comparison_profile:item.source_comparison_profile,source_runtime:item.source_runtime,source_execution_host:item.source_host,selection_authority:item.authority,pair_status:item.pair_status});
398
+ }
399
+ const ledger=cppLatestView.cpp?.pair_ledger;if(!Array.isArray(ledger))throw new Error('The combined C++ pair ledger is missing.');
400
+ for(const decision of ledger)if(decision.status!=='numeric'&&Array.isArray(decision.selected_raw_indices)&&decision.selected_raw_indices.length)throw new Error('A terminal N/A or unsupported decision attempts to fall back to an older numeric row.');
401
+ const expectedTiming=new Set(cppLatestView.cpp?.timing_subset?.selected_raw_indices||[]),actualTiming=new Set(selected.filter(item=>item.timing_admitted).map(item=>item.raw_compact_index));
402
+ if(expectedTiming.size!==actualTiming.size||[...expectedTiming].some(index=>!actualTiming.has(index)))throw new Error('The combined C++ admitted-timing index does not match selected-row metadata.');
403
+ const imported=compact.map(decodeCompactRecord).filter(row=>['java','python'].includes(row.comparison_profile)).map(row=>{
404
+ const publishedHost=snapshot.benchmark?.runtime_hosts?.[row.comparison_profile];
405
+ return {...row,source_family:row.family,source_comparison_profile:row.comparison_profile,source_runtime:row.runtime,source_execution_host:typeof publishedHost==='string'?publishedHost.trim():''};
406
+ });
407
+ snapshot.dataset_results=[...cpp,...imported];delete snapshot.compact_records;
408
+ }
409
  function init() {
410
+ applyCppLatestView();
411
  for(const m of snapshot.methods||[]) { const method=typeof m==='string'?{name:m}:m;methods.set(method.name??method.method,method);for(const c of method.configurations||[])methods.set(c.algorithm_variant,{...method,name:c.algorithm_variant,family:method.name}); }
412
  for(const d of snapshot.datasets||[])datasets.set(d.key??d.dataset,d);
413
  records=(snapshot.dataset_results||snapshot.records||[]).map(normalizeRecord).filter(r=>r.method&&r.dataset&&r.compression_rate>0);
 
417
  $('runtime').innerHTML=runtimes.map(r=>`<option value="${escape(r)}">${escape(runtimeName(r))}</option>`).join('');
418
  const requestedProfile=new URLSearchParams(location.search).get('profile');
419
  if(runtimes.includes(requestedProfile))$('runtime').value=requestedProfile;
420
+ else if(requestedProfile&&requestedProfile!=='cpp'){legacyProfileRequested=requestedProfile;$('runtime').value='cpp';}
421
+ else $('runtime').value=runtimes.includes(DEFAULT_PROFILE)?DEFAULT_PROFILE:runtimes[0];
422
  populateDatasetControls();
423
+ populateFamilyControl();
424
+ $('runtime-count').textContent=runtimes.length;$('record-count').textContent=countFmt(new Set(records.map(r=>`${r.runtime}\0${r.family}\0${r.method}`)).size);
425
+ const exported=snapshot.exported_at||snapshot.source?.exported_at||'unavailable';$('snapshot').textContent=`Result snapshot exported Β· ${String(exported).replace('T',' ').slice(0,19)}${exported==='unavailable'?'':' UTC'}`;$('footer-snapshot').textContent=`Source inputs documented in the manifest`;
426
+ $('column-options').innerHTML=cols.map(c=>`<label><input type="checkbox" data-column="${c.key}" ${defaultColumnVisible($('runtime').value,c)?'checked':''}>${escape(c.label)}</label>`).join('');
427
  $('weights').innerHTML=WEIGHT_TENTHS.map(w=>`<option value="${w.join(',')}" ${w.join(',')==='4,3,3'?'selected':''}>a = ${(w[0]/10).toFixed(1)} Β· b = ${(w[1]/10).toFixed(1)} Β· c = ${(w[2]/10).toFixed(1)}</option>`).join('');
428
  $('weights').addEventListener('change',refresh);
429
+ for(const input of $('column-options').querySelectorAll('input'))input.addEventListener('change',()=>{const column=cols.find(c=>c.key===input.dataset.column);touchedColumns.add(column.key);column.visible=input.checked;renderTable();});
430
+ $('show-unavailable-columns').addEventListener('change',renderTable);
431
+ $('runtime').addEventListener('change',()=>{legacyProfileRequested='';populateFamilyControl();refresh();updateUrlState();});
432
+ for(const id of ['dtype','precision'])$(id).addEventListener('change',()=>{populateFamilyControl();refresh();});
433
+ for(const id of ['family','row-mode','complete-only'])$(id).addEventListener('change',refresh);$('dataset').addEventListener('change',()=>{updateUrlState();refresh();if(activeTab==='dataset')renderDatasetCatalog();});$('search').addEventListener('input',refresh);$('chart-metric').addEventListener('change',renderChart);$('download').addEventListener('click',csv);
434
+ $('reset').addEventListener('click',()=>{$('runtime').value=runtimes.includes(DEFAULT_PROFILE)?DEFAULT_PROFILE:runtimes[0];$('dtype').value='overall';$('precision').value='all';populateFamilyControl();$('dataset').value='all';$('row-mode').value='family';$('search').value='';$('family').value='all';$('weights').value='4,3,3';$('complete-only').checked=false;$('show-unavailable-columns').checked=false;touchedColumns.clear();for(const column of cols)column.visible=column.defaultVisible;legacyProfileRequested='';selectedMethod=null;$('method-detail').hidden=true;sort={key:'compression_rate',direction:1};setTab(activeTab);});
435
  for(const tab of document.querySelectorAll('[data-tab]'))tab.addEventListener('click',()=>setTab(tab.dataset.tab));
436
  $('method-doc-search').addEventListener('input',renderMethodDocumentation);$('operator-doc-search').addEventListener('input',renderOperatorDocumentation);$('dataset-catalog-search').addEventListener('input',renderDatasetCatalog);$('dataset-group-filter').addEventListener('change',renderDatasetCatalog);
437
  renderAbout();renderDocumentationViews();renderDatasetCatalog();setTab(location.hash.slice(1)||(requestedDataset&&$('dataset').value===requestedDataset?'dataset':'overall'));
 
439
  }
440
  function updateUrlState() {
441
  const url=new URL(location.href);url.hash=activeTab;
442
+ const profile=$('runtime')?.value;if(profile)url.searchParams.set('profile',profile);
443
  const selected=$('dataset')?.value;
444
  if(selected&&selected!=='all')url.searchParams.set('dataset',selected);else url.searchParams.delete('dataset');
445
  history.replaceState(null,'',`${url.pathname}${url.search}${url.hash}`);
 
455
  void loadReferenceCatalog();
456
  void loadOperatorEffect();
457
  void loadDatasetCatalog();
458
+ async function sha256Hex(buffer){const digest=await crypto.subtle.digest('SHA-256',buffer);return [...new Uint8Array(digest)].map(byte=>byte.toString(16).padStart(2,'0')).join('');}
459
+ try {
460
+ const [snapshotResponse,sidecarResponse]=await Promise.all([fetch('./ui-data.json?v=20261013-cpp-latest-v1',{cache:'no-cache'}),fetch('./cpp-latest-view.json?v=20261013-cpp-latest-v1',{cache:'no-cache'})]);
461
+ if(!snapshotResponse.ok)throw new Error(`Snapshot request returned ${snapshotResponse.status}`);if(!sidecarResponse.ok)throw new Error(`Combined C++ sidecar request returned ${sidecarResponse.status}`);
462
+ const [snapshotBuffer,sidecarBuffer]=await Promise.all([snapshotResponse.arrayBuffer(),sidecarResponse.arrayBuffer()]);
463
+ const sidecarSha=await sha256Hex(sidecarBuffer);if(sidecarSha!==CPP_LATEST_VIEW_SHA256)throw new Error('The combined C++ sidecar does not match the independently reviewed release selection.');
464
+ const sidecarValue=JSON.parse(new TextDecoder().decode(sidecarBuffer));
465
+ const snapshotSha=await sha256Hex(snapshotBuffer);if(snapshotSha!==sidecarValue?.baseline?.ui_data_sha256)throw new Error('The combined C++ sidecar is not bound to this exact UI snapshot.');
466
+ snapshot=JSON.parse(new TextDecoder().decode(snapshotBuffer));cppLatestView=sidecarValue;init();
467
+ }
468
  catch(e){$('load-error').hidden=false;$('load-error').textContent=`The result snapshot could not be loaded. Please reload the page or download the JSON from the repository. ${e.message}`;$('snapshot').textContent='Snapshot unavailable';$('leaderboard').querySelector('tbody').innerHTML='<tr><td class="empty-cell">Results unavailable.</td></tr>';}
availability.js ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export const DEFAULT_PROFILE = 'cpp';
2
+
3
+ const PROFILE_LABELS = {
4
+ cpp: 'C++ Β· latest published result per dataset and method',
5
+ java: 'Java Β· imported published results',
6
+ python: 'Python Β· imported published results',
7
+ };
8
+
9
+ const FINITE = value => typeof value === 'number' && Number.isFinite(value);
10
+ const METRIC_AVAILABLE = (row,key) => key==='rank_coverage'?FINITE(row?.[key])&&row[key]>0:FINITE(row?.[key]);
11
+ const STRICT_COMPLETE_COLUMNS = new Set(['compression_time','decompression_time','normalized_compression_time','normalized_decompression_time','composite_score']);
12
+ const sourceRows = row => Array.isArray(row?.source) ? row.source : [];
13
+ const timingAdmitted = record => /^timing_admitted_/i.test(String(record?.timing_profile_status ?? ''));
14
+
15
+ export function profileLabel(profile, fallback = profile) {
16
+ return PROFILE_LABELS[profile] || fallback;
17
+ }
18
+
19
+ export function isByteOnlyProfile(profile) {
20
+ return false;
21
+ }
22
+
23
+ export function defaultColumnVisible(profile, column) {
24
+ return Boolean(column.defaultVisible);
25
+ }
26
+
27
+ export function timingAvailability(row) {
28
+ const source = sourceRows(row),evidence=source.length?source:[row];
29
+ if (evidence.some(record => !timingAdmitted(record))) {
30
+ return {
31
+ code: 'timing_not_admitted',
32
+ short: 'Timing not admitted',
33
+ detail: 'Timing exists only as diagnostic or unqualified evidence for at least one selected dataset and is excluded from timing and composite rankings.',
34
+ };
35
+ }
36
+ if (!FINITE(row?.compression_time) || !FINITE(row?.decompression_time)) {
37
+ return {
38
+ code: 'incomplete_timing',
39
+ short: 'Incomplete timing',
40
+ detail: 'At least one selected dataset lacks a complete admitted compression/decompression timing pair.',
41
+ };
42
+ }
43
+ return {code: 'available', short: 'Available', detail: 'All selected timing inputs are admitted.'};
44
+ }
45
+
46
+ export function metricAvailability(row, key) {
47
+ if (FINITE(row?.[key])) return {code: 'available', short: '', detail: ''};
48
+ if (['compression_time_timed_subset', 'decompression_time_timed_subset'].includes(key)) {
49
+ const status=row?.timing_subset_status;
50
+ if(status==='no_admitted_timing')return {code:status,short:'No admitted timing',detail:'None of the current winning rate records has admitted timing.'};
51
+ if(status==='mixed_timing_contracts')return {code:status,short:'Mixed timing contracts',detail:'Admitted timing comes from different source profiles, hosts, or timing contracts and is not averaged.'};
52
+ if(status==='unbound_timing_source')return {code:status,short:'Timing source unbound',detail:'Source profile, host, and timing contract are not all bound, so subset timing is withheld.'};
53
+ if(status==='mixed_timing_aggregation')return {code:status,short:'Mixed timing basis',detail:'Column-level and dataset-level timing aggregation cannot be mixed.'};
54
+ return {code:'incomplete_timing',short:'Incomplete timing',detail:'A valid timed subset is unavailable.'};
55
+ }
56
+ if (['compression_time', 'decompression_time'].includes(key)) return timingAvailability(row);
57
+ if (['normalized_compression_time', 'normalized_decompression_time', 'composite_score'].includes(key)) {
58
+ const timing = timingAvailability(row);
59
+ if (timing.code !== 'available') return timing;
60
+ if (Number(row?.workload_signature_count) > 1) return {
61
+ code: 'support_mismatch',
62
+ short: 'Support mismatch',
63
+ detail: `Composite metrics are withheld because this view contains ${Number(row.workload_signature_count).toLocaleString('en-US')} distinct dataset/support signatures.`,
64
+ };
65
+ return {code: 'not_eligible', short: 'Not eligible', detail: 'No eligible normalization cohort is available for this row.'};
66
+ }
67
+ if (key === 'average_rank') {
68
+ const timing = timingAvailability(row);
69
+ if (timing.code !== 'available') return timing;
70
+ return {code: 'support_mismatch', short: 'Support mismatch', detail: 'No matched dataset/support cohort provides a rank for this row.'};
71
+ }
72
+ if (['overall_rate', 'compressed_bytes', 'original_bytes'].includes(key)) return {
73
+ code: 'incomplete_bytes', short: 'Incomplete bytes', detail: 'Complete compressed/original byte totals are unavailable for the selected records.',
74
+ };
75
+ return {code: 'unavailable', short: 'Unavailable', detail: 'This metric is unavailable for the selected records.'};
76
+ }
77
+
78
+ export function summarizeAvailability(rows, requestedColumns) {
79
+ const total = rows.length;
80
+ const counts = Object.fromEntries(requestedColumns.map(column => [column.key, rows.filter(row => METRIC_AVAILABLE(row,column.key)).length]));
81
+ const hidden = requestedColumns.filter(column => (counts[column.key] || 0) === 0);
82
+ const timingNotAdmitted = rows.filter(row => timingAvailability(row).code === 'timing_not_admitted').length;
83
+ const incompleteTiming = rows.filter(row => timingAvailability(row).code === 'incomplete_timing').length;
84
+ const supportMismatch = rows.filter(row =>
85
+ !FINITE(row?.composite_score) && timingAvailability(row).code === 'available' && Number(row?.workload_signature_count) > 1
86
+ ).length;
87
+ const noComparableCohort = rows.filter(row =>
88
+ !FINITE(row?.composite_score) && timingAvailability(row).code === 'available' && Number(row?.workload_signature_count) <= 1 && Number(row?.normalization_reference_rows) < 2
89
+ ).length;
90
+ const parts = [
91
+ `${counts.compression_rate || 0}/${total} rates`,
92
+ `${counts.compression_time || 0}/${total} admitted timings`,
93
+ `${counts.average_rank || 0}/${total} matched-support ranks`,
94
+ `${counts.composite_score || 0}/${total} composite scores`,
95
+ ];
96
+ const reasons = [];
97
+ if (timingNotAdmitted) reasons.push(`${timingNotAdmitted} timing not admitted`);
98
+ if (incompleteTiming) reasons.push(`${incompleteTiming} incomplete timing`);
99
+ if (supportMismatch) {
100
+ const signatures = Math.max(0, ...rows.map(row => Number(row?.workload_signature_count) || 0));
101
+ reasons.push(`${supportMismatch} composite scores withheld across ${signatures} dataset/support signatures`);
102
+ }
103
+ if(noComparableCohort)reasons.push(`${noComparableCohort} lack a comparable normalization cohort`);
104
+ return {total, counts, hidden, timingNotAdmitted, incompleteTiming, supportMismatch, noComparableCohort, parts, reasons};
105
+ }
106
+
107
+ export function visibleColumns(columns, rows, profile, showUnavailable, touched = new Set()) {
108
+ const requested = columns.filter(column => touched.has(column.key) ? column.visible : defaultColumnVisible(profile, column));
109
+ if (showUnavailable) return columns.filter(column => touched.has(column.key) ? column.visible : Boolean(column.defaultVisible));
110
+ return requested.filter(column => STRICT_COMPLETE_COLUMNS.has(column.key)?rows.length>0&&rows.every(row=>METRIC_AVAILABLE(row,column.key)):rows.some(row => METRIC_AVAILABLE(row,column.key)));
111
+ }
112
+
113
+ export function profileScopeText({profile, measuredDatasets, catalogDatasets}) {
114
+ const prefix = `${profileLabel(profile)} Β· ${measuredDatasets} measured datasets in this profile / ${catalogDatasets} catalog datasets.`;
115
+ if (profile === DEFAULT_PROFILE) return `${prefix} Duplicate C++ dataset/method pairs use the latest receipt-bound authority. Source profile and host remain visible in details and CSV. Strict timing and scores require complete same-contract coverage; partial admitted timing is labeled as a timed subset.`;
116
+ return `${prefix} These imported published results retain their original evidence boundaries; unqualified timing is not promoted into rankings.`;
117
+ }
118
+
119
+ export function timingSourceIdentity(record) {
120
+ const profile = record?.source_comparison_profile ?? record?.comparison_profile ?? record?.runtime ?? '';
121
+ const host = record?.source_execution_host ?? record?.execution_host ?? '';
122
+ const contract = record?.timing_contract ?? record?.timing_profile_status ?? '';
123
+ return `${profile}\u0000${host}\u0000${contract}`;
124
+ }
125
+
126
+ export function aggregateTimedSubset(source) {
127
+ const denominator = new Set(sourceRows({source}).map(record => record.dataset)).size;
128
+ const admitted = sourceRows({source}).filter(record =>
129
+ timingAdmitted(record) && FINITE(record?.compression_time) && FINITE(record?.decompression_time) &&
130
+ Number(record.compression_time) >= 0 && Number(record.decompression_time) >= 0
131
+ );
132
+ const boundIdentity = record => {
133
+ const profile=record?.source_comparison_profile ?? record?.comparison_profile ?? record?.runtime ?? '';
134
+ const host=record?.source_execution_host ?? record?.execution_host ?? '';
135
+ const contract=record?.timing_contract ?? record?.timing_profile_status ?? '';
136
+ return profile && host && contract;
137
+ };
138
+ const identities = [...new Set(admitted.map(timingSourceIdentity))];
139
+ const base = {
140
+ timing_subset_coverage: new Set(admitted.map(record => record.dataset)).size,
141
+ timing_subset_denominator: denominator,
142
+ timing_subset_source_identity: identities.length === 1 ? identities[0] : '',
143
+ timing_subset_source_profiles: [...new Set(admitted.map(record => record.source_comparison_profile ?? record.comparison_profile ?? record.runtime ?? ''))].filter(Boolean),
144
+ timing_subset_hosts: [...new Set(admitted.map(record => record.source_execution_host ?? record.execution_host ?? ''))].filter(Boolean),
145
+ };
146
+ if (!admitted.length) return {...base, compression_time_timed_subset:null, decompression_time_timed_subset:null, timing_subset_status:'no_admitted_timing'};
147
+ if (!admitted.every(boundIdentity)) return {...base, compression_time_timed_subset:null, decompression_time_timed_subset:null, timing_subset_status:'unbound_timing_source'};
148
+ if (identities.length !== 1) return {...base, compression_time_timed_subset:null, decompression_time_timed_subset:null, timing_subset_status:'mixed_timing_contracts'};
149
+ const completeColumnTiming = admitted.every(record => record.timing_aggregation === 'column_mean' && Number.isInteger(record.timing_column_count) && record.timing_column_count > 0);
150
+ const completeDatasetTiming = admitted.every(record => record.timing_aggregation === 'dataset_aggregate' && record.timing_column_count === 0);
151
+ if (!completeColumnTiming && !completeDatasetTiming) return {...base, compression_time_timed_subset:null, decompression_time_timed_subset:null, timing_subset_status:'mixed_timing_aggregation'};
152
+ const aggregate = key => completeColumnTiming
153
+ ? admitted.reduce((sum,record) => sum + Number(record[key]) * record.timing_column_count, 0) / admitted.reduce((sum,record) => sum + record.timing_column_count, 0)
154
+ : admitted.reduce((sum,record) => sum + Number(record[key]), 0) / admitted.length;
155
+ return {
156
+ ...base,
157
+ compression_time_timed_subset:aggregate('compression_time'),
158
+ decompression_time_timed_subset:aggregate('decompression_time'),
159
+ timing_subset_status:completeColumnTiming?'column_mean':'dataset_mean',
160
+ };
161
+ }
162
+
163
+ export function strictTimingMode(source) {
164
+ const rows=sourceRows({source});
165
+ if(!rows.length||rows.some(record=>!timingAdmitted(record)||!FINITE(record?.compression_time)||!FINITE(record?.decompression_time)))return 'unavailable';
166
+ const subset=aggregateTimedSubset(rows),datasetCount=new Set(rows.map(record=>record.dataset)).size;
167
+ if(subset.timing_subset_coverage!==datasetCount)return 'unavailable';
168
+ return ['column_mean','dataset_mean'].includes(subset.timing_subset_status)?subset.timing_subset_status:'unavailable';
169
+ }
build_cpp_latest_view.py ADDED
@@ -0,0 +1,621 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Build an index-only, receipt-bound merged C++ view for the frozen site payload.
3
+
4
+ The output contains no copied or transformed measurements. Every selected row
5
+ is an integer index into the exact frozen ``ui-data.json`` compact record array.
6
+ Pair-level campaign selection is atomic: missing scopes in the selected campaign
7
+ are tombstoned and can never be filled from an older campaign.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import gzip
13
+ import hashlib
14
+ import json
15
+ from collections import Counter, defaultdict
16
+ from pathlib import Path
17
+ from typing import Any
18
+
19
+
20
+ HERE = Path(__file__).resolve().parent
21
+ ROOT = HERE.parents[2]
22
+ CANDIDATE = HERE.parent / "candidate"
23
+ OUTPUT = CANDIDATE / "cpp-latest-view.json"
24
+
25
+ EXPECTED_UI_SHA256 = "ef5aa05289f609f2f62ceed009ee17247c8b4767bba8f4aa8cd522ce83d3521d"
26
+ EXPECTED_DATA_SHA256 = "b7b542c5731786d0486e89de889f024c7e6f69eacb68a7df67bc00179b07af4c"
27
+ EXPECTED_BASELINE_VERIFIED_SHA256 = "9b5ea536ddf8e60db9dcc54d7d0b98420fba222a38b499b50aa193cdc3fd25a9"
28
+ BASELINE_REVISION = "d84ab7155ac1d2279610facdebe8aae1681b655b"
29
+ PUBLISHED_INPUTS = {
30
+ "ui-data.json",
31
+ "data.json",
32
+ "native86-terminal-matrix.jsonl.gz",
33
+ "native86-row-support-v4-portable-results.jsonl.gz",
34
+ "corrected-five425-portable-results.jsonl.gz",
35
+ "NATIVE86_FULL_MATRIX_INTEGRATION_V6.json",
36
+ "NATIVE86_ACCEPTED_COMPLETION_V7.json",
37
+ "CORRECTED_FIVE425_INDEPENDENT_ACCEPTANCE.json",
38
+ "CORRECTED_FIVE425_PORTABLE_MANIFEST.json",
39
+ "native86-recovery-reconciliation.json",
40
+ }
41
+ EXPECTED_RECEIPTS = {
42
+ "NATIVE86_FULL_MATRIX_INTEGRATION_V6.json": ("site-native86-full-matrix-integration-v2", "passed"),
43
+ "NATIVE86_ACCEPTED_COMPLETION_V7.json": ("compressionbenchmark-native86-accepted-completion-integration-v1", "passed_not_published"),
44
+ "CORRECTED_FIVE425_INDEPENDENT_ACCEPTANCE.json": ("compressionbenchmark-corrected-five425-independent-acceptance-v2", "accepted"),
45
+ "CORRECTED_FIVE425_PORTABLE_MANIFEST.json": ("compressionbenchmark-corrected-five425-portable-manifest-v1", "accepted_portable_export"),
46
+ "native86-recovery-reconciliation.json": ("paper164-recovery-key-reconciliation-v1", "passed_all_original_problem_identities_have_accepted_rate_byte_replacements"),
47
+ }
48
+
49
+ MAIN = "cpp-native166-main-458a218f"
50
+ V9 = "cpp-native166-v9-recovery-baseline86-fixed-profiles-20260919-v3"
51
+ COMPLETION_REUSE = "cpp-native166-current-recovery-v3-baseline86-fixed-profiles-20260919-v3"
52
+ COMPLETION_RERUN = "cpp-native166-row-support-v4-baseline86-fixed-profiles-20260919-v3"
53
+ CORRECTED = "cpp-native166-corrected-five-20261012-v1"
54
+ HOST192 = {
55
+ "cpp-native192-first12-baseline86-fixed-profiles-20260919-v3",
56
+ "cpp-native192-lzg-level5-fastfalse-lzg-level5-fast0-ngf1-empty-fixed-20261010-v2",
57
+ "cpp-native192-lzg-level5-fastfalse-lzg-level5-fast0-ngf1-fixed-20261010-v1",
58
+ "cpp-native192-next5-baseline86-fixed-profiles-20260919-v3",
59
+ }
60
+ RECOVERY_PROFILES = {V9, *HOST192}
61
+ CORRECTED_DATASETS = {
62
+ "github_top_projects",
63
+ "magseven_ml_ready_high_frequency_anomaly",
64
+ "traqq_weekly_activity",
65
+ "trending_stocks_yahoo_finance",
66
+ "us_stock_financial_ratios",
67
+ }
68
+
69
+ # These are directional legacy-label -> active Native85-label overrides. They
70
+ # are backed by the explicit alias and family-membership registries, not fuzzy
71
+ # matching.
72
+ SAFE_ALIASES = {
73
+ "TS_2DIFF": "2DIFF",
74
+ "CHIMP": "Chimp",
75
+ "Dictionary": "Dict.",
76
+ "FPCompress DPratio": "FPCmp-R",
77
+ "FPCompress DPspeed": "FPCmp-S",
78
+ "GORILLA": "Gorilla",
79
+ "GZIP": "gzip",
80
+ "LZO1X": "LZO1",
81
+ "SNAPPY": "Snappy",
82
+ "Slz_deflate": "SLZ",
83
+ "Slz_gzip": "SLZ",
84
+ "Slz_zlib": "SLZ",
85
+ "SPRINTZ": "Sprintz",
86
+ "Stream VByte": "SVB",
87
+ "UCL NRV": "NRV",
88
+ "UCL NRV2b": "NRV",
89
+ "ZSTD": "Zstd",
90
+ }
91
+ AMBIGUOUS_NOT_ALIASED: dict[str, str] = {}
92
+
93
+
94
+ def sha256(path: Path) -> str:
95
+ return hashlib.sha256(path.read_bytes()).hexdigest()
96
+
97
+
98
+ def load_json(path: Path) -> Any:
99
+ return json.loads(path.read_text())
100
+
101
+
102
+ def load_jsonl_gz(path: Path) -> list[dict[str, Any]]:
103
+ with gzip.open(path, "rt") as stream:
104
+ return [json.loads(line) for line in stream if line.strip()]
105
+
106
+
107
+ def compact_rows(ui: dict[str, Any]) -> list[dict[str, Any]]:
108
+ tables = ui["record_tables"]
109
+ rows = []
110
+ for index, row in enumerate(ui["compact_records"]):
111
+ rows.append(
112
+ {
113
+ "raw_compact_index": index,
114
+ "dataset": tables["datasets"][row[0]],
115
+ "scope": tables["scopes"][row[1]],
116
+ "source_runtime": tables["runtimes"][row[2]],
117
+ "source_comparison_profile": tables["comparison_profiles"][row[3]],
118
+ "source_family": tables["families"][row[4]],
119
+ "algorithm_variant": tables["configurations"][row[5]],
120
+ "eligible_support_sha256": tables["support_sets"][row[13]],
121
+ "measurement_status": tables["measurement_statuses"][row[14]],
122
+ "timing_profile_status": tables["timing_statuses"][row[15]],
123
+ }
124
+ )
125
+ return rows
126
+
127
+
128
+ def receipt_entry(path: Path) -> dict[str, Any]:
129
+ value = load_json(path)
130
+ return {
131
+ "path": path.name,
132
+ "sha256": sha256(path),
133
+ "schema": value.get("schema"),
134
+ "status": value.get("status"),
135
+ "created_at": value.get("created_at"),
136
+ }
137
+
138
+
139
+ def main() -> None:
140
+ ui_path = CANDIDATE / "ui-data.json"
141
+ data_path = CANDIDATE / "data.json"
142
+ if sha256(ui_path) != EXPECTED_UI_SHA256:
143
+ raise RuntimeError("frozen ui-data.json SHA mismatch")
144
+ if sha256(data_path) != EXPECTED_DATA_SHA256:
145
+ raise RuntimeError("frozen data.json SHA mismatch")
146
+
147
+ baseline_verified_path = HERE.parent / "BASELINE_VERIFIED.json"
148
+ if sha256(baseline_verified_path) != EXPECTED_BASELINE_VERIFIED_SHA256:
149
+ raise RuntimeError("published baseline verification receipt SHA mismatch")
150
+ baseline_verified = load_json(baseline_verified_path)
151
+ verified_files = {item["path"]: item["sha256"] for item in baseline_verified["files"]}
152
+ if (
153
+ baseline_verified.get("status") != "verified"
154
+ or baseline_verified.get("revision") != BASELINE_REVISION
155
+ or verified_files.get("ui-data.json") != EXPECTED_UI_SHA256
156
+ or verified_files.get("data.json") != EXPECTED_DATA_SHA256
157
+ ):
158
+ raise RuntimeError("published baseline verification receipt does not bind the frozen payload")
159
+ for name in sorted(PUBLISHED_INPUTS):
160
+ path = CANDIDATE / name
161
+ if not path.is_file() or name not in verified_files or sha256(path) != verified_files[name]:
162
+ raise RuntimeError(f"published input is absent or differs from BASELINE_VERIFIED: {name}")
163
+ for name, (expected_schema, expected_status) in EXPECTED_RECEIPTS.items():
164
+ value = load_json(CANDIDATE / name)
165
+ if value.get("schema") != expected_schema or value.get("status") != expected_status:
166
+ raise RuntimeError(f"published receipt schema/status mismatch: {name}")
167
+
168
+ ui = load_json(ui_path)
169
+ data = load_json(data_path)
170
+ rows = compact_rows(ui)
171
+ all_scopes = tuple(ui["record_tables"]["scopes"])
172
+ hosts = data["benchmark"]["runtime_hosts"]
173
+
174
+ by_profile_pair: dict[tuple[str, str, str], list[dict[str, Any]]] = defaultdict(list)
175
+ legacy_families: set[str] = set()
176
+ for row in rows:
177
+ by_profile_pair[(row["source_comparison_profile"], row["dataset"], row["source_family"])].append(row)
178
+ if row["source_comparison_profile"] == "cpp":
179
+ legacy_families.add(row["source_family"])
180
+
181
+ terminal = load_jsonl_gz(CANDIDATE / "native86-terminal-matrix.jsonl.gz")
182
+ if any(row.get("record_type") != "terminal_pair" for row in terminal):
183
+ raise RuntimeError("Native85 terminal matrix contains a non-terminal-pair record")
184
+ active85 = sorted({row["method_label"] for row in terminal})
185
+ datasets164 = sorted({row["dataset_id"] for row in terminal})
186
+ if len(active85) != 85 or len(datasets164) != 164 or len(terminal) != 13_940:
187
+ raise RuntimeError("Native85 terminal matrix cardinality mismatch")
188
+ terminal_pairs = {(row["dataset_id"], row["method_label"]): row for row in terminal}
189
+ if len(terminal_pairs) != 13_940:
190
+ raise RuntimeError("Native85 terminal matrix pair duplication")
191
+
192
+ # authority[pair] always describes exactly one winning campaign, or an
193
+ # explicit terminal tombstone. It is never a best-value selection.
194
+ authority: dict[tuple[str, str], dict[str, Any]] = {}
195
+ for pair, row in terminal_pairs.items():
196
+ if row["terminal_status"] == "final_numeric_available":
197
+ authority[pair] = {
198
+ "status": "numeric",
199
+ "profile": MAIN,
200
+ "authority": "native85_main_terminal_matrix",
201
+ "reason": "Native85 terminal matrix reports accepted numeric support in the main campaign.",
202
+ "recency_rank": 10,
203
+ }
204
+ elif row["terminal_status"] == "not_applicable_no_eligible_columns":
205
+ authority[pair] = {
206
+ "status": "not_applicable",
207
+ "profile": MAIN,
208
+ "authority": "native85_main_terminal_matrix",
209
+ "reason": "Native85 terminal matrix is final all-N/A; legacy numeric rows are blocked.",
210
+ "recency_rank": 10,
211
+ }
212
+ else:
213
+ authority[pair] = {
214
+ "status": "unresolved_original_problem",
215
+ "profile": None,
216
+ "authority": "native85_main_terminal_matrix",
217
+ "reason": "Original Native85 problem; an accepted recovery overlay is required.",
218
+ "recency_rank": 10,
219
+ }
220
+
221
+ # Independently accepted V9 plus server-192 recovery: 174 unique pairs.
222
+ recovery_candidates: dict[tuple[str, str], set[str]] = defaultdict(set)
223
+ for profile in RECOVERY_PROFILES:
224
+ for candidate_profile, dataset, family in by_profile_pair:
225
+ if candidate_profile == profile:
226
+ recovery_candidates[(dataset, family)].add(profile)
227
+ if len(recovery_candidates) != 174:
228
+ raise RuntimeError(f"expected 174 unique accepted V9/192 recovery pairs, found {len(recovery_candidates)}")
229
+ for pair, profiles in recovery_candidates.items():
230
+ if pair not in terminal_pairs:
231
+ raise RuntimeError(f"recovery pair outside Native85 matrix: {pair}")
232
+ if len(profiles) == 1:
233
+ profile = next(iter(profiles))
234
+ overlap_rule = None
235
+ elif pair == ("weather_data_bavaria", "LZG") and profiles == {
236
+ V9,
237
+ "cpp-native192-lzg-level5-fastfalse-lzg-level5-fast0-ngf1-empty-fixed-20261010-v2",
238
+ }:
239
+ profile = "cpp-native192-lzg-level5-fastfalse-lzg-level5-fast0-ngf1-empty-fixed-20261010-v2"
240
+ overlap_rule = "explicit current LZG parameter contract level=5, fast=false; not ratio-based"
241
+ else:
242
+ raise RuntimeError(f"unadjudicated recovery overlap for {pair}: {sorted(profiles)}")
243
+ authority[pair] = {
244
+ "status": "numeric",
245
+ "profile": profile,
246
+ "authority": "native85_v9_or_192_independently_accepted_recovery",
247
+ "reason": overlap_rule or "Unique independently accepted recovery source for this pair.",
248
+ "recency_rank": 20,
249
+ "candidate_profiles": sorted(profiles),
250
+ }
251
+
252
+ # Accepted completion repairs exactly the other 328 original problem pairs.
253
+ completion = load_jsonl_gz(CANDIDATE / "native86-row-support-v4-portable-results.jsonl.gz")
254
+ if len(completion) != 328:
255
+ raise RuntimeError("accepted completion must contain exactly 328 pairs")
256
+ if any(row.get("schema") != "compressionbenchmark-native328-portable-pair-v1" for row in completion):
257
+ raise RuntimeError("accepted completion row schema mismatch")
258
+ completion_profiles = {
259
+ "reuse_v3_recovered": COMPLETION_REUSE,
260
+ "rerun_v4": COMPLETION_RERUN,
261
+ }
262
+ for item in completion:
263
+ pair = (item["dataset_id"], item["method"])
264
+ if pair in recovery_candidates:
265
+ raise RuntimeError(f"completion overlaps prior accepted recovery: {pair}")
266
+ profile = completion_profiles[item["action"]]
267
+ authority[pair] = {
268
+ "status": "numeric",
269
+ "profile": profile,
270
+ "authority": "native328_independently_accepted_completion",
271
+ "reason": f"Accepted Native328 completion action={item['action']}.",
272
+ "recency_rank": 30,
273
+ "pair_receipt_sha256": item["receipt_sha256"],
274
+ }
275
+
276
+ unresolved = [pair for pair, decision in authority.items() if decision["status"] == "unresolved_original_problem"]
277
+ if unresolved:
278
+ raise RuntimeError(f"unresolved Native85 problem pairs remain: {unresolved[:3]}")
279
+
280
+ # Latest corrected-input campaign atomically supersedes every older version
281
+ # for all five datasets and all 85 active methods, including unsupported and
282
+ # mixed pairs with no overall row.
283
+ corrected = load_jsonl_gz(CANDIDATE / "corrected-five425-portable-results.jsonl.gz")
284
+ if any(row.get("schema") != "compressionbenchmark-corrected-five425-portable-pair-v1" for row in corrected):
285
+ raise RuntimeError("corrected-five portable row schema mismatch")
286
+ corrected_pairs = {(row["dataset_id"], row["method"]): row for row in corrected}
287
+ expected_corrected = {(dataset, family) for dataset in CORRECTED_DATASETS for family in active85}
288
+ if set(corrected_pairs) != expected_corrected or len(corrected) != 425:
289
+ raise RuntimeError("corrected-five pair coverage is not exactly 5 x 85")
290
+ for pair, item in corrected_pairs.items():
291
+ if item["numeric_result"]:
292
+ status = "numeric"
293
+ reason = "Latest independently accepted corrected-input pair; all older scopes/configurations are superseded."
294
+ profile: str | None = CORRECTED
295
+ else:
296
+ status = "unsupported"
297
+ reason = "Latest corrected-input pair is all-unsupported; all prior numeric/configuration rows are tombstoned."
298
+ profile = CORRECTED
299
+ authority[pair] = {
300
+ "status": status,
301
+ "profile": profile,
302
+ "authority": "corrected_five425_independent_acceptance",
303
+ "reason": reason,
304
+ "recency_rank": 40,
305
+ "pair_terminal_class": item["pair_terminal_class"],
306
+ "pair_receipt_sha256": item["receipt_sha256"],
307
+ }
308
+
309
+ selected_rows: list[dict[str, Any]] = []
310
+ pair_ledger: list[dict[str, Any]] = []
311
+ selected_indices: set[int] = set()
312
+ pair_status_counts: Counter[str] = Counter()
313
+
314
+ for dataset, family in sorted(authority):
315
+ decision = authority[(dataset, family)]
316
+ profile = decision["profile"]
317
+ chosen = [] if profile is None else list(by_profile_pair.get((profile, dataset, family), []))
318
+ if decision["status"] == "numeric" and not chosen:
319
+ raise RuntimeError(f"numeric authority has no compact rows: {(dataset, family, profile)}")
320
+ if decision["status"] != "numeric" and chosen:
321
+ raise RuntimeError(f"terminal tombstone unexpectedly has rows: {(dataset, family, profile)}")
322
+
323
+ # Do not allow duplicate scientific row identity within a winning
324
+ # campaign. Multiple configurations remain distinct by contract.
325
+ identities = [
326
+ (
327
+ row["scope"],
328
+ row["algorithm_variant"],
329
+ row["eligible_support_sha256"],
330
+ row["source_runtime"],
331
+ )
332
+ for row in chosen
333
+ ]
334
+ if len(identities) != len(set(identities)):
335
+ raise RuntimeError(f"duplicate row identity in winning campaign: {(dataset, family, profile)}")
336
+
337
+ source_host = None if profile is None else hosts[profile]
338
+ pair_indices = sorted(row["raw_compact_index"] for row in chosen)
339
+ scopes = sorted({row["scope"] for row in chosen})
340
+ for row in chosen:
341
+ index = row["raw_compact_index"]
342
+ if index in selected_indices:
343
+ raise RuntimeError(f"compact row selected twice: {index}")
344
+ selected_indices.add(index)
345
+ timing_admitted = row["timing_profile_status"].startswith("timing_admitted_")
346
+ selected_rows.append(
347
+ {
348
+ "raw_compact_index": index,
349
+ "canonical_family": family,
350
+ "source_family": row["source_family"],
351
+ "source_comparison_profile": profile,
352
+ "source_runtime": row["source_runtime"],
353
+ "source_host": source_host,
354
+ "authority": decision["authority"],
355
+ "pair_status": decision["status"],
356
+ "timing_admitted": timing_admitted,
357
+ "measurement_status": row["measurement_status"],
358
+ "timing_profile_status": row["timing_profile_status"],
359
+ }
360
+ )
361
+ pair_status_counts[decision["status"]] += 1
362
+ pair_ledger.append(
363
+ {
364
+ "dataset": dataset,
365
+ "canonical_family": family,
366
+ "decision": "select_winning_campaign" if chosen else "terminal_tombstone",
367
+ "status": decision["status"],
368
+ "source_comparison_profile": profile,
369
+ "source_host": source_host,
370
+ "selected_raw_indices": pair_indices,
371
+ "selected_scopes": scopes,
372
+ "missing_scopes_tombstoned": sorted(set(all_scopes) - set(scopes)),
373
+ "recency_rank": decision["recency_rank"],
374
+ "authority": decision["authority"],
375
+ "reason": decision["reason"],
376
+ **({"pair_terminal_class": decision["pair_terminal_class"]} if "pair_terminal_class" in decision else {}),
377
+ **({"pair_receipt_sha256": decision["pair_receipt_sha256"]} if "pair_receipt_sha256" in decision else {}),
378
+ **({"candidate_profiles": decision["candidate_profiles"]} if "candidate_profiles" in decision else {}),
379
+ }
380
+ )
381
+
382
+ # Preserve concrete legacy-only algorithm families and every configuration
383
+ # within their legacy campaign. Safe aliases into Native85 are excluded,
384
+ # because their Native85 terminal/tombstone decision is authoritative.
385
+ mapped_legacy = {SAFE_ALIASES.get(family, family) for family in legacy_families}
386
+ legacy_extras = sorted(family for family in legacy_families if SAFE_ALIASES.get(family, family) not in active85)
387
+ expected_extras = sorted(["BSS+LZ4", "Sub-column"])
388
+ if legacy_extras != expected_extras:
389
+ raise RuntimeError(f"unexpected legacy extra families: {legacy_extras}")
390
+ if not set(active85).issubset(mapped_legacy):
391
+ missing = sorted(set(active85) - mapped_legacy)
392
+ raise RuntimeError(f"active Native85 labels absent after explicit legacy aliases: {missing}")
393
+
394
+ for family in legacy_extras:
395
+ family_rows = [row for row in rows if row["source_comparison_profile"] == "cpp" and row["source_family"] == family]
396
+ for row in family_rows:
397
+ index = row["raw_compact_index"]
398
+ if index in selected_indices:
399
+ raise RuntimeError(f"legacy compact row selected twice: {index}")
400
+ selected_indices.add(index)
401
+ selected_rows.append(
402
+ {
403
+ "raw_compact_index": index,
404
+ "canonical_family": family,
405
+ "source_family": family,
406
+ "source_comparison_profile": "cpp",
407
+ "source_runtime": row["source_runtime"],
408
+ "source_host": hosts["cpp"],
409
+ "authority": "legacy_extra_family_preserved_all_configurations",
410
+ "pair_status": "numeric",
411
+ "timing_admitted": row["timing_profile_status"].startswith("timing_admitted_"),
412
+ "measurement_status": row["measurement_status"],
413
+ "timing_profile_status": row["timing_profile_status"],
414
+ }
415
+ )
416
+ for dataset in sorted({row["dataset"] for row in family_rows}):
417
+ chosen = [row for row in family_rows if row["dataset"] == dataset]
418
+ pair_ledger.append(
419
+ {
420
+ "dataset": dataset,
421
+ "canonical_family": family,
422
+ "decision": "preserve_legacy_extra_family_all_configurations",
423
+ "status": "numeric",
424
+ "source_comparison_profile": "cpp",
425
+ "source_host": hosts["cpp"],
426
+ "selected_raw_indices": sorted(row["raw_compact_index"] for row in chosen),
427
+ "selected_scopes": sorted({row["scope"] for row in chosen}),
428
+ "missing_scopes_tombstoned": [],
429
+ "recency_rank": 0,
430
+ "authority": "legacy_extra_family_preserved_all_configurations",
431
+ "reason": "Concrete legacy-only family has no evidenced Native85 equivalent; all legacy configurations are preserved.",
432
+ }
433
+ )
434
+
435
+ selected_rows.sort(key=lambda item: item["raw_compact_index"])
436
+ pair_ledger.sort(key=lambda item: (item["dataset"], item["canonical_family"]))
437
+ timing_indices = [row["raw_compact_index"] for row in selected_rows if row["timing_admitted"]]
438
+ selected_index_to_source = {row["raw_compact_index"]: row for row in rows}
439
+ scope_numeric_dataset_counts = {
440
+ scope: len(
441
+ {
442
+ selected_index_to_source[row["raw_compact_index"]]["dataset"]
443
+ for row in selected_rows
444
+ if selected_index_to_source[row["raw_compact_index"]]["scope"] == scope
445
+ }
446
+ )
447
+ for scope in all_scopes
448
+ }
449
+ scope_numeric_pair_counts = {
450
+ scope: len(
451
+ {
452
+ (
453
+ selected_index_to_source[row["raw_compact_index"]]["dataset"],
454
+ row["canonical_family"],
455
+ )
456
+ for row in selected_rows
457
+ if selected_index_to_source[row["raw_compact_index"]]["scope"] == scope
458
+ }
459
+ )
460
+ for scope in all_scopes
461
+ }
462
+
463
+ receipts = {
464
+ name: receipt_entry(CANDIDATE / name)
465
+ for name in [
466
+ "NATIVE86_FULL_MATRIX_INTEGRATION_V6.json",
467
+ "NATIVE86_ACCEPTED_COMPLETION_V7.json",
468
+ "CORRECTED_FIVE425_INDEPENDENT_ACCEPTANCE.json",
469
+ "CORRECTED_FIVE425_PORTABLE_MANIFEST.json",
470
+ "native86-recovery-reconciliation.json",
471
+ ]
472
+ }
473
+ receipts.update(
474
+ {
475
+ "native86-terminal-matrix.jsonl.gz": {
476
+ "path": "native86-terminal-matrix.jsonl.gz",
477
+ "sha256": sha256(CANDIDATE / "native86-terminal-matrix.jsonl.gz"),
478
+ },
479
+ "native86-row-support-v4-portable-results.jsonl.gz": {
480
+ "path": "native86-row-support-v4-portable-results.jsonl.gz",
481
+ "sha256": sha256(CANDIDATE / "native86-row-support-v4-portable-results.jsonl.gz"),
482
+ },
483
+ "corrected-five425-portable-results.jsonl.gz": {
484
+ "path": "corrected-five425-portable-results.jsonl.gz",
485
+ "sha256": sha256(CANDIDATE / "corrected-five425-portable-results.jsonl.gz"),
486
+ },
487
+ }
488
+ )
489
+
490
+ alias_source = ROOT / "scripts" / "operator86_required_paths_v1.py"
491
+ alias_evidence_paths = [
492
+ alias_source,
493
+ ROOT / "cpp" / "native_baseline86_v1" / "UPSTREAM_SPECIALISTS_SOURCE_AUDIT.md",
494
+ ROOT / "cpp" / "native_baseline86_v1" / "upstream_specialists.cpp",
495
+ ROOT / "cpp" / "src" / "remaining_codec_action_catalog.cpp",
496
+ ROOT / "backend" / "myapp" / "method_catalog.py",
497
+ ]
498
+ sidecar = {
499
+ "schema": "compressionbenchmark-cpp-latest-view-v1",
500
+ "status": "built_from_frozen_published_admitted_sources",
501
+ "baseline": {
502
+ "revision": BASELINE_REVISION,
503
+ "ui_data_path": "ui-data.json",
504
+ "ui_data_sha256": EXPECTED_UI_SHA256,
505
+ "data_path": "data.json",
506
+ "data_sha256": EXPECTED_DATA_SHA256,
507
+ "compact_record_count": len(rows),
508
+ "verification_receipt": {
509
+ "path": "../BASELINE_VERIFIED.json",
510
+ "sha256": sha256(baseline_verified_path),
511
+ "observed_at": baseline_verified.get("observed_at"),
512
+ },
513
+ },
514
+ "identity_contract": {
515
+ "winning_campaign_identity": ["dataset", "canonical_family"],
516
+ "selected_row_identity": [
517
+ "raw_compact_index",
518
+ "scope",
519
+ "algorithm_variant",
520
+ "eligible_support_sha256",
521
+ "source_runtime",
522
+ ],
523
+ "atomicity": "One accepted campaign wins per dataset and canonical family. All its compact rows are selected; absent scopes are tombstoned and never backfilled.",
524
+ "numeric_policy": "The sidecar stores indices and provenance only. Numeric values are read unchanged from the SHA-bound compact record.",
525
+ "normalized_runtime": "cpp",
526
+ "source_profile_retention": "source_comparison_profile/source_runtime/source_host remain visible provenance metadata",
527
+ },
528
+ "alias_contract": {
529
+ "direction": "legacy_source_family_to_native85_canonical_family",
530
+ "overrides": SAFE_ALIASES,
531
+ "source": {
532
+ "path": "scripts/operator86_required_paths_v1.py",
533
+ "sha256": sha256(alias_source),
534
+ "evidence": "PIPELINE_ALIASES, documented punctuation-insensitive resolution, and method_catalog family-membership lists; direction is inverted only for evidenced legacy spellings.",
535
+ },
536
+ "evidence_files": [
537
+ {"path": str(path.relative_to(ROOT)), "sha256": sha256(path)}
538
+ for path in alias_evidence_paths
539
+ ],
540
+ "ambiguous_not_aliased": AMBIGUOUS_NOT_ALIASED,
541
+ "legacy_extra_families": legacy_extras,
542
+ },
543
+ "precedence": [
544
+ {"rank": 0, "authority": "legacy_extra_family_preserved_all_configurations", "scope": "families without an evidenced Native85 equivalent"},
545
+ {"rank": 10, "authority": "native85_main_terminal_matrix", "scope": "164 x 85 base terminal matrix; N/A blocks legacy fallback"},
546
+ {"rank": 20, "authority": "native85_v9_or_192_independently_accepted_recovery", "scope": "174 accepted original-problem repairs"},
547
+ {"rank": 30, "authority": "native328_independently_accepted_completion", "scope": "remaining 328 accepted original-problem repairs"},
548
+ {"rank": 40, "authority": "corrected_five425_independent_acceptance", "scope": "latest corrected inputs for five datasets x 85 methods; supersedes every older scope/configuration"},
549
+ ],
550
+ "receipts": receipts,
551
+ "selectors": ["cpp", "java", "python"],
552
+ "cpp": {
553
+ "merged_runtime": "cpp",
554
+ "selected_rows": selected_rows,
555
+ "pair_ledger": pair_ledger,
556
+ "active_native85_families": active85,
557
+ "legacy_extra_families": legacy_extras,
558
+ "counts": {
559
+ "active_native85_pair_conclusions": len(authority),
560
+ "active_native85_pair_status": dict(sorted(pair_status_counts.items())),
561
+ "active_native85_numeric_pairs": pair_status_counts["numeric"],
562
+ "active_native85_terminal_tombstone_pairs": pair_status_counts["not_applicable"] + pair_status_counts["unsupported"],
563
+ "legacy_extra_pair_count": sum(1 for row in pair_ledger if row["authority"] == "legacy_extra_family_preserved_all_configurations"),
564
+ "selected_compact_row_count": len(selected_rows),
565
+ "timing_admitted_selected_row_count": len(timing_indices),
566
+ "scope_numeric_dataset_counts": scope_numeric_dataset_counts,
567
+ "scope_numeric_pair_counts": scope_numeric_pair_counts,
568
+ },
569
+ "timing_subset": {
570
+ "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.",
571
+ "selected_raw_indices": timing_indices,
572
+ "selected_row_count": len(timing_indices),
573
+ "source_profile_counts": dict(
574
+ sorted(
575
+ Counter(
576
+ row["source_comparison_profile"]
577
+ for row in selected_rows
578
+ if row["timing_admitted"]
579
+ ).items()
580
+ )
581
+ ),
582
+ },
583
+ },
584
+ "warnings": [
585
+ "N/A and unsupported are terminal support conclusions, not zero-valued measurements.",
586
+ "A corrected mixed-support pair may intentionally lack overall scope; the missing overall result is tombstoned rather than taken from an older input version.",
587
+ "FreshRetailNet-50K corrected 114-column rerun is pending and is not represented as a newer accepted campaign in this sidecar.",
588
+ "Only BSS+LZ4 and Sub-column remain legacy extras; all other legacy spellings are explicitly mapped by the bound registries.",
589
+ "The server-192 LZG overlap is resolved by the explicit current level=5, fast=false parameter contract, never by compression ratio.",
590
+ ],
591
+ }
592
+
593
+ OUTPUT.write_text(json.dumps(sidecar, ensure_ascii=False, sort_keys=True, separators=(",", ":"), allow_nan=False) + "\n")
594
+ result = {
595
+ "status": "pass",
596
+ "builder": Path(__file__).name,
597
+ "builder_sha256": sha256(Path(__file__)),
598
+ "output": str(OUTPUT.relative_to(ROOT)),
599
+ "output_sha256": sha256(OUTPUT),
600
+ "baseline_ui_data_sha256": EXPECTED_UI_SHA256,
601
+ "counts": sidecar["cpp"]["counts"],
602
+ "pair_status": dict(sorted(pair_status_counts.items())),
603
+ "legacy_extra_families": legacy_extras,
604
+ }
605
+ (HERE / "BUILD_RESULT.json").write_text(json.dumps(result, ensure_ascii=False, indent=2, sort_keys=True) + "\n")
606
+ (HERE / "REPORT.md").write_text(
607
+ "# C++ latest accepted view\n\n"
608
+ f"Status: **PASS** (derived view validation)\n\n"
609
+ f"The sidecar selects `{len(selected_rows)}` frozen compact rows by raw index and contains no copied numeric measurements. "
610
+ f"It records all `{len(authority)}` Native85 pair conclusions: `{pair_status_counts['numeric']}` numeric, "
611
+ f"`{pair_status_counts['not_applicable']}` N/A, and `{pair_status_counts['unsupported']}` unsupported. "
612
+ f"It also preserves `{len(legacy_extras)}` concrete legacy-only families.\n\n"
613
+ "Pair selection is atomic by dataset and canonical family. Corrected-five conclusions supersede every prior version, including missing-overall and all-unsupported tombstones. "
614
+ "Timing rankings use only unchanged rows already marked `timing_admitted_*`.\n\n"
615
+ f"Output SHA-256: `{result['output_sha256']}`\n"
616
+ )
617
+ print(json.dumps(result, ensure_ascii=False, indent=2, sort_keys=True))
618
+
619
+
620
+ if __name__ == "__main__":
621
+ main()
cpp-latest-view.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d2a8bb4fb5c38fbc4fa130a08b7608c7568f3959ef9dd2706f245862907f90f
3
+ size 19973658
index.html CHANGED
@@ -6,8 +6,8 @@
6
  <meta name="description" content="THULab time-series compression benchmark: measured compression rates, compression and decompression costs, and dataset coverage.">
7
  <meta name="color-scheme" content="light dark">
8
  <title>THULab | Time Series Compression Benchmark</title>
9
- <link rel="stylesheet" href="style.css?v=20261013-corrected-five-v1">
10
- <script src="app.js?v=20261013-corrected-five-v1" type="module"></script>
11
  </head>
12
  <body>
13
  <a class="skip-link" href="#content">Skip to results</a>
@@ -16,7 +16,7 @@
16
  <div class="header-links"><a href="https://github.com/xjz17/web_compression" target="_blank" rel="noopener">Project code β†—</a><button id="theme" class="quiet-button" type="button" aria-label="Switch color theme">Theme</button></div>
17
  </header>
18
  <main id="content">
19
- <section class="snapshot-notice" aria-label="Corrected input results"><strong>Corrected numeric inputs Β· 5 datasets</strong><p>425 algorithm–dataset conclusions: 386 pairs contain numerical results, 39 pairs contain only unsupported conclusions; 40 of the numerical pairs also contain N/A or unsupported column conclusions. FreshRetailNet-50K full114 is pending a new run. Earlier input versions remain available as separate profiles. Corrected-input timing is not admitted to timing or composite rankings.</p><a href="?profile=cpp-native166-corrected-five-20261012-v1#overall">View corrected-input results</a></section>
20
 
21
  <section class="intro" aria-labelledby="title">
22
  <p class="eyebrow">Time-series systems research</p>
@@ -26,9 +26,9 @@
26
  </section>
27
  <div class="summary-strip" id="summary" aria-label="Snapshot coverage">
28
  <div><strong id="dataset-count">…</strong><span id="dataset-count-label">measured datasets</span></div>
29
- <div><strong id="method-count">…</strong><span>method families</span></div>
30
- <div><strong id="runtime-count">…</strong><span>comparison profiles</span></div>
31
- <div><strong id="record-count">…</strong><span>profile / codec configurations</span></div>
32
  </div>
33
  <nav class="tabs" aria-label="Benchmark views">
34
  <button id="tab-overall" class="tab active" data-tab="overall" aria-current="page">πŸ… Overall</button>
@@ -52,7 +52,7 @@
52
  <div id="dataset-catalog" class="dataset-catalog"></div>
53
  </section>
54
  <div class="filters" id="filters">
55
- <label>Comparison profile<select id="runtime"></select></label>
56
  <label>Data type<select id="dtype"><option value="overall">Available numeric</option><option value="int">Integer</option><option value="float">Floating point</option></select></label>
57
  <label>Float precision<select id="precision"><option value="all">All precision</option><option value="fixed">Fixed precision</option><option value="non_fixed">Non-fixed precision</option></select></label>
58
  <label>Dataset<select id="dataset"><option value="all">All datasets</option></select></label>
@@ -65,16 +65,19 @@
65
  <div class="toolbar-actions"><button id="reset" class="quiet-button">Reset filters</button><button id="download" class="primary-button" disabled>Download CSV</button></div>
66
  </div>
67
  <div class="results-note" id="results-note">Compression rate = compressed bytes / original bytes. Lower rates and lower ns/point are better. Compression and decompression costs use equal-column arithmetic means where column timings are available. Methods with aggregate-only timings use equal-dataset arithmetic means for the selected range.</div>
 
 
68
  <div id="score-controls" class="score-controls">
69
  <label>Score weights Β· a: rate / b: compress / c: decompress<select id="weights" aria-label="Score weights a b c"></select></label>
70
  <p id="score-note" class="muted" aria-live="polite">Non-negative weights in steps of 0.1, summing to 1.0.</p>
71
  </div>
72
  <div class="table-settings">
73
  <label><input id="complete-only" type="checkbox"> Only methods covering the full selection</label>
 
74
  <details><summary>Display columns</summary><div id="column-options" class="column-options"></div></details>
75
  </div>
76
  <div id="chart-view" hidden>
77
- <div class="chart-controls"><label>Vertical axis<select id="chart-metric"><option value="compression_time">Compression cost (ns/point)</option><option value="decompression_time">Decompression cost (ns/point)</option></select></label><span class="muted">Lower and further left is better. Click a point for method details.</span></div>
78
  <div id="chart" class="chart" aria-label="Compression rate and execution cost scatter plot"></div>
79
  </div>
80
  <div id="leaderboard-wrap" class="table-wrap" tabindex="0" aria-label="Scrollable sortable leaderboard">
@@ -116,13 +119,14 @@
116
  <dl class="definitions">
117
  <div><dt>Average compression rate ↓</dt><dd>Arithmetic mean of the per-dataset compression rates in the selected scope.</dd></div>
118
  <div><dt>Overall compression rate ↓</dt><dd>Total compressed bytes divided by total original bytes over the selected measured records.</dd></div>
119
- <div><dt>Compression / decompression cost ↓</dt><dd>For each result with admitted column-level timing evidence, calculate ns/point independently for every usable numeric column, then take the arithmetic mean across those columns. Each column contributes equally. Overall timing pools all measured columns across the selected datasets when every selected dataset has column timings. If any selected dataset/configuration has only aggregate timing, use the arithmetic mean of the selected datasets' ns/point values instead, giving each dataset equal weight. For an aggregate-only dataset, ns/point comes from its recorded total elapsed time divided by its recorded point count. Missing and diagnostic-only timings remain unavailable. Method details and CSV identify the timing basis, exact source profile, and binary. Compare timings within the same host/campaign/measurement-contract profile.</dd></div>
 
120
  <div><dt>Coverage</dt><dd>Datasets with usable measurements for a method out of the measured datasets in the selected runtime, data type, and dataset selection. The summary dataset count uses the same selection. Missing results are never filled with zero.</dd></div>
121
  <div><dt>Composite score ↓</dt><dd>a Γ— average compression rate + b Γ— normalized average compression time + c Γ— normalized average decompression time. A composite is published only when the displayed methods share one exact dataset and eligible aggregate-id support signature. If all times are equal, their normalized value is zero. All measured inputs must have usable timing metrics.</dd></div>
122
  <div><dt>Average Rank ↓</dt><dd>Compute the same weighted score only among methods with the same dataset and eligible aggregate-id support hash, normalizing times inside that matched cohort. Rank lower scores first; ties share their average position. Then take the arithmetic mean of the method's available matched-cohort ranks. Weights are non-negative tenths summing to 1.0. Missing, N/A, failed, and unlike-support measurements do not receive ranks.</dd></div>
123
  </dl>
124
  <h3>Reading the rankings</h3>
125
- <p>Methods with different coverage are measured on different inputs. Coverage counts datasets, not identical columns or point counts. Use the full-coverage filter and inspect a single dataset's input sizes before drawing a direct comparison. Comparison profiles keep languages, hosts, campaigns, and measurement contracts separate.</p>
126
  <p>By default, each family selects the lowest-rate exact variant independently for each dataset only when all candidates for that dataset/family have one exact support set. This view can choose different binaries across datasets. Ambiguous support sets are omitted. Switch Method rows to Exact configuration to inspect fixed variants, source profiles, binaries, and support hashes.</p>
127
  <p>These are published measurements, not experiments executed inside this Space. A reported ratio alone does not establish lossless reconstruction; round-trip checks and hardware details are shown only when their evidence exists in the source snapshot. Timings without an exact admitted source/build/binary/boundary chain are unavailable to timing and composite rankings.</p>
128
  <h3>Download and provenance</h3>
 
6
  <meta name="description" content="THULab time-series compression benchmark: measured compression rates, compression and decompression costs, and dataset coverage.">
7
  <meta name="color-scheme" content="light dark">
8
  <title>THULab | Time Series Compression Benchmark</title>
9
+ <link rel="stylesheet" href="style.css?v=20261013-cpp-latest-v1">
10
+ <script src="app.js?v=20261013-cpp-latest-v7" type="module"></script>
11
  </head>
12
  <body>
13
  <a class="skip-link" href="#content">Skip to results</a>
 
16
  <div class="header-links"><a href="https://github.com/xjz17/web_compression" target="_blank" rel="noopener">Project code β†—</a><button id="theme" class="quiet-button" type="button" aria-label="Switch color theme">Theme</button></div>
17
  </header>
18
  <main id="content">
19
+ <section class="snapshot-notice" aria-label="Current C++ result selection"><strong>C++ Β· latest receipt-bound result per dataset and method</strong><p>The C++ view combines published campaigns and selects the newest receipt-bound authority for each logical dataset/method pair. Corrected inputs for five datasets are included; terminal N/A or unsupported conclusions block fallback to older numbers. Prior versions remain preserved in the downloadable snapshot and evidence. FreshRetailNet-50K full114 is still pending and is not presented as a newer result.</p><a href="?profile=cpp#overall">View combined C++ results</a></section>
20
 
21
  <section class="intro" aria-labelledby="title">
22
  <p class="eyebrow">Time-series systems research</p>
 
26
  </section>
27
  <div class="summary-strip" id="summary" aria-label="Snapshot coverage">
28
  <div><strong id="dataset-count">…</strong><span id="dataset-count-label">measured datasets</span></div>
29
+ <div><strong id="method-count">…</strong><span>method families in selection</span></div>
30
+ <div><strong id="runtime-count">…</strong><span>implementation languages</span></div>
31
+ <div><strong id="record-count">…</strong><span>language / family / configurations</span></div>
32
  </div>
33
  <nav class="tabs" aria-label="Benchmark views">
34
  <button id="tab-overall" class="tab active" data-tab="overall" aria-current="page">πŸ… Overall</button>
 
52
  <div id="dataset-catalog" class="dataset-catalog"></div>
53
  </section>
54
  <div class="filters" id="filters">
55
+ <label>Implementation language<select id="runtime"></select></label>
56
  <label>Data type<select id="dtype"><option value="overall">Available numeric</option><option value="int">Integer</option><option value="float">Floating point</option></select></label>
57
  <label>Float precision<select id="precision"><option value="all">All precision</option><option value="fixed">Fixed precision</option><option value="non_fixed">Non-fixed precision</option></select></label>
58
  <label>Dataset<select id="dataset"><option value="all">All datasets</option></select></label>
 
65
  <div class="toolbar-actions"><button id="reset" class="quiet-button">Reset filters</button><button id="download" class="primary-button" disabled>Download CSV</button></div>
66
  </div>
67
  <div class="results-note" id="results-note">Compression rate = compressed bytes / original bytes. Lower rates and lower ns/point are better. Compression and decompression costs use equal-column arithmetic means where column timings are available. Methods with aggregate-only timings use equal-dataset arithmetic means for the selected range.</div>
68
+ <p id="profile-scope-note" class="profile-scope-note" aria-live="polite"></p>
69
+ <p id="availability-summary" class="availability-summary" aria-live="polite"></p>
70
  <div id="score-controls" class="score-controls">
71
  <label>Score weights Β· a: rate / b: compress / c: decompress<select id="weights" aria-label="Score weights a b c"></select></label>
72
  <p id="score-note" class="muted" aria-live="polite">Non-negative weights in steps of 0.1, summing to 1.0.</p>
73
  </div>
74
  <div class="table-settings">
75
  <label><input id="complete-only" type="checkbox"> Only methods covering the full selection</label>
76
+ <label><input id="show-unavailable-columns" type="checkbox"> Show unavailable metric columns</label>
77
  <details><summary>Display columns</summary><div id="column-options" class="column-options"></div></details>
78
  </div>
79
  <div id="chart-view" hidden>
80
+ <div class="chart-controls"><label>Vertical axis<select id="chart-metric"><option value="compression_time_timed_subset">Compression cost Β· timed subset (ns/point)</option><option value="decompression_time_timed_subset">Decompression cost Β· timed subset (ns/point)</option><option value="compression_time">Strict compression cost (ns/point)</option><option value="decompression_time">Strict decompression cost (ns/point)</option></select></label><span class="muted">Timed-subset points are limited to one exact source profile, host, and timing contract; inspect N/M coverage before comparison.</span></div>
81
  <div id="chart" class="chart" aria-label="Compression rate and execution cost scatter plot"></div>
82
  </div>
83
  <div id="leaderboard-wrap" class="table-wrap" tabindex="0" aria-label="Scrollable sortable leaderboard">
 
119
  <dl class="definitions">
120
  <div><dt>Average compression rate ↓</dt><dd>Arithmetic mean of the per-dataset compression rates in the selected scope.</dd></div>
121
  <div><dt>Overall compression rate ↓</dt><dd>Total compressed bytes divided by total original bytes over the selected measured records.</dd></div>
122
+ <div><dt>Compression / decompression cost ↓</dt><dd>For each result with admitted column-level timing evidence, calculate ns/point independently for every usable numeric column, then take the arithmetic mean across those columns. Each column contributes equally. Strict timing requires every current rate dataset for a method to have eligible timing. Missing and diagnostic-only timings remain unavailable.</dd></div>
123
+ <div><dt>Timed-subset compression / decompression cost ↓</dt><dd>Uses only current winning rows with admitted timing, and only when those rows share one exact source profile, host, timing contract, and aggregation basis. Each value displays N / M: timed datasets divided by current rate datasets. It is descriptive and never enters strict composite scores.</dd></div>
124
  <div><dt>Coverage</dt><dd>Datasets with usable measurements for a method out of the measured datasets in the selected runtime, data type, and dataset selection. The summary dataset count uses the same selection. Missing results are never filled with zero.</dd></div>
125
  <div><dt>Composite score ↓</dt><dd>a Γ— average compression rate + b Γ— normalized average compression time + c Γ— normalized average decompression time. A composite is published only when the displayed methods share one exact dataset and eligible aggregate-id support signature. If all times are equal, their normalized value is zero. All measured inputs must have usable timing metrics.</dd></div>
126
  <div><dt>Average Rank ↓</dt><dd>Compute the same weighted score only among methods with the same dataset and eligible aggregate-id support hash, normalizing times inside that matched cohort. Rank lower scores first; ties share their average position. Then take the arithmetic mean of the method's available matched-cohort ranks. Weights are non-negative tenths summing to 1.0. Missing, N/A, failed, and unlike-support measurements do not receive ranks.</dd></div>
127
  </dl>
128
  <h3>Reading the rankings</h3>
129
+ <p>Methods with different coverage are measured on different inputs. Coverage counts datasets, not identical columns or point counts. Use the full-coverage filter and inspect a single dataset's input sizes before drawing a direct comparison. The C++ view chooses the latest receipt-bound source for each dataset/method pair while preserving source profile and host in details and CSV. Java and Python remain separate language views.</p>
130
  <p>By default, each family selects the lowest-rate exact variant independently for each dataset only when all candidates for that dataset/family have one exact support set. This view can choose different binaries across datasets. Ambiguous support sets are omitted. Switch Method rows to Exact configuration to inspect fixed variants, source profiles, binaries, and support hashes.</p>
131
  <p>These are published measurements, not experiments executed inside this Space. A reported ratio alone does not establish lossless reconstruction; round-trip checks and hardware details are shown only when their evidence exists in the source snapshot. Timings without an exact admitted source/build/binary/boundary chain are unavailable to timing and composite rankings.</p>
132
  <h3>Download and provenance</h3>
style.css CHANGED
@@ -19,3 +19,4 @@
19
  .snapshot-notice{margin:0 0 1.5rem;padding:1rem 1.25rem;border:1px solid var(--border,#cbd5e1);border-radius:12px}.snapshot-notice p{margin:.5rem 0;line-height:1.5}
20
 
21
  .operator-effect-results{margin:18px 0 26px;padding:18px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.operator-effect-head{display:flex;align-items:start;justify-content:space-between;gap:20px}.operator-effect-head h3{margin:0 0 4px}.operator-effect-table-wrap{max-height:430px}.operator-effect-table-wrap th:first-child,.operator-effect-table-wrap td:first-child{text-align:left}.operator-effect-cost{color:#a34832}.operator-effect-saving{color:var(--accent)}@media(max-width:768px){.operator-effect-head{flex-direction:column}.operator-effect-head .quiet-button{width:100%;text-align:center}.operator-effect-table-wrap{max-height:520px}}
 
 
19
  .snapshot-notice{margin:0 0 1.5rem;padding:1rem 1.25rem;border:1px solid var(--border,#cbd5e1);border-radius:12px}.snapshot-notice p{margin:.5rem 0;line-height:1.5}
20
 
21
  .operator-effect-results{margin:18px 0 26px;padding:18px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.operator-effect-head{display:flex;align-items:start;justify-content:space-between;gap:20px}.operator-effect-head h3{margin:0 0 4px}.operator-effect-table-wrap{max-height:430px}.operator-effect-table-wrap th:first-child,.operator-effect-table-wrap td:first-child{text-align:left}.operator-effect-cost{color:#a34832}.operator-effect-saving{color:var(--accent)}@media(max-width:768px){.operator-effect-head{flex-direction:column}.operator-effect-head .quiet-button{width:100%;text-align:center}.operator-effect-table-wrap{max-height:520px}}
22
+ .profile-scope-note,.availability-summary{margin:8px 0 0;padding:10px 12px;border-left:3px solid var(--accent);background:var(--accent-soft);color:var(--text);font-size:12px;line-height:1.5}.availability-summary{margin-top:6px;border-left-color:var(--line);background:var(--soft);color:var(--muted)}.unavailable-value{color:var(--muted);font-family:inherit;font-size:11px;white-space:normal}.metric-coverage{display:inline-block;margin-left:5px;padding:1px 5px;border-radius:999px;background:var(--soft);color:var(--muted);font-family:inherit;font-size:9px}.detail-grid{grid-template-columns:repeat(3,1fr)}