From 79c4e29927057ecbbb4d1fa04b4d63f8ec8c3dd5 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Wed, 28 Oct 2026 19:52:20 +0100 Subject: [PATCH] Add END_TO_END evidence-record schema and validator (STRA-246, S0.1) New files only under scripts/e2e/evidence/: schema.json (v1), a stdlib-only Python 3.9 validator that interprets it (validate.py, CLI v1: record, --negative-suite, merge), three synthetic sample records, 33 neg_*.json fixtures with their expected reasons, a placeholder row (b) environment list, the charter 4.3 field map and 40 unittest tests. Co-Authored-By: Claude Sonnet 5.5 --- scripts/e2e/evidence/charter_map.md | 14 + scripts/e2e/evidence/neg_bare_cpu_prefix.json | 192 ++++++++ .../neg_build_id_without_features.json | 189 ++++++++ .../evidence/neg_build_id_without_triple.json | 192 ++++++++ .../evidence/neg_cache_warm_cold_mixed.json | 392 +++++++++++++++++ scripts/e2e/evidence/neg_component_level.json | 6 + scripts/e2e/evidence/neg_context_131072.json | 193 +++++++++ .../neg_countable_under_bootstrap.json | 191 ++++++++ .../neg_countable_without_power_summary.json | 181 ++++++++ .../neg_enforced_power_limit_absent.json | 192 ++++++++ .../evidence/neg_enforced_power_limit_na.json | 193 +++++++++ .../evidence/neg_missing_arm_identity.json | 183 ++++++++ .../e2e/evidence/neg_missing_build_id.json | 184 ++++++++ .../e2e/evidence/neg_missing_cache_state.json | 185 ++++++++ .../evidence/neg_missing_configuration.json | 186 ++++++++ .../e2e/evidence/neg_missing_countable.json | 192 ++++++++ .../e2e/evidence/neg_missing_hardware.json | 170 ++++++++ .../evidence/neg_missing_kernel_lines.json | 188 ++++++++ scripts/e2e/evidence/neg_missing_metrics.json | 124 ++++++ .../evidence/neg_missing_model_digest.json | 192 ++++++++ .../neg_missing_noskip_environment.json | 195 +++++++++ scripts/e2e/evidence/neg_missing_pair_id.json | 192 ++++++++ .../evidence/neg_missing_schedule_hash.json | 192 ++++++++ .../e2e/evidence/neg_missing_software.json | 187 ++++++++ .../e2e/evidence/neg_missing_workload.json | 178 ++++++++ .../neg_noskip_environment_differs.json | 198 +++++++++ .../evidence/neg_ours_without_cpu_lines.json | 191 ++++++++ .../evidence/neg_position_predecessor.json | 195 +++++++++ .../neg_power_limit_changed_flag_wrong.json | 193 +++++++++ .../evidence/neg_prompt_tokens_199999.json | 193 +++++++++ ...g_quality_without_tool_call_integrity.json | 192 ++++++++ .../neg_vanilla_claims_cpu_lines.json | 198 +++++++++ .../neg_vanilla_family_block_incomplete.json | 189 ++++++++ .../neg_vanilla_without_family_block.json | 180 ++++++++ scripts/e2e/evidence/negative_cases.json | 143 ++++++ .../e2e/evidence/row_b_env_placeholder.txt | 3 + scripts/e2e/evidence/sample_ours.json | 193 +++++++++ .../e2e/evidence/sample_vanilla_default.json | 195 +++++++++ .../e2e/evidence/sample_vanilla_noskip.json | 199 +++++++++ scripts/e2e/evidence/schema.json | 287 ++++++++++++ scripts/e2e/evidence/test_validate.py | 356 +++++++++++++++ scripts/e2e/evidence/validate.py | 410 ++++++++++++++++++ 42 files changed, 7998 insertions(+) create mode 100644 scripts/e2e/evidence/charter_map.md create mode 100644 scripts/e2e/evidence/neg_bare_cpu_prefix.json create mode 100644 scripts/e2e/evidence/neg_build_id_without_features.json create mode 100644 scripts/e2e/evidence/neg_build_id_without_triple.json create mode 100644 scripts/e2e/evidence/neg_cache_warm_cold_mixed.json create mode 100644 scripts/e2e/evidence/neg_component_level.json create mode 100644 scripts/e2e/evidence/neg_context_131072.json create mode 100644 scripts/e2e/evidence/neg_countable_under_bootstrap.json create mode 100644 scripts/e2e/evidence/neg_countable_without_power_summary.json create mode 100644 scripts/e2e/evidence/neg_enforced_power_limit_absent.json create mode 100644 scripts/e2e/evidence/neg_enforced_power_limit_na.json create mode 100644 scripts/e2e/evidence/neg_missing_arm_identity.json create mode 100644 scripts/e2e/evidence/neg_missing_build_id.json create mode 100644 scripts/e2e/evidence/neg_missing_cache_state.json create mode 100644 scripts/e2e/evidence/neg_missing_configuration.json create mode 100644 scripts/e2e/evidence/neg_missing_countable.json create mode 100644 scripts/e2e/evidence/neg_missing_hardware.json create mode 100644 scripts/e2e/evidence/neg_missing_kernel_lines.json create mode 100644 scripts/e2e/evidence/neg_missing_metrics.json create mode 100644 scripts/e2e/evidence/neg_missing_model_digest.json create mode 100644 scripts/e2e/evidence/neg_missing_noskip_environment.json create mode 100644 scripts/e2e/evidence/neg_missing_pair_id.json create mode 100644 scripts/e2e/evidence/neg_missing_schedule_hash.json create mode 100644 scripts/e2e/evidence/neg_missing_software.json create mode 100644 scripts/e2e/evidence/neg_missing_workload.json create mode 100644 scripts/e2e/evidence/neg_noskip_environment_differs.json create mode 100644 scripts/e2e/evidence/neg_ours_without_cpu_lines.json create mode 100644 scripts/e2e/evidence/neg_position_predecessor.json create mode 100644 scripts/e2e/evidence/neg_power_limit_changed_flag_wrong.json create mode 100644 scripts/e2e/evidence/neg_prompt_tokens_199999.json create mode 100644 scripts/e2e/evidence/neg_quality_without_tool_call_integrity.json create mode 100644 scripts/e2e/evidence/neg_vanilla_claims_cpu_lines.json create mode 100644 scripts/e2e/evidence/neg_vanilla_family_block_incomplete.json create mode 100644 scripts/e2e/evidence/neg_vanilla_without_family_block.json create mode 100644 scripts/e2e/evidence/negative_cases.json create mode 100644 scripts/e2e/evidence/row_b_env_placeholder.txt create mode 100644 scripts/e2e/evidence/sample_ours.json create mode 100644 scripts/e2e/evidence/sample_vanilla_default.json create mode 100644 scripts/e2e/evidence/sample_vanilla_noskip.json create mode 100644 scripts/e2e/evidence/schema.json create mode 100644 scripts/e2e/evidence/test_validate.py create mode 100644 scripts/e2e/evidence/validate.py diff --git a/scripts/e2e/evidence/charter_map.md b/scripts/e2e/evidence/charter_map.md new file mode 100644 index 00000000..f5dbcfe3 --- /dev/null +++ b/scripts/e2e/evidence/charter_map.md @@ -0,0 +1,14 @@ +Field-to-charter map for the END_TO_END evidence record (STRA-246, schema.json v1). One table row per bullet of `PROJECT_CHARTER.md` section 4.3, in the charter's order. The statistics row is not stored per record: it is computed over a series by STRA-290. + +| Charter 4.3 bullet | Record field(s) | Where computed or checked | +|---|---|---| +| commit engine and control plane | `software.leleka_commit`, `software.strata_upstream_commit`, `ours_build_id_observed`, `ours_build_id_frozen` (commit, target triple, cargo features, profile value hash) | validator: schema; freeze comparison is STRA-312 | +| model, quant and file digests | `model.digest`, `model.digest_mapping` | validator: schema; the mapping itself is S0.7b (STRA-288) | +| GPU, driver, CUDA toolkit and power limit | `hardware.gpu_name`, `software.driver_version`, `software.cuda_version`, `hardware.enforced_power_limit_w_start` and `_end`, `power_sample_summary` | validator: schema and RULE_POWER_LIMIT_CHANGED; validity is STRA-312 | +| context, KV, slots, batch and speculation parameters | `configuration.context_tokens`, `kv`, `slots`, `batch`, `speculation`; `workload.long_session_argv` | validator: schema and RULE_256K_CONTEXT | +| cold/warm cache state | `cache.state`, `cache.page_cache_residency_before` | validator: schema; WARM and COLD never pooled (SERIES_CACHE_MIXED) | +| prompt/output token counts | `metrics.turns[].prompt_tokens`, `cached_tokens`, `output_tokens`; `workload.turn1_tokens` | validator: schema, RULE_256K_PROMPT, RULE_TURN1_TOKENS, RULE_TURN_ORDER | +| TTFT, prefill tok/s, decode tok/s and end-to-end wall time | `metrics.turns[].ttft_s`, `prefill_tok_s`, `decode_tok_s`, `wall_s`; `metrics.wall_s`, `wall_norm_s` | validator: schema (values only, no statistics) | +| draft acceptance, expert-cache hit and KV-streaming hit | `metrics.draft_acceptance`, `expert_cache_hit`, `kv_streaming_hit` (null when the arm does not report it) | validator: schema | +| mean, median, percentiles and confidence interval | not stored per record; computed over a series of records | STRA-290 (mean, median, percentiles and CI) | +| quality gate result | `quality` {verdict, tolerance, basis, baseline, tool_call_integrity, optional experimental} | validator: schema (tool_call_integrity is required) | diff --git a/scripts/e2e/evidence/neg_bare_cpu_prefix.json b/scripts/e2e/evidence/neg_bare_cpu_prefix.json new file mode 100644 index 00000000..3935736f --- /dev/null +++ b/scripts/e2e/evidence/neg_bare_cpu_prefix.json @@ -0,0 +1,192 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "cpu: process kernel family avx512, sample line", + "leleka-serve cpu: logical cores 16, sample line" + ] +} diff --git a/scripts/e2e/evidence/neg_build_id_without_features.json b/scripts/e2e/evidence/neg_build_id_without_features.json new file mode 100644 index 00000000..e7b5cca3 --- /dev/null +++ b/scripts/e2e/evidence/neg_build_id_without_features.json @@ -0,0 +1,189 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_build_id_without_triple.json b/scripts/e2e/evidence/neg_build_id_without_triple.json new file mode 100644 index 00000000..5a1b623c --- /dev/null +++ b/scripts/e2e/evidence/neg_build_id_without_triple.json @@ -0,0 +1,192 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_cache_warm_cold_mixed.json b/scripts/e2e/evidence/neg_cache_warm_cold_mixed.json new file mode 100644 index 00000000..b926f105 --- /dev/null +++ b/scripts/e2e/evidence/neg_cache_warm_cold_mixed.json @@ -0,0 +1,392 @@ +{ + "series_records": [ + { + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] + }, + { + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_default", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 2, + "predecessor_arm": "ours", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "24d840e9cffb1207e16ce08ea78c910ab4f156c2238964af1edebbd304125146", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "COLD", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_default.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "vanilla_cpu_family": { + "printed": "none printed", + "reading_rule": "native pack: absence of the no-AVX-512 note means cpu_avx512_ok() was true; negative indicator only", + "control": { + "env": "STRATA_FORCE_AVX2=1", + "printed": [ + "sample: this CPU has no AVX-512 note, text is a placeholder" + ] + }, + "predicate": "unavailable: sample fixture, predicate dump (S0.7c) not run", + "binary_identity": { + "engine_version": "sample-engine-0.0.0", + "sha256": "a879b093c70e663f151a2b05b020c9548c5baff7c1a9aa97facf4526ac55c474" + } + } + } + ] +} diff --git a/scripts/e2e/evidence/neg_component_level.json b/scripts/e2e/evidence/neg_component_level.json new file mode 100644 index 00000000..7987ce7e --- /dev/null +++ b/scripts/e2e/evidence/neg_component_level.json @@ -0,0 +1,6 @@ +{ + "schema_version": "1", + "level": "COMPONENT_KERNEL", + "synthetic": true, + "note": "minimal stand-in for a STRA-287 record; END_TO_END must never be merged with it" +} diff --git a/scripts/e2e/evidence/neg_context_131072.json b/scripts/e2e/evidence/neg_context_131072.json new file mode 100644 index 00000000..2a7e9026 --- /dev/null +++ b/scripts/e2e/evidence/neg_context_131072.json @@ -0,0 +1,193 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 131072, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_countable_under_bootstrap.json b/scripts/e2e/evidence/neg_countable_under_bootstrap.json new file mode 100644 index 00000000..89af5f6e --- /dev/null +++ b/scripts/e2e/evidence/neg_countable_under_bootstrap.json @@ -0,0 +1,191 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": true, + "invalid_reasons": [], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_countable_without_power_summary.json b/scripts/e2e/evidence/neg_countable_without_power_summary.json new file mode 100644 index 00000000..5b123eec --- /dev/null +++ b/scripts/e2e/evidence/neg_countable_without_power_summary.json @@ -0,0 +1,181 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": true, + "invalid_reasons": [], + "thresholds_source": "S3.7_FILE", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_enforced_power_limit_absent.json b/scripts/e2e/evidence/neg_enforced_power_limit_absent.json new file mode 100644 index 00000000..1e8be50d --- /dev/null +++ b/scripts/e2e/evidence/neg_enforced_power_limit_absent.json @@ -0,0 +1,192 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_enforced_power_limit_na.json b/scripts/e2e/evidence/neg_enforced_power_limit_na.json new file mode 100644 index 00000000..8e145a3c --- /dev/null +++ b/scripts/e2e/evidence/neg_enforced_power_limit_na.json @@ -0,0 +1,193 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": "N/A", + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_arm_identity.json b/scripts/e2e/evidence/neg_missing_arm_identity.json new file mode 100644 index 00000000..945be5f5 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_arm_identity.json @@ -0,0 +1,183 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_build_id.json b/scripts/e2e/evidence/neg_missing_build_id.json new file mode 100644 index 00000000..58db0552 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_build_id.json @@ -0,0 +1,184 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_cache_state.json b/scripts/e2e/evidence/neg_missing_cache_state.json new file mode 100644 index 00000000..6eab322b --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_cache_state.json @@ -0,0 +1,185 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_configuration.json b/scripts/e2e/evidence/neg_missing_configuration.json new file mode 100644 index 00000000..abb3f3b7 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_configuration.json @@ -0,0 +1,186 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_countable.json b/scripts/e2e/evidence/neg_missing_countable.json new file mode 100644 index 00000000..57488044 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_countable.json @@ -0,0 +1,192 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_hardware.json b/scripts/e2e/evidence/neg_missing_hardware.json new file mode 100644 index 00000000..f659e05a --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_hardware.json @@ -0,0 +1,170 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_kernel_lines.json b/scripts/e2e/evidence/neg_missing_kernel_lines.json new file mode 100644 index 00000000..eadd98bd --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_kernel_lines.json @@ -0,0 +1,188 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + } +} diff --git a/scripts/e2e/evidence/neg_missing_metrics.json b/scripts/e2e/evidence/neg_missing_metrics.json new file mode 100644 index 00000000..bccdb121 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_metrics.json @@ -0,0 +1,124 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_model_digest.json b/scripts/e2e/evidence/neg_missing_model_digest.json new file mode 100644 index 00000000..f5f360f1 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_model_digest.json @@ -0,0 +1,192 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_noskip_environment.json b/scripts/e2e/evidence/neg_missing_noskip_environment.json new file mode 100644 index 00000000..64ff1adb --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_noskip_environment.json @@ -0,0 +1,195 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_noskip", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 3, + "predecessor_arm": "vanilla_default", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "f5e42c9e224a73b90de61a98b55eb585b05a1c79a583fd2b7eee71167db8cd82", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_noskip.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "vanilla_cpu_family": { + "printed": "none printed", + "reading_rule": "native pack: absence of the no-AVX-512 note means cpu_avx512_ok() was true; negative indicator only", + "control": { + "env": "STRATA_FORCE_AVX2=1", + "printed": [ + "sample: this CPU has no AVX-512 note, text is a placeholder" + ] + }, + "predicate": "unavailable: sample fixture, predicate dump (S0.7c) not run", + "binary_identity": { + "engine_version": "sample-engine-0.0.0", + "sha256": "a879b093c70e663f151a2b05b020c9548c5baff7c1a9aa97facf4526ac55c474" + } + } +} diff --git a/scripts/e2e/evidence/neg_missing_pair_id.json b/scripts/e2e/evidence/neg_missing_pair_id.json new file mode 100644 index 00000000..0905fc84 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_pair_id.json @@ -0,0 +1,192 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_schedule_hash.json b/scripts/e2e/evidence/neg_missing_schedule_hash.json new file mode 100644 index 00000000..c617fb79 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_schedule_hash.json @@ -0,0 +1,192 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_software.json b/scripts/e2e/evidence/neg_missing_software.json new file mode 100644 index 00000000..34adc7c4 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_software.json @@ -0,0 +1,187 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_missing_workload.json b/scripts/e2e/evidence/neg_missing_workload.json new file mode 100644 index 00000000..e67665f1 --- /dev/null +++ b/scripts/e2e/evidence/neg_missing_workload.json @@ -0,0 +1,178 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_noskip_environment_differs.json b/scripts/e2e/evidence/neg_noskip_environment_differs.json new file mode 100644 index 00000000..3fe8c736 --- /dev/null +++ b/scripts/e2e/evidence/neg_noskip_environment_differs.json @@ -0,0 +1,198 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_noskip", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 3, + "predecessor_arm": "vanilla_default", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "f5e42c9e224a73b90de61a98b55eb585b05a1c79a583fd2b7eee71167db8cd82", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_noskip.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "vanilla_cpu_family": { + "printed": "none printed", + "reading_rule": "native pack: absence of the no-AVX-512 note means cpu_avx512_ok() was true; negative indicator only", + "control": { + "env": "STRATA_FORCE_AVX2=1", + "printed": [ + "sample: this CPU has no AVX-512 note, text is a placeholder" + ] + }, + "predicate": "unavailable: sample fixture, predicate dump (S0.7c) not run", + "binary_identity": { + "engine_version": "sample-engine-0.0.0", + "sha256": "a879b093c70e663f151a2b05b020c9548c5baff7c1a9aa97facf4526ac55c474" + } + }, + "vanilla_noskip_environment": [ + "STRATA_ROUTE_TAIL_SKIP=0" + ] +} diff --git a/scripts/e2e/evidence/neg_ours_without_cpu_lines.json b/scripts/e2e/evidence/neg_ours_without_cpu_lines.json new file mode 100644 index 00000000..f178e717 --- /dev/null +++ b/scripts/e2e/evidence/neg_ours_without_cpu_lines.json @@ -0,0 +1,191 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_position_predecessor.json b/scripts/e2e/evidence/neg_position_predecessor.json new file mode 100644 index 00000000..51b49b50 --- /dev/null +++ b/scripts/e2e/evidence/neg_position_predecessor.json @@ -0,0 +1,195 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_default", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 2, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "24d840e9cffb1207e16ce08ea78c910ab4f156c2238964af1edebbd304125146", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_default.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "vanilla_cpu_family": { + "printed": "none printed", + "reading_rule": "native pack: absence of the no-AVX-512 note means cpu_avx512_ok() was true; negative indicator only", + "control": { + "env": "STRATA_FORCE_AVX2=1", + "printed": [ + "sample: this CPU has no AVX-512 note, text is a placeholder" + ] + }, + "predicate": "unavailable: sample fixture, predicate dump (S0.7c) not run", + "binary_identity": { + "engine_version": "sample-engine-0.0.0", + "sha256": "a879b093c70e663f151a2b05b020c9548c5baff7c1a9aa97facf4526ac55c474" + } + } +} diff --git a/scripts/e2e/evidence/neg_power_limit_changed_flag_wrong.json b/scripts/e2e/evidence/neg_power_limit_changed_flag_wrong.json new file mode 100644 index 00000000..b1736c6d --- /dev/null +++ b/scripts/e2e/evidence/neg_power_limit_changed_flag_wrong.json @@ -0,0 +1,193 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": true, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_prompt_tokens_199999.json b/scripts/e2e/evidence/neg_prompt_tokens_199999.json new file mode 100644 index 00000000..7d733161 --- /dev/null +++ b/scripts/e2e/evidence/neg_prompt_tokens_199999.json @@ -0,0 +1,193 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 199999, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_quality_without_tool_call_integrity.json b/scripts/e2e/evidence/neg_quality_without_tool_call_integrity.json new file mode 100644 index 00000000..75499a5d --- /dev/null +++ b/scripts/e2e/evidence/neg_quality_without_tool_call_integrity.json @@ -0,0 +1,192 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/neg_vanilla_claims_cpu_lines.json b/scripts/e2e/evidence/neg_vanilla_claims_cpu_lines.json new file mode 100644 index 00000000..6c1872d8 --- /dev/null +++ b/scripts/e2e/evidence/neg_vanilla_claims_cpu_lines.json @@ -0,0 +1,198 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_default", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 2, + "predecessor_arm": "ours", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "24d840e9cffb1207e16ce08ea78c910ab4f156c2238964af1edebbd304125146", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_default.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "vanilla_cpu_family": { + "printed": "none printed", + "reading_rule": "native pack: absence of the no-AVX-512 note means cpu_avx512_ok() was true; negative indicator only", + "control": { + "env": "STRATA_FORCE_AVX2=1", + "printed": [ + "sample: this CPU has no AVX-512 note, text is a placeholder" + ] + }, + "predicate": "unavailable: sample fixture, predicate dump (S0.7c) not run", + "binary_identity": { + "engine_version": "sample-engine-0.0.0", + "sha256": "a879b093c70e663f151a2b05b020c9548c5baff7c1a9aa97facf4526ac55c474" + } + }, + "kernel_lines": [ + "leleka-serve cpu: process kernel family avx512, sample line" + ] +} diff --git a/scripts/e2e/evidence/neg_vanilla_family_block_incomplete.json b/scripts/e2e/evidence/neg_vanilla_family_block_incomplete.json new file mode 100644 index 00000000..0c5af3a8 --- /dev/null +++ b/scripts/e2e/evidence/neg_vanilla_family_block_incomplete.json @@ -0,0 +1,189 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_default", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 2, + "predecessor_arm": "ours", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "24d840e9cffb1207e16ce08ea78c910ab4f156c2238964af1edebbd304125146", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_default.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "vanilla_cpu_family": { + "printed": "none printed", + "reading_rule": "native pack: absence of the no-AVX-512 note means cpu_avx512_ok() was true; negative indicator only", + "predicate": "unavailable: sample fixture, predicate dump (S0.7c) not run", + "binary_identity": { + "engine_version": "sample-engine-0.0.0", + "sha256": "a879b093c70e663f151a2b05b020c9548c5baff7c1a9aa97facf4526ac55c474" + } + } +} diff --git a/scripts/e2e/evidence/neg_vanilla_without_family_block.json b/scripts/e2e/evidence/neg_vanilla_without_family_block.json new file mode 100644 index 00000000..502248e7 --- /dev/null +++ b/scripts/e2e/evidence/neg_vanilla_without_family_block.json @@ -0,0 +1,180 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_default", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 2, + "predecessor_arm": "ours", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "24d840e9cffb1207e16ce08ea78c910ab4f156c2238964af1edebbd304125146", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_default.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + } +} diff --git a/scripts/e2e/evidence/negative_cases.json b/scripts/e2e/evidence/negative_cases.json new file mode 100644 index 00000000..b5c9c6a4 --- /dev/null +++ b/scripts/e2e/evidence/negative_cases.json @@ -0,0 +1,143 @@ +{ + "$comment": "Expected rejection per fixture; the suite fails when a fixture is accepted or rejected for another reason. row_b_env names the file passed as --row-b-env.", + "samples": [ + "sample_ours.json", + "sample_vanilla_default.json", + "sample_vanilla_noskip.json" + ], + "cases": [ + { + "file": "neg_bare_cpu_prefix.json", + "expect": "BAD_PATTERN" + }, + { + "file": "neg_build_id_without_features.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_build_id_without_triple.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_cache_warm_cold_mixed.json", + "expect": "SERIES_CACHE_MIXED" + }, + { + "file": "neg_component_level.json", + "expect": "LEVEL_NOT_END_TO_END" + }, + { + "file": "neg_context_131072.json", + "expect": "RULE_256K_CONTEXT" + }, + { + "file": "neg_countable_under_bootstrap.json", + "expect": "RULE_COUNTABLE_BOOTSTRAP" + }, + { + "file": "neg_countable_without_power_summary.json", + "expect": "RULE_COUNTABLE_POWER_SUMMARY" + }, + { + "file": "neg_enforced_power_limit_absent.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_enforced_power_limit_na.json", + "expect": "WRONG_TYPE" + }, + { + "file": "neg_missing_arm_identity.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_build_id.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_cache_state.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_configuration.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_countable.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_hardware.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_kernel_lines.json", + "expect": "RULE_OURS_CPU_LINE" + }, + { + "file": "neg_missing_metrics.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_model_digest.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_noskip_environment.json", + "expect": "RULE_NOSKIP_ENV" + }, + { + "file": "neg_missing_pair_id.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_schedule_hash.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_software.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_missing_workload.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_noskip_environment_differs.json", + "expect": "RULE_NOSKIP_ENV", + "row_b_env": "row_b_env_placeholder.txt" + }, + { + "file": "neg_ours_without_cpu_lines.json", + "expect": "RULE_OURS_CPU_LINE" + }, + { + "file": "neg_position_predecessor.json", + "expect": "RULE_POSITION" + }, + { + "file": "neg_power_limit_changed_flag_wrong.json", + "expect": "RULE_POWER_LIMIT_CHANGED" + }, + { + "file": "neg_prompt_tokens_199999.json", + "expect": "RULE_256K_PROMPT" + }, + { + "file": "neg_quality_without_tool_call_integrity.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_vanilla_claims_cpu_lines.json", + "expect": "RULE_VANILLA_CLAIMS_CPU" + }, + { + "file": "neg_vanilla_family_block_incomplete.json", + "expect": "MISSING_FIELD" + }, + { + "file": "neg_vanilla_without_family_block.json", + "expect": "RULE_VANILLA_BLOCK" + } + ] +} diff --git a/scripts/e2e/evidence/row_b_env_placeholder.txt b/scripts/e2e/evidence/row_b_env_placeholder.txt new file mode 100644 index 00000000..84990371 --- /dev/null +++ b/scripts/e2e/evidence/row_b_env_placeholder.txt @@ -0,0 +1,3 @@ +# PLACEHOLDER for the literal row (b) environment list of S0.7 (STRA-247). Replace it with that list once S0.7 exists. +STRATA_ROUTE_TAIL_SKIP=0 +STRATA_PREFILL_CPU_SHARE=0 diff --git a/scripts/e2e/evidence/sample_ours.json b/scripts/e2e/evidence/sample_ours.json new file mode 100644 index 00000000..6e4f1d21 --- /dev/null +++ b/scripts/e2e/evidence/sample_ours.json @@ -0,0 +1,193 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "ours", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 1, + "predecessor_arm": "none", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "4bd2f82a72c8002e4ee4f34032dc6dad223019713344643d93dc9f4846054824", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-ours.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "kernel_lines": [ + "leleka-serve cpu: logical cores 16, sample line", + "leleka-serve cpu: process kernel family avx512, sample line", + "leleka-serve gpu: sample device line" + ] +} diff --git a/scripts/e2e/evidence/sample_vanilla_default.json b/scripts/e2e/evidence/sample_vanilla_default.json new file mode 100644 index 00000000..c05f6679 --- /dev/null +++ b/scripts/e2e/evidence/sample_vanilla_default.json @@ -0,0 +1,195 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_default", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 2, + "predecessor_arm": "ours", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "24d840e9cffb1207e16ce08ea78c910ab4f156c2238964af1edebbd304125146", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_default.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "vanilla_cpu_family": { + "printed": "none printed", + "reading_rule": "native pack: absence of the no-AVX-512 note means cpu_avx512_ok() was true; negative indicator only", + "control": { + "env": "STRATA_FORCE_AVX2=1", + "printed": [ + "sample: this CPU has no AVX-512 note, text is a placeholder" + ] + }, + "predicate": "unavailable: sample fixture, predicate dump (S0.7c) not run", + "binary_identity": { + "engine_version": "sample-engine-0.0.0", + "sha256": "a879b093c70e663f151a2b05b020c9548c5baff7c1a9aa97facf4526ac55c474" + } + } +} diff --git a/scripts/e2e/evidence/sample_vanilla_noskip.json b/scripts/e2e/evidence/sample_vanilla_noskip.json new file mode 100644 index 00000000..30eeebd9 --- /dev/null +++ b/scripts/e2e/evidence/sample_vanilla_noskip.json @@ -0,0 +1,199 @@ +{ + "schema_version": "1", + "level": "END_TO_END", + "synthetic": true, + "arm_identity": { + "arm": "vanilla_noskip", + "series_id": "sample-series-0001", + "schedule_sha256": "3db8b24d4f714d5f146610f1cfc170e4a335808fbc71cacc6db4f474ae957e99", + "block": 1, + "position": 3, + "predecessor_arm": "vanilla_default", + "pair_id": "sample-pair-0001", + "h0_id": "sample-h0-0001" + }, + "ours_build_id_observed": null, + "ours_build_id_frozen": { + "commit": "0123456789abcdef0123456789abcdef01234567", + "target_triple": "x86_64-unknown-linux-gnu", + "cargo_features": [ + "cuda", + "native-cpu-expert" + ], + "profile_value_sha256": "f467e6a6af8f3bc29f37fe326d5dd922ebcf260e69561d160a1637fe8cd04dd0" + }, + "countable": false, + "invalid_reasons": [ + "SYNTHETIC_SAMPLE" + ], + "power_sample_summary": { + "min_w": 118.0, + "max_w": 126.5, + "mean_w": 122.0, + "gap_count": 0, + "series_sha256": "f5e42c9e224a73b90de61a98b55eb585b05a1c79a583fd2b7eee71167db8cd82", + "power_max_limit_w": 150.0, + "power_limit_changed": false, + "power_limit_source": "enforced.power.limit" + }, + "thresholds_source": "BOOTSTRAP", + "thresholds_sha256": "0bf18d635f3bbcd7a832ffb3470087a916f07374bc88b9064667f5b7de86c558", + "workload": { + "long_session_argv": [ + "long_session.py", + "--turns", + "5", + "--target-tokens", + "215000", + "--max-output", + "700", + "--context", + "262144" + ], + "source_snapshot_sha256": "9a92ae6bcccad3bcd49333ad426e8563725a56569409e4685f465a2029380171", + "turn1_tokens": 43000 + }, + "cache": { + "state": "WARM-OS/EMPTY-ENGINE", + "page_cache_residency_before": { + "metric": "model_file_resident_fraction", + "value": 0.97, + "unit": "fraction" + } + }, + "hardware": { + "machine_role": "sample-machine", + "cpu_model": "Sample CPU 16-Core", + "gpu_name": "Sample GPU 16GB", + "os": "Sample OS", + "enforced_power_limit_w_start": 130.0, + "enforced_power_limit_w_end": 130.0, + "power_sample_series_file": "power-vanilla_noskip.csv", + "owner_attestation": { + "present": true, + "identifier": "sample-attestation-1", + "time_utc": "2026-01-01T00:00:00Z" + }, + "foreign_load": { + "samples": [ + { + "process_name": "sample-indexer", + "cpu_percent_of_core": 1.5, + "duration_s": 1.0 + } + ] + } + }, + "software": { + "driver_version": "000.00", + "cuda_version": "00.0", + "leleka_commit": "0123456789abcdef0123456789abcdef01234567", + "strata_upstream_commit": "89abcdef0123456789abcdef0123456789abcdef" + }, + "model": { + "digest": "sample-model-digest", + "digest_mapping": "sample-digest-mapping-ref" + }, + "configuration": { + "context_tokens": 262144, + "kv": "sample-kv", + "slots": 1, + "batch": 512, + "speculation": "off" + }, + "metrics": { + "turns": [ + { + "turn": 1, + "prompt_tokens": 43000, + "cached_tokens": 0, + "output_tokens": 700, + "ttft_s": 20.0, + "prefill_tok_s": 2000.0, + "decode_tok_s": 100.0, + "wall_s": 30.0, + "prompt_sha256": "ec083f628134f3a280e427d6e0da67fdb4b642b87215489fd676024615c9802c", + "reply_sha256": "2c86e9d5103cdc914c5b33d4f3b41608b3f066ddb03627415118ba9db65ae770" + }, + { + "turn": 2, + "prompt_tokens": 86500, + "cached_tokens": 43700, + "output_tokens": 700, + "ttft_s": 25.0, + "prefill_tok_s": 2010.0, + "decode_tok_s": 100.0, + "wall_s": 35.0, + "prompt_sha256": "577a9d6aa198933c601acb4d7487c626fca0fd5a2273a2ab774552bc4810ecf0", + "reply_sha256": "e4a42272c02ebfa2a42db49068a731a524810cb672610d885ccc2dbb4fc24dca" + }, + { + "turn": 3, + "prompt_tokens": 130000, + "cached_tokens": 87200, + "output_tokens": 700, + "ttft_s": 30.0, + "prefill_tok_s": 2020.0, + "decode_tok_s": 100.0, + "wall_s": 40.0, + "prompt_sha256": "d05147290cd606a408c3f27c4ccbce4b3b23bca7d3686931fae8e9ac4a90706a", + "reply_sha256": "3ed2c7db71330b39ba84ba47467250fae9e5f24fd8f71d6f61d4628fc30ed6d6" + }, + { + "turn": 4, + "prompt_tokens": 172500, + "cached_tokens": 130700, + "output_tokens": 700, + "ttft_s": 35.0, + "prefill_tok_s": 2030.0, + "decode_tok_s": 100.0, + "wall_s": 45.0, + "prompt_sha256": "346b0fb987971973f6cfe83f6fb541b2848c2cf2cab330efc0ecec423a65f156", + "reply_sha256": "4a2e125c048147f45f10561b3660a60d1436189892570d1671bad7cba5d05072" + }, + { + "turn": 5, + "prompt_tokens": 215000, + "cached_tokens": 173200, + "output_tokens": 700, + "ttft_s": 40.0, + "prefill_tok_s": 2040.0, + "decode_tok_s": 100.0, + "wall_s": 50.0, + "prompt_sha256": "9b1a18caa443327f4f02c05226d96e74e40113ea7406dea63c1d30a9a8e95a88", + "reply_sha256": "055d4b078c7dd4c8cd34ac4be59fc32b3cffbbf145c54089275285abedd6ba04" + } + ], + "wall_s": 350.0, + "wall_norm_s": 350.0, + "draft_acceptance": null, + "expert_cache_hit": 0.9, + "kv_streaming_hit": null + }, + "quality": { + "verdict": "SAMPLE_NOT_MEASURED", + "tolerance": "greedy identical", + "basis": "sample fixture", + "baseline": "sample-baseline", + "tool_call_integrity": "sample: not measured" + }, + "vanilla_cpu_family": { + "printed": "none printed", + "reading_rule": "native pack: absence of the no-AVX-512 note means cpu_avx512_ok() was true; negative indicator only", + "control": { + "env": "STRATA_FORCE_AVX2=1", + "printed": [ + "sample: this CPU has no AVX-512 note, text is a placeholder" + ] + }, + "predicate": "unavailable: sample fixture, predicate dump (S0.7c) not run", + "binary_identity": { + "engine_version": "sample-engine-0.0.0", + "sha256": "a879b093c70e663f151a2b05b020c9548c5baff7c1a9aa97facf4526ac55c474" + } + }, + "vanilla_noskip_environment": [ + "STRATA_ROUTE_TAIL_SKIP=0", + "STRATA_PREFILL_CPU_SHARE=0" + ] +} diff --git a/scripts/e2e/evidence/schema.json b/scripts/e2e/evidence/schema.json new file mode 100644 index 00000000..ecb78bdc --- /dev/null +++ b/scripts/e2e/evidence/schema.json @@ -0,0 +1,287 @@ +{ + "$comment": "END_TO_END evidence record, schema v1 (STRA-246, S0.1). One record = one run of one arm. Interpreted by validate.py (hand-written, stdlib only): supported keywords are type, required, properties, additionalProperties (false only), enum, const, pattern, minLength, minimum, exclusiveMinimum, maximum, minItems, items, anyOf and $ref to #/definitions/. Cross-field rules are listed in 'rules' and implemented in validate.py. No statistics are stored per record (mean, median, percentiles and CI belong to STRA-290). COMPONENT levels are STRA-287; 'countable' is derived by STRA-312, the validator only rejects countable=true without the power summary or under BOOTSTRAP thresholds.", + "schema_version": "1", + "level": "END_TO_END", + "constants": { + "context_tokens_256k": 262144, + "min_max_prompt_tokens_256k": 200000, + "ours_cpu_line_regex": "^leleka-serve cpu: ", + "bare_cpu_line_regex": "^(leleka-serve )?cpu:", + "min_negative_cases": 17 + }, + "rules": [ + {"id": "RULE_256K_CONTEXT", "text": "configuration.context_tokens == context_tokens_256k"}, + {"id": "RULE_256K_PROMPT", "text": "max(metrics.turns[].prompt_tokens) >= min_max_prompt_tokens_256k"}, + {"id": "RULE_TURN1_TOKENS", "text": "workload.turn1_tokens == metrics.turns[0].prompt_tokens"}, + {"id": "RULE_TURN_ORDER", "text": "turn numbers are 1..n in order; cached_tokens <= prompt_tokens"}, + {"id": "RULE_POSITION", "text": "position 1 has predecessor 'none'; later positions name another arm"}, + {"id": "RULE_OBSERVED_BUILD", "text": "ours_build_id_observed is an object for arm ours and null for vanilla arms"}, + {"id": "RULE_OURS_CPU_LINE", "text": "ours: kernel_lines holds at least one 'leleka-serve cpu: ' line"}, + {"id": "RULE_OURS_NO_VANILLA_BLOCK", "text": "ours: vanilla_cpu_family and vanilla_noskip_environment absent"}, + {"id": "RULE_VANILLA_CLAIMS_CPU", "text": "vanilla: kernel_lines empty or absent, no printed line starting 'cpu:'"}, + {"id": "RULE_VANILLA_BLOCK", "text": "vanilla: vanilla_cpu_family present"}, + {"id": "RULE_NOSKIP_ENV", "text": "vanilla_noskip: vanilla_noskip_environment present (other arms: absent); equals the --row-b-env list when given"}, + {"id": "RULE_ATTESTATION", "text": "owner_attestation.present true needs identifier and time_utc; false needs both null"}, + {"id": "RULE_POWER_SUMMARY_ORDER", "text": "power_sample_summary: min_w <= mean_w <= max_w"}, + {"id": "RULE_POWER_LIMIT_CHANGED", "text": "power_limit_changed == (start limit != end limit)"}, + {"id": "RULE_COUNTABLE_POWER_SUMMARY", "text": "countable true needs power_sample_summary"}, + {"id": "RULE_COUNTABLE_BOOTSTRAP", "text": "countable true is rejected under thresholds_source BOOTSTRAP"}, + {"id": "SERIES_*", "text": "bundle/merge: one series_id, one schedule_sha256, one ours_build_id_frozen, one cache state (WARM and COLD never pooled), no repeated (block, arm)"} + ], + "definitions": { + "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, + "commit": {"type": "string", "pattern": "^[0-9a-f]{7,40}$"}, + "text": {"type": "string", "minLength": 1}, + "utc": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"}, + "file_name": {"type": "string", "pattern": "^[^/\\\\]+$"}, + "arm_name": {"type": "string", "enum": ["ours", "vanilla_default", "vanilla_noskip"]}, + "nonneg_int": {"type": "integer", "minimum": 0}, + "pos_int": {"type": "integer", "minimum": 1}, + "pos_number": {"type": "number", "exclusiveMinimum": 0}, + "nonneg_number": {"type": "number", "minimum": 0}, + "fraction": {"type": "number", "minimum": 0, "maximum": 1}, + "nullable_fraction": {"anyOf": [{"$ref": "#/definitions/fraction"}, {"type": "null"}]}, + "string_list": {"type": "array", "items": {"$ref": "#/definitions/text"}}, + "env_entry": {"type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*=.*$"}, + "build_id": { + "type": "object", + "required": ["commit", "target_triple", "cargo_features", "profile_value_sha256"], + "additionalProperties": false, + "properties": { + "commit": {"$ref": "#/definitions/commit"}, + "target_triple": {"type": "string", "pattern": "^[a-z0-9_]+(-[a-z0-9_.]+){2,3}$"}, + "cargo_features": {"$ref": "#/definitions/string_list"}, + "profile_value_sha256": {"$ref": "#/definitions/sha256"} + } + }, + "turn": { + "type": "object", + "required": ["turn", "prompt_tokens", "cached_tokens", "output_tokens", "ttft_s", "prefill_tok_s", "decode_tok_s", "wall_s", "prompt_sha256", "reply_sha256"], + "additionalProperties": false, + "properties": { + "turn": {"$ref": "#/definitions/pos_int"}, + "prompt_tokens": {"$ref": "#/definitions/pos_int"}, + "cached_tokens": {"$ref": "#/definitions/nonneg_int"}, + "output_tokens": {"$ref": "#/definitions/nonneg_int"}, + "ttft_s": {"$ref": "#/definitions/pos_number"}, + "prefill_tok_s": {"$ref": "#/definitions/pos_number"}, + "decode_tok_s": {"anyOf": [{"$ref": "#/definitions/pos_number"}, {"type": "null"}]}, + "wall_s": {"$ref": "#/definitions/pos_number"}, + "prompt_sha256": {"$ref": "#/definitions/sha256"}, + "reply_sha256": {"$ref": "#/definitions/sha256"} + } + }, + "power_sample_summary": { + "type": "object", + "required": ["min_w", "max_w", "mean_w", "gap_count", "series_sha256", "power_max_limit_w", "power_limit_changed", "power_limit_source"], + "additionalProperties": false, + "properties": { + "min_w": {"$ref": "#/definitions/nonneg_number"}, + "max_w": {"$ref": "#/definitions/nonneg_number"}, + "mean_w": {"$ref": "#/definitions/nonneg_number"}, + "gap_count": {"$ref": "#/definitions/nonneg_int"}, + "series_sha256": {"$ref": "#/definitions/sha256"}, + "power_max_limit_w": {"$ref": "#/definitions/pos_number"}, + "power_limit_changed": {"type": "boolean"}, + "power_limit_source": {"type": "string", "enum": ["enforced.power.limit", "power.limit"]} + } + }, + "vanilla_cpu_family": { + "type": "object", + "required": ["printed", "reading_rule", "control", "predicate", "binary_identity"], + "additionalProperties": false, + "properties": { + "printed": {"anyOf": [{"$ref": "#/definitions/string_list"}, {"type": "string", "const": "none printed"}]}, + "reading_rule": {"$ref": "#/definitions/text"}, + "control": { + "type": "object", + "required": ["env", "printed"], + "additionalProperties": false, + "properties": { + "env": {"$ref": "#/definitions/env_entry"}, + "printed": {"anyOf": [{"$ref": "#/definitions/string_list"}, {"type": "string", "const": "none printed"}]} + } + }, + "predicate": { + "anyOf": [ + {"type": "object", "required": ["tool", "output"], "additionalProperties": false, "properties": {"tool": {"$ref": "#/definitions/text"}, "output": {"$ref": "#/definitions/text"}}}, + {"type": "string", "pattern": "^unavailable: .+"} + ] + }, + "binary_identity": { + "type": "object", + "required": ["engine_version", "sha256"], + "additionalProperties": false, + "properties": {"engine_version": {"$ref": "#/definitions/text"}, "sha256": {"$ref": "#/definitions/sha256"}} + } + } + }, + "quality": { + "type": "object", + "required": ["verdict", "tolerance", "basis", "baseline", "tool_call_integrity"], + "additionalProperties": false, + "properties": { + "verdict": {"$ref": "#/definitions/text"}, + "tolerance": {"anyOf": [{"type": "number"}, {"$ref": "#/definitions/text"}]}, + "basis": {"$ref": "#/definitions/text"}, + "baseline": {"$ref": "#/definitions/text"}, + "tool_call_integrity": {"anyOf": [{"$ref": "#/definitions/text"}, {"type": "object"}, {"type": "boolean"}]}, + "experimental": {"type": "boolean"} + } + } + }, + "root": { + "type": "object", + "required": [ + "schema_version", "level", "arm_identity", "ours_build_id_observed", "ours_build_id_frozen", + "countable", "invalid_reasons", "thresholds_source", "thresholds_sha256", + "workload", "cache", "hardware", "software", "model", "configuration", "metrics", "quality" + ], + "additionalProperties": false, + "properties": { + "schema_version": {"type": "string", "const": "1"}, + "level": {"type": "string", "const": "END_TO_END"}, + "synthetic": {"type": "boolean"}, + "arm_identity": { + "type": "object", + "required": ["arm", "series_id", "schedule_sha256", "block", "position", "predecessor_arm", "pair_id", "h0_id"], + "additionalProperties": false, + "properties": { + "arm": {"$ref": "#/definitions/arm_name"}, + "series_id": {"$ref": "#/definitions/text"}, + "schedule_sha256": {"$ref": "#/definitions/sha256"}, + "block": {"$ref": "#/definitions/pos_int"}, + "position": {"type": "integer", "minimum": 1, "maximum": 3}, + "predecessor_arm": {"type": "string", "enum": ["none", "ours", "vanilla_default", "vanilla_noskip"]}, + "pair_id": {"$ref": "#/definitions/text"}, + "h0_id": {"$ref": "#/definitions/text"} + } + }, + "ours_build_id_observed": {"anyOf": [{"$ref": "#/definitions/build_id"}, {"type": "null"}]}, + "ours_build_id_frozen": {"$ref": "#/definitions/build_id"}, + "countable": {"type": "boolean"}, + "invalid_reasons": {"$ref": "#/definitions/string_list"}, + "power_sample_summary": {"$ref": "#/definitions/power_sample_summary"}, + "thresholds_source": {"type": "string", "enum": ["BOOTSTRAP", "S3.7_FILE"]}, + "thresholds_sha256": {"$ref": "#/definitions/sha256"}, + "workload": { + "type": "object", + "required": ["long_session_argv", "source_snapshot_sha256", "turn1_tokens"], + "additionalProperties": false, + "properties": { + "long_session_argv": {"type": "array", "minItems": 1, "items": {"$ref": "#/definitions/text"}}, + "source_snapshot_sha256": {"$ref": "#/definitions/sha256"}, + "turn1_tokens": {"$ref": "#/definitions/pos_int"} + } + }, + "cache": { + "type": "object", + "required": ["state", "page_cache_residency_before"], + "additionalProperties": false, + "properties": { + "state": {"type": "string", "enum": ["WARM-OS/EMPTY-ENGINE", "COLD"]}, + "page_cache_residency_before": { + "type": "object", + "required": ["metric", "value", "unit"], + "additionalProperties": false, + "properties": {"metric": {"$ref": "#/definitions/text"}, "value": {"$ref": "#/definitions/nonneg_number"}, "unit": {"$ref": "#/definitions/text"}} + } + } + }, + "hardware": { + "type": "object", + "required": [ + "machine_role", "cpu_model", "gpu_name", "os", + "enforced_power_limit_w_start", "enforced_power_limit_w_end", "power_sample_series_file", + "owner_attestation", "foreign_load" + ], + "additionalProperties": false, + "properties": { + "machine_role": {"$ref": "#/definitions/text"}, + "cpu_model": {"$ref": "#/definitions/text"}, + "gpu_name": {"$ref": "#/definitions/text"}, + "os": {"$ref": "#/definitions/text"}, + "enforced_power_limit_w_start": {"$ref": "#/definitions/pos_number"}, + "enforced_power_limit_w_end": {"$ref": "#/definitions/pos_number"}, + "power_sample_series_file": {"$ref": "#/definitions/file_name"}, + "owner_attestation": { + "type": "object", + "required": ["present", "identifier", "time_utc"], + "additionalProperties": false, + "properties": { + "present": {"type": "boolean"}, + "identifier": {"anyOf": [{"$ref": "#/definitions/text"}, {"type": "null"}]}, + "time_utc": {"anyOf": [{"$ref": "#/definitions/utc"}, {"type": "null"}]} + } + }, + "foreign_load": { + "type": "object", + "required": ["samples"], + "additionalProperties": false, + "properties": { + "samples": { + "type": "array", + "items": { + "type": "object", + "required": ["process_name", "cpu_percent_of_core", "duration_s"], + "additionalProperties": false, + "properties": { + "process_name": {"$ref": "#/definitions/text"}, + "cpu_percent_of_core": {"$ref": "#/definitions/nonneg_number"}, + "duration_s": {"$ref": "#/definitions/nonneg_number"} + } + } + } + } + } + } + }, + "software": { + "type": "object", + "required": ["driver_version", "cuda_version", "leleka_commit", "strata_upstream_commit"], + "additionalProperties": false, + "properties": { + "driver_version": {"$ref": "#/definitions/text"}, + "cuda_version": {"$ref": "#/definitions/text"}, + "leleka_commit": {"$ref": "#/definitions/commit"}, + "strata_upstream_commit": {"$ref": "#/definitions/commit"} + } + }, + "model": { + "type": "object", + "required": ["digest", "digest_mapping"], + "additionalProperties": false, + "properties": {"digest": {"$ref": "#/definitions/text"}, "digest_mapping": {"$ref": "#/definitions/text"}} + }, + "configuration": { + "type": "object", + "required": ["context_tokens", "kv", "slots", "batch", "speculation"], + "additionalProperties": false, + "properties": { + "context_tokens": {"$ref": "#/definitions/pos_int"}, + "kv": {"$ref": "#/definitions/text"}, + "slots": {"$ref": "#/definitions/pos_int"}, + "batch": {"$ref": "#/definitions/pos_int"}, + "speculation": {"$ref": "#/definitions/text"} + } + }, + "metrics": { + "type": "object", + "required": ["turns", "wall_s", "wall_norm_s", "draft_acceptance", "expert_cache_hit", "kv_streaming_hit"], + "additionalProperties": false, + "properties": { + "turns": {"type": "array", "minItems": 1, "items": {"$ref": "#/definitions/turn"}}, + "wall_s": {"$ref": "#/definitions/pos_number"}, + "wall_norm_s": {"$ref": "#/definitions/pos_number"}, + "draft_acceptance": {"$ref": "#/definitions/nullable_fraction"}, + "expert_cache_hit": {"$ref": "#/definitions/nullable_fraction"}, + "kv_streaming_hit": {"$ref": "#/definitions/nullable_fraction"} + } + }, + "quality": {"$ref": "#/definitions/quality"}, + "kernel_lines": {"type": "array", "items": {"type": "string", "pattern": "^leleka-serve (cpu|gpu): "}}, + "vanilla_cpu_family": {"$ref": "#/definitions/vanilla_cpu_family"}, + "vanilla_noskip_environment": {"type": "array", "minItems": 1, "items": {"$ref": "#/definitions/env_entry"}} + } + } +} diff --git a/scripts/e2e/evidence/test_validate.py b/scripts/e2e/evidence/test_validate.py new file mode 100644 index 00000000..cc0722dd --- /dev/null +++ b/scripts/e2e/evidence/test_validate.py @@ -0,0 +1,356 @@ +"""Tests of the END_TO_END evidence validator (STRA-246). Run: python -m unittest discover -s scripts/e2e/evidence -p "test_validate.py" -v +Stdlib only, Python >= 3.9.""" +import copy +import json +import os +import re +import subprocess +import sys +import tempfile +import unittest + +HERE = os.path.dirname(os.path.abspath(__file__)) +REPO = os.path.abspath(os.path.join(HERE, "..", "..", "..")) +sys.path.insert(0, HERE) +sys.path.insert(0, os.path.join(HERE, "..")) +import validate as V # noqa: E402 + +VALIDATE = os.path.join(HERE, "validate.py") +SAMPLES = ["sample_ours.json", "sample_vanilla_default.json", "sample_vanilla_noskip.json"] + + +def load(name): + return V.load_json(os.path.join(HERE, name)) + + +def run_cli(*args): + proc = subprocess.run([sys.executable, VALIDATE] + list(args), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, cwd=REPO) + return proc.returncode, proc.stdout, proc.stderr + + +def codes(rec, row_b=None): + return [c for c, _, _ in V.validate_record(rec, V.load_schema(), row_b)] + + +class SchemaInterpreter(unittest.TestCase): + def check(self, schema, value, defs=None): + errors = [] + V.interpret(schema, value, "", defs or {}, errors) + return [c for c, _, _ in errors] + + def test_bool_is_not_a_number_or_integer(self): + self.assertEqual(self.check({"type": "number"}, True), ["WRONG_TYPE"]) + self.assertEqual(self.check({"type": "integer"}, True), ["WRONG_TYPE"]) + self.assertEqual(self.check({"type": "integer"}, 3), []) + self.assertEqual(self.check({"type": "number"}, 3), []) + self.assertEqual(self.check({"type": "integer"}, 3.5), ["WRONG_TYPE"]) + + def test_required_enum_const_pattern_range(self): + schema = {"type": "object", "required": ["a"], "additionalProperties": False, "properties": {"a": {"type": "string", "enum": ["x"]}}} + self.assertEqual(self.check(schema, {}), ["MISSING_FIELD"]) + self.assertEqual(self.check(schema, {"a": "y"}), ["BAD_VALUE"]) + self.assertEqual(self.check(schema, {"a": "x", "b": 1}), ["UNKNOWN_FIELD"]) + self.assertEqual(self.check({"type": "string", "pattern": "^a"}, "ba"), ["BAD_PATTERN"]) + self.assertEqual(self.check({"type": "number", "exclusiveMinimum": 0}, 0), ["OUT_OF_RANGE"]) + self.assertEqual(self.check({"type": "number", "minimum": 0, "maximum": 1}, 1.5), ["OUT_OF_RANGE"]) + self.assertEqual(self.check({"type": "array", "minItems": 1}, []), ["TOO_FEW_ITEMS"]) + + def test_anyof_and_ref(self): + defs = {"s": {"type": "string", "minLength": 1}} + schema = {"anyOf": [{"$ref": "#/definitions/s"}, {"type": "null"}]} + self.assertEqual(self.check(schema, None, defs), []) + self.assertEqual(self.check(schema, "x", defs), []) + self.assertEqual(self.check(schema, "", defs), ["TOO_SHORT"]) + self.assertEqual(self.check(schema, 5, defs), ["NO_ALTERNATIVE_MATCHES"]) + with self.assertRaises(ValueError): + self.check({"$ref": "#/definitions/missing"}, 1, defs) + + def test_schema_uses_only_supported_keywords(self): + supported = {"$comment", "$ref", "anyOf", "type", "const", "enum", "minLength", "pattern", "minimum", "exclusiveMinimum", "maximum", + "required", "properties", "additionalProperties", "minItems", "items"} + + def walk(node, path): + if isinstance(node, dict): + for key, child in node.items(): + if key in ("properties", "definitions"): + for name, sub in child.items(): + walk(sub, path + "/" + name) + elif key in ("anyOf",): + for index, sub in enumerate(child): + walk(sub, "%s/%s/%d" % (path, key, index)) + elif key in ("items", "root"): + walk(child, path + "/" + key) + else: + self.assertIn(key, supported, "unsupported keyword %s at %s" % (key, path)) + schema = V.load_schema() + walk(schema["root"], "root") + for name, sub in schema["definitions"].items(): + walk(sub, "definitions/" + name) + + +class SamplesAndCli(unittest.TestCase): + def test_samples_valid_via_cli_without_edit(self): + for name, arm in zip(SAMPLES, ["ours", "vanilla_default", "vanilla_noskip"]): + code, out, _ = run_cli(os.path.join("scripts", "e2e", "evidence", name)) + self.assertEqual((code, out.strip()), (0, "OK " + arm), name) + + def test_noskip_sample_matches_placeholder_row_b(self): + code, out, err = run_cli(os.path.join(HERE, "sample_vanilla_noskip.json"), "--row-b-env", os.path.join(HERE, "row_b_env_placeholder.txt")) + self.assertEqual((code, out.strip(), err), (0, "OK vanilla_noskip", "")) + + def test_row_b_env_json_list_form(self): + with tempfile.TemporaryDirectory() as tmp: + path = os.path.join(tmp, "row_b.json") + with open(path, "w", encoding="utf-8") as handle: + json.dump(["STRATA_PREFILL_CPU_SHARE=0", "STRATA_ROUTE_TAIL_SKIP=0"], handle) + code, out, _ = run_cli(os.path.join(HERE, "sample_vanilla_noskip.json"), "--row-b-env", path) + self.assertEqual((code, out.strip()), (0, "OK vanilla_noskip")) + + def test_negative_suite_all_rejected(self): + code, out, _ = run_cli("--negative-suite") + match = re.search(r"^rejected: (\d+)/(\d+)$", out, re.M) + self.assertEqual(code, 0, out) + self.assertIsNotNone(match) + self.assertEqual(match.group(1), match.group(2)) + self.assertGreaterEqual(int(match.group(2)), 17) + + def test_negative_fixtures_and_index_agree(self): + index = load("negative_cases.json") + listed = sorted(c["file"] for c in index["cases"]) + on_disk = sorted(n for n in os.listdir(HERE) if n.startswith("neg_") and n.endswith(".json")) + self.assertEqual(listed, on_disk) + for case in index["cases"]: + self.assertTrue(case["expect"]) + + def test_merge_refuses_component(self): + code, out, _ = run_cli("merge", os.path.join(HERE, "sample_ours.json"), os.path.join(HERE, "neg_component_level.json")) + self.assertEqual(code, 1) + self.assertIn("END_TO_END with COMPONENT refused", out) + + def test_merge_accepts_one_series(self): + code, out, _ = run_cli("merge", os.path.join(HERE, "sample_ours.json"), os.path.join(HERE, "sample_vanilla_default.json")) + self.assertEqual(code, 0, out) + self.assertIn("MERGED 2 records", out) + + def test_merge_refuses_cold_with_warm(self): + cold = load("sample_vanilla_default.json") + cold["cache"]["state"] = "COLD" + with tempfile.TemporaryDirectory() as tmp: + path = os.path.join(tmp, "cold.json") + with open(path, "w", encoding="utf-8") as handle: + json.dump(cold, handle) + code, out, _ = run_cli("merge", os.path.join(HERE, "sample_ours.json"), path) + self.assertEqual(code, 1) + self.assertIn("SERIES_CACHE_MIXED", out) + + def test_usage_and_io_errors_exit_2(self): + self.assertEqual(run_cli()[0], 2) + self.assertEqual(run_cli("no_such_file.json")[0], 2) + + def test_rejection_exit_code_and_reason(self): + code, out, _ = run_cli(os.path.join(HERE, "neg_context_131072.json")) + self.assertEqual(code, 1) + self.assertIn("RULE_256K_CONTEXT", out) + + def test_schema_validator_is_python39_syntax(self): + import ast + for name in ("validate.py", "test_validate.py"): + with open(os.path.join(HERE, name), "r", encoding="utf-8") as handle: + ast.parse(handle.read(), filename=name, feature_version=(3, 9)) + + def test_long_session_still_has_the_256k_default(self): + # the 256k constant of schema.json mirrors long_session.py's --context default; long_session.py is read, never edited + import inspect + import long_session + self.assertIn("default=%d" % V.load_schema()["constants"]["context_tokens_256k"], inspect.getsource(long_session.main)) + + +class Rules(unittest.TestCase): + def setUp(self): + self.ours = load("sample_ours.json") + self.van = load("sample_vanilla_default.json") + self.noskip = load("sample_vanilla_noskip.json") + + def test_constants_are_the_256k_class(self): + constants = V.load_schema()["constants"] + self.assertEqual((constants["context_tokens_256k"], constants["min_max_prompt_tokens_256k"]), (262144, 200000)) + + def test_prompt_tokens_boundary(self): + self.ours["metrics"]["turns"][-1]["prompt_tokens"] = 200000 + self.assertEqual(codes(self.ours), []) + self.ours["metrics"]["turns"][-1]["prompt_tokens"] = 199999 + self.assertEqual(codes(self.ours), ["RULE_256K_PROMPT"]) + + def test_context_must_be_exactly_262144(self): + for value in (131072, 262143, 524288): + self.ours["configuration"]["context_tokens"] = value + self.assertEqual(codes(self.ours), ["RULE_256K_CONTEXT"]) + + def test_bare_cpu_prefix_rejected_prefixed_accepted(self): + self.ours["kernel_lines"] = ["cpu: x"] + self.assertIn("BAD_PATTERN", codes(self.ours)) + self.ours["kernel_lines"] = ["leleka-serve cpu: x"] + self.assertEqual(codes(self.ours), []) + self.ours["kernel_lines"] = ["xleleka-serve cpu: x"] + self.assertIn("BAD_PATTERN", codes(self.ours)) + + def test_vanilla_printed_cpu_line_rejected(self): + self.van["vanilla_cpu_family"]["printed"] = ["cpu: kernel family avx512"] + self.assertEqual(codes(self.van), ["RULE_VANILLA_CLAIMS_CPU"]) + + def test_vanilla_family_block_shapes(self): + self.van["vanilla_cpu_family"]["predicate"] = {"tool": "iq_avx2_parity", "output": "avx2=1 avx512=1"} + self.van["vanilla_cpu_family"]["printed"] = ["note line"] + self.assertEqual(codes(self.van), []) + self.van["vanilla_cpu_family"]["predicate"] = "no predicate" + self.assertEqual(codes(self.van), ["BAD_PATTERN"]) + self.van["vanilla_cpu_family"]["predicate"] = 5 + self.assertEqual(codes(self.van), ["NO_ALTERNATIVE_MATCHES"]) + self.van["vanilla_cpu_family"]["predicate"] = "unavailable: no compiler" + self.van["vanilla_cpu_family"]["printed"] = "printed nothing" + self.assertEqual(codes(self.van), ["BAD_VALUE"]) + + def test_ours_cannot_carry_vanilla_block(self): + self.ours["vanilla_cpu_family"] = copy.deepcopy(self.van["vanilla_cpu_family"]) + self.assertEqual(codes(self.ours), ["RULE_OURS_NO_VANILLA_BLOCK"]) + + def test_observed_build_id_by_arm(self): + self.van["ours_build_id_observed"] = copy.deepcopy(self.ours["ours_build_id_observed"]) + self.assertEqual(codes(self.van), ["RULE_OBSERVED_BUILD"]) + self.ours["ours_build_id_observed"] = None + self.assertEqual(codes(self.ours), ["RULE_OBSERVED_BUILD"]) + + def test_build_id_needs_triple_and_features_and_profile_hash(self): + for key in ("target_triple", "cargo_features", "profile_value_sha256", "commit"): + rec = copy.deepcopy(self.ours) + del rec["ours_build_id_frozen"][key] + self.assertEqual(codes(rec), ["MISSING_FIELD"], key) + + def test_countable_rules(self): + rec = copy.deepcopy(self.ours) + rec.update({"countable": True, "invalid_reasons": [], "thresholds_source": "S3.7_FILE"}) + self.assertEqual(codes(rec), []) + no_summary = copy.deepcopy(rec) + del no_summary["power_sample_summary"] + self.assertEqual(codes(no_summary), ["RULE_COUNTABLE_POWER_SUMMARY"]) + bootstrap = copy.deepcopy(rec) + bootstrap["thresholds_source"] = "BOOTSTRAP" + self.assertEqual(codes(bootstrap), ["RULE_COUNTABLE_BOOTSTRAP"]) + # a non-countable record may lack the summary (the run is invalid anyway) + invalid = copy.deepcopy(self.ours) + del invalid["power_sample_summary"] + self.assertEqual(codes(invalid), []) + + def test_power_limit_na_and_zero_rejected(self): + self.ours["hardware"]["enforced_power_limit_w_end"] = "N/A" + self.assertEqual(codes(self.ours), ["WRONG_TYPE"]) + self.ours["hardware"]["enforced_power_limit_w_end"] = 0 + self.assertEqual(codes(self.ours), ["OUT_OF_RANGE"]) + + def test_power_limit_changed_flag_follows_limits(self): + self.ours["hardware"]["enforced_power_limit_w_end"] = 110.0 + self.assertEqual(codes(self.ours), ["RULE_POWER_LIMIT_CHANGED"]) + self.ours["power_sample_summary"]["power_limit_changed"] = True + self.assertEqual(codes(self.ours), []) + + def test_power_source_enum(self): + self.ours["power_sample_summary"]["power_limit_source"] = "guess" + self.assertEqual(codes(self.ours), ["BAD_VALUE"]) + + def test_attestation_rules(self): + self.ours["hardware"]["owner_attestation"] = {"present": False, "identifier": None, "time_utc": None} + self.assertEqual(codes(self.ours), []) + self.ours["hardware"]["owner_attestation"] = {"present": True, "identifier": None, "time_utc": None} + self.assertEqual(codes(self.ours), ["RULE_ATTESTATION"]) + self.ours["hardware"]["owner_attestation"] = {"present": False, "identifier": "x", "time_utc": None} + self.assertEqual(codes(self.ours), ["RULE_ATTESTATION"]) + + def test_noskip_environment_comparison(self): + row_b = ["STRATA_PREFILL_CPU_SHARE=0", "STRATA_ROUTE_TAIL_SKIP=0"] + self.assertEqual(codes(self.noskip, row_b), []) + self.noskip["vanilla_noskip_environment"].append("STRATA_EXTRA=1") + self.assertEqual(codes(self.noskip, row_b), ["RULE_NOSKIP_ENV"]) + self.assertEqual(codes(self.noskip), []) + self.van["vanilla_noskip_environment"] = ["A=1"] + self.assertEqual(codes(self.van), ["RULE_NOSKIP_ENV"]) + + def test_quality_block_rules(self): + self.ours["quality"]["experimental"] = True + self.assertEqual(codes(self.ours), []) + self.ours["quality"]["tool_call_integrity"] = {"verdict": "PASS", "detail": "x"} + self.assertEqual(codes(self.ours), []) + del self.ours["quality"]["tool_call_integrity"] + self.assertEqual(codes(self.ours), ["MISSING_FIELD"]) + + def test_position_and_predecessor(self): + self.ours["arm_identity"]["predecessor_arm"] = "vanilla_default" + self.assertEqual(codes(self.ours), ["RULE_POSITION"]) + self.van["arm_identity"]["predecessor_arm"] = "vanilla_default" + self.assertEqual(codes(self.van), ["RULE_POSITION"]) + + def test_turn_rules(self): + self.ours["metrics"]["turns"][2]["cached_tokens"] = 999999 + self.assertEqual(codes(self.ours), ["RULE_TURN_ORDER"]) + self.ours["metrics"]["turns"][2]["cached_tokens"] = 0 + self.ours["metrics"]["turns"][1]["turn"] = 7 + self.assertEqual(codes(self.ours), ["RULE_TURN_ORDER"]) + self.ours["metrics"]["turns"][1]["turn"] = 2 + self.ours["workload"]["turn1_tokens"] = 1 + self.assertEqual(codes(self.ours), ["RULE_TURN1_TOKENS"]) + + def test_no_statistics_fields_per_record(self): + for key in ("mean", "median", "p95", "ci"): + rec = copy.deepcopy(self.ours) + rec["metrics"][key] = 1.0 + self.assertEqual(codes(rec), ["UNKNOWN_FIELD"], key) + + def test_series_rules(self): + records = [self.ours, self.van, self.noskip] + self.assertEqual(V.series_errors(records), []) + other = copy.deepcopy(self.van) + other["arm_identity"]["series_id"] = "other" + other["arm_identity"]["schedule_sha256"] = "0" * 64 + other["ours_build_id_frozen"]["commit"] = "f" * 40 + self.assertEqual(sorted(c for c, _, _ in V.series_errors([self.ours, other])), ["SERIES_BUILD_MIXED", "SERIES_ID_MIXED", "SERIES_SCHEDULE_MIXED"]) + self.assertEqual([c for c, _, _ in V.series_errors([self.ours, copy.deepcopy(self.ours)])], ["SERIES_DUPLICATE_ARM"]) + + def test_bundle_document(self): + schema = V.load_schema() + errors, label = V.validate_document({"series_records": [self.ours, self.van, self.noskip]}, schema) + self.assertEqual((errors, label), ([], "series sample-series-0001")) + errors, _ = V.validate_document({"series_records": []}, schema) + self.assertEqual([c for c, _, _ in errors], ["BAD_BUNDLE"]) + broken = copy.deepcopy(self.ours) + del broken["countable"] + errors, _ = V.validate_document({"series_records": [self.ours, broken]}, schema) + self.assertEqual([(c, p) for c, p, _ in errors], [("MISSING_FIELD", "/series_records/1/countable")]) + + def test_level_other_than_end_to_end_rejected(self): + self.ours["level"] = "COMPONENT_TABLE" + self.assertEqual(codes(self.ours), ["LEVEL_NOT_END_TO_END"]) + + def test_samples_are_marked_synthetic_and_carry_no_paths(self): + for name in SAMPLES: + with open(os.path.join(HERE, name), "r", encoding="utf-8") as handle: + text = handle.read() + self.assertTrue(json.loads(text)["synthetic"]) + self.assertNotRegex(text, r"[A-Za-z]:\\\\|/home/|/Users/") + + +class CharterMap(unittest.TestCase): + def test_one_row_per_charter_4_3_bullet(self): + with open(os.path.join(REPO, "PROJECT_CHARTER.md"), "r", encoding="utf-8") as handle: + lines = handle.read().splitlines() + start = next(i for i, line in enumerate(lines) if line.startswith("### 4.3")) + end = next(i for i, line in enumerate(lines) if line.startswith("### 4.4")) + bullets = [line for line in lines[start:end] if line.startswith("- ")] + with open(os.path.join(HERE, "charter_map.md"), "r", encoding="utf-8") as handle: + rows = [line for line in handle.read().splitlines() if line.startswith("| ")] + self.assertEqual(len(rows) - 1, len(bullets)) + stats = [row for row in rows if "mean" in row and "median" in row and "percentiles" in row] + self.assertEqual(len(stats), 1) + self.assertIn("STRA-290", stats[0]) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/e2e/evidence/validate.py b/scripts/e2e/evidence/validate.py new file mode 100644 index 00000000..faa32a50 --- /dev/null +++ b/scripts/e2e/evidence/validate.py @@ -0,0 +1,410 @@ +#!/usr/bin/env python3 +"""Validator for END_TO_END evidence records (STRA-246, S0.1). Offline, stdlib only, Python >= 3.9. + +CLI v1 (fixed here; later leaves and acceptance commands use it): + + validate.py [--row-b-env ] exit 0 and `OK ` when valid, exit 1 and the reasons when rejected + validate.py --negative-suite [--dir ] every neg_*.json must be rejected for the reason named in negative_cases.json; + exit 0 and `rejected: N/N` when all are + validate.py merge END_TO_END records only; `END_TO_END with COMPONENT refused` (exit 1) otherwise + +A file is one record, or a series bundle {"series_records": [record, ...]} (checked for the series rules). The schema is +schema.json, interpreted by the small evaluator below (no jsonschema); the cross-field rules are the RULE_* / SERIES_* functions. +`countable` is derived elsewhere (STRA-312); this validator only rejects countable=true without the power-sample summary or under +BOOTSTRAP thresholds. No statistics are computed here (STRA-290). + +--row-b-env file: the literal environment list of row (b) of S0.7, either a JSON list of "NAME=VALUE" strings or a text file with +one NAME=VALUE per line (blank lines and lines starting with # are ignored). Without the option the vanilla_noskip environment +is not compared (a note goes to stderr). +""" +import json +import os +import re +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +SCHEMA_PATH = os.path.join(HERE, "schema.json") +NEGATIVE_INDEX = "negative_cases.json" +LEVEL = "END_TO_END" +REFUSED_MESSAGE = "END_TO_END with COMPONENT refused" +OURS = "ours" +VANILLA_ARMS = ("vanilla_default", "vanilla_noskip") + + +def load_json(path): + with open(path, "r", encoding="utf-8") as handle: + return json.load(handle) + + +def load_schema(): + return load_json(SCHEMA_PATH) + + +# ---------------------------------------------------------------- schema interpreter + +def _type_ok(value, name): + if name == "null": + return value is None + if name == "boolean": + return isinstance(value, bool) + if name == "integer": + return isinstance(value, int) and not isinstance(value, bool) + if name == "number": + return isinstance(value, (int, float)) and not isinstance(value, bool) + if name == "string": + return isinstance(value, str) + if name == "object": + return isinstance(value, dict) + if name == "array": + return isinstance(value, list) + raise ValueError("schema uses an unsupported type: %s" % name) + + +def _short(value): + text = json.dumps(value, sort_keys=True) + return text if len(text) <= 60 else text[:57] + "..." + + +def interpret(schema, value, path, definitions, errors): + """Append (code, path, message) to errors for every violation of schema by value.""" + if "$ref" in schema: + prefix = "#/definitions/" + ref = schema["$ref"] + if not ref.startswith(prefix) or ref[len(prefix):] not in definitions: + raise ValueError("schema has an unresolvable $ref: %s" % ref) + interpret(definitions[ref[len(prefix):]], value, path, definitions, errors) + return + if "anyOf" in schema: + failures = [] + for branch in schema["anyOf"]: + found = [] + interpret(branch, value, path, definitions, found) + if not found: + return + failures.append(found) + # a branch that failed on the type of this very value is not the intended form; report the branches that fit the type + fitting = [f for f in failures if not (f[0][0] == "WRONG_TYPE" and f[0][1] == path)] + if len(fitting) == 1: + errors.extend(fitting[0]) + else: + errors.append(("NO_ALTERNATIVE_MATCHES", path, "matches none of the allowed forms (%s)" % "; ".join(f[0][2] for f in failures))) + return + if "type" in schema: + names = schema["type"] if isinstance(schema["type"], list) else [schema["type"]] + if not any(_type_ok(value, name) for name in names): + errors.append(("WRONG_TYPE", path, "expected %s, got %s" % ("/".join(names), _short(value)))) + return + if "const" in schema and value != schema["const"]: + errors.append(("BAD_VALUE", path, "must be %s, got %s" % (_short(schema["const"]), _short(value)))) + return + if "enum" in schema and value not in schema["enum"]: + errors.append(("BAD_VALUE", path, "must be one of %s, got %s" % (_short(schema["enum"]), _short(value)))) + return + if isinstance(value, str): + if "minLength" in schema and len(value) < schema["minLength"]: + errors.append(("TOO_SHORT", path, "string shorter than %d" % schema["minLength"])) + if "pattern" in schema and re.search(schema["pattern"], value) is None: + errors.append(("BAD_PATTERN", path, "%s does not match %s" % (_short(value), schema["pattern"]))) + if isinstance(value, (int, float)) and not isinstance(value, bool): + if "minimum" in schema and value < schema["minimum"]: + errors.append(("OUT_OF_RANGE", path, "%s is below %s" % (_short(value), schema["minimum"]))) + if "exclusiveMinimum" in schema and value <= schema["exclusiveMinimum"]: + errors.append(("OUT_OF_RANGE", path, "%s must be above %s" % (_short(value), schema["exclusiveMinimum"]))) + if "maximum" in schema and value > schema["maximum"]: + errors.append(("OUT_OF_RANGE", path, "%s is above %s" % (_short(value), schema["maximum"]))) + if isinstance(value, dict): + for key in schema.get("required", []): + if key not in value: + errors.append(("MISSING_FIELD", path + "/" + key, "required field is absent")) + props = schema.get("properties", {}) + for key in sorted(value): + if key in props: + interpret(props[key], value[key], path + "/" + key, definitions, errors) + elif schema.get("additionalProperties") is False: + errors.append(("UNKNOWN_FIELD", path + "/" + key, "field is not in the schema")) + if isinstance(value, list): + if "minItems" in schema and len(value) < schema["minItems"]: + errors.append(("TOO_FEW_ITEMS", path, "fewer than %d items" % schema["minItems"])) + if "items" in schema: + for index, item in enumerate(value): + interpret(schema["items"], item, "%s/%d" % (path, index), definitions, errors) + + +# ---------------------------------------------------------------- cross-field rules + +def _read_row_b_env(path): + with open(path, "r", encoding="utf-8") as handle: + text = handle.read() + if path.lower().endswith(".json"): + entries = json.loads(text) + else: + entries = [line.strip() for line in text.splitlines() if line.strip() and not line.lstrip().startswith("#")] + if not isinstance(entries, list) or not all(isinstance(e, str) for e in entries): + raise ValueError("--row-b-env file must hold a list of NAME=VALUE strings") + return entries + + +def rule_errors(rec, constants, row_b_env): + """Cross-field rules. Runs only on a record that already passed the schema, so the shapes are known.""" + errors = [] + arm = rec["arm_identity"]["arm"] + turns = rec["metrics"]["turns"] + + if rec["configuration"]["context_tokens"] != constants["context_tokens_256k"]: + errors.append(("RULE_256K_CONTEXT", "/configuration/context_tokens", + "not the 256k class: context_tokens %d, required %d" % (rec["configuration"]["context_tokens"], constants["context_tokens_256k"]))) + largest = max(t["prompt_tokens"] for t in turns) + if largest < constants["min_max_prompt_tokens_256k"]: + errors.append(("RULE_256K_PROMPT", "/metrics/turns", + "not the 256k class: largest prompt_tokens %d, required >= %d" % (largest, constants["min_max_prompt_tokens_256k"]))) + if rec["workload"]["turn1_tokens"] != turns[0]["prompt_tokens"]: + errors.append(("RULE_TURN1_TOKENS", "/workload/turn1_tokens", "differs from metrics.turns[0].prompt_tokens")) + for index, turn in enumerate(turns): + if turn["turn"] != index + 1: + errors.append(("RULE_TURN_ORDER", "/metrics/turns/%d/turn" % index, "turn numbers must run 1..n in order")) + if turn["cached_tokens"] > turn["prompt_tokens"]: + errors.append(("RULE_TURN_ORDER", "/metrics/turns/%d/cached_tokens" % index, "cached_tokens exceeds prompt_tokens")) + + ident = rec["arm_identity"] + if ident["position"] == 1 and ident["predecessor_arm"] != "none": + errors.append(("RULE_POSITION", "/arm_identity/predecessor_arm", "position 1 has no predecessor, must be 'none'")) + if ident["position"] > 1 and ident["predecessor_arm"] in ("none", ident["arm"]): + errors.append(("RULE_POSITION", "/arm_identity/predecessor_arm", "position %d needs another arm as predecessor" % ident["position"])) + + observed = rec["ours_build_id_observed"] + if arm == OURS and observed is None: + errors.append(("RULE_OBSERVED_BUILD", "/ours_build_id_observed", "an ours record carries the observed build id")) + if arm != OURS and observed is not None: + errors.append(("RULE_OBSERVED_BUILD", "/ours_build_id_observed", "a vanilla record has no observed ours build id, must be null")) + + lines = rec.get("kernel_lines", []) + bare = re.compile(constants["bare_cpu_line_regex"]) + if arm == OURS: + cpu = re.compile(constants["ours_cpu_line_regex"]) + if not any(cpu.search(line) for line in lines): + errors.append(("RULE_OURS_CPU_LINE", "/kernel_lines", "an ours record needs 'leleka-serve cpu: ' lines (verbatim stderr of cpu_kernel_report)")) + for key in ("vanilla_cpu_family", "vanilla_noskip_environment"): + if key in rec: + errors.append(("RULE_OURS_NO_VANILLA_BLOCK", "/" + key, "an ours record does not carry " + key)) + else: + if lines: + errors.append(("RULE_VANILLA_CLAIMS_CPU", "/kernel_lines", "the vanilla engine prints no cpu: line; use the vanilla_cpu_family block")) + if "vanilla_cpu_family" not in rec: + errors.append(("RULE_VANILLA_BLOCK", "/vanilla_cpu_family", "a vanilla record needs the vanilla_cpu_family block")) + else: + for where in (rec["vanilla_cpu_family"]["printed"], rec["vanilla_cpu_family"]["control"]["printed"]): + if isinstance(where, list) and any(bare.search(line) for line in where): + errors.append(("RULE_VANILLA_CLAIMS_CPU", "/vanilla_cpu_family", "a printed line starts with 'cpu:'; the vanilla engine prints none")) + if arm == "vanilla_noskip": + env = rec.get("vanilla_noskip_environment") + if env is None: + errors.append(("RULE_NOSKIP_ENV", "/vanilla_noskip_environment", "a vanilla_noskip record carries its environment")) + elif row_b_env is not None and sorted(env) != sorted(row_b_env): + missing = sorted(set(row_b_env) - set(env)) + extra = sorted(set(env) - set(row_b_env)) + errors.append(("RULE_NOSKIP_ENV", "/vanilla_noskip_environment", + "differs from the --row-b-env list (missing %s, extra %s)" % (missing, extra))) + elif "vanilla_noskip_environment" in rec: + errors.append(("RULE_NOSKIP_ENV", "/vanilla_noskip_environment", "only a vanilla_noskip record carries an environment")) + + hardware = rec["hardware"] + attestation = hardware["owner_attestation"] + if attestation["present"] and (attestation["identifier"] is None or attestation["time_utc"] is None): + errors.append(("RULE_ATTESTATION", "/hardware/owner_attestation", "a present attestation needs identifier and time_utc")) + if not attestation["present"] and (attestation["identifier"] is not None or attestation["time_utc"] is not None): + errors.append(("RULE_ATTESTATION", "/hardware/owner_attestation", "an absent attestation has identifier and time_utc null")) + + summary = rec.get("power_sample_summary") + if summary is not None: + if not summary["min_w"] <= summary["mean_w"] <= summary["max_w"]: + errors.append(("RULE_POWER_SUMMARY_ORDER", "/power_sample_summary", "min_w <= mean_w <= max_w does not hold")) + changed = hardware["enforced_power_limit_w_start"] != hardware["enforced_power_limit_w_end"] + if summary["power_limit_changed"] != changed: + errors.append(("RULE_POWER_LIMIT_CHANGED", "/power_sample_summary/power_limit_changed", + "must be %s: start and end enforced limits %s" % (str(changed).lower(), "differ" if changed else "are equal"))) + if rec["countable"]: + if summary is None: + errors.append(("RULE_COUNTABLE_POWER_SUMMARY", "/power_sample_summary", "countable=true needs the power-sample summary")) + if rec["thresholds_source"] == "BOOTSTRAP": + errors.append(("RULE_COUNTABLE_BOOTSTRAP", "/thresholds_source", "countable=true is not allowed under BOOTSTRAP thresholds")) + return errors + + +def validate_record(rec, schema, row_b_env=None): + """Return the list of (code, path, message) reasons; empty means valid.""" + if not isinstance(rec, dict): + return [("WRONG_TYPE", "", "a record is a JSON object")] + level = rec.get("level") + if level != LEVEL: + return [("LEVEL_NOT_END_TO_END", "/level", "level is %s, this validator takes %s records only" % (_short(level), LEVEL))] + errors = [] + interpret(schema["root"], rec, "", schema["definitions"], errors) + if not errors: + errors.extend(rule_errors(rec, schema["constants"], row_b_env)) + return errors + + +def series_errors(records): + """Rules over several records that must be one series: never mix identities, never pool WARM with COLD.""" + errors = [] + first = records[0] + first_ident = first["arm_identity"] + seen = {} + for index, rec in enumerate(records): + ident = rec["arm_identity"] + where = "/series_records/%d" % index + if ident["series_id"] != first_ident["series_id"]: + errors.append(("SERIES_ID_MIXED", where, "series_id differs from record 0")) + if ident["schedule_sha256"] != first_ident["schedule_sha256"]: + errors.append(("SERIES_SCHEDULE_MIXED", where, "schedule_sha256 differs from record 0")) + if rec["ours_build_id_frozen"] != first["ours_build_id_frozen"]: + errors.append(("SERIES_BUILD_MIXED", where, "ours_build_id_frozen differs from record 0")) + if rec["cache"]["state"] != first["cache"]["state"]: + errors.append(("SERIES_CACHE_MIXED", where, "cache state %s differs from %s in record 0: WARM and COLD are never pooled" + % (rec["cache"]["state"], first["cache"]["state"]))) + key = (ident["block"], ident["arm"]) + if key in seen: + errors.append(("SERIES_DUPLICATE_ARM", where, "block %d already has a record of arm %s (record %d)" % (key[0], key[1], seen[key]))) + seen[key] = index + return errors + + +def validate_document(doc, schema, row_b_env=None): + """A file holds one record or a series bundle. Returns (errors, label).""" + if isinstance(doc, dict) and "series_records" in doc: + records = doc["series_records"] + extra = [k for k in doc if k != "series_records"] + if extra or not isinstance(records, list) or not records: + return [("BAD_BUNDLE", "/series_records", "a bundle is {\"series_records\": [record, ...]} with at least one record")], "bundle" + errors = [] + for index, rec in enumerate(records): + for code, path, message in validate_record(rec, schema, row_b_env): + errors.append((code, "/series_records/%d%s" % (index, path), message)) + if not errors: + errors.extend(series_errors(records)) + if errors: + return errors, "bundle" + return errors, "series %s" % records[0]["arm_identity"]["series_id"] + errors = validate_record(doc, schema, row_b_env) + if errors: + return errors, "record" + return errors, doc["arm_identity"]["arm"] + + +def _levels(doc): + records = doc["series_records"] if isinstance(doc, dict) and isinstance(doc.get("series_records"), list) else [doc] + return [r.get("level") if isinstance(r, dict) else None for r in records] + + +# ---------------------------------------------------------------- commands + +def format_errors(errors): + return ["REJECTED %s %s: %s" % (code, path or "/", message) for code, path, message in errors] + + +def cmd_validate(path, row_b_path): + schema = load_schema() + row_b = _read_row_b_env(row_b_path) if row_b_path else None + doc = load_json(path) + errors, label = validate_document(doc, schema, row_b) + if errors: + for line in format_errors(errors): + print(line) + return 1 + if row_b is None and _has_noskip(doc): + sys.stderr.write("note: no --row-b-env given, the vanilla_noskip environment was not compared\n") + print("OK %s" % label) + return 0 + + +def _has_noskip(doc): + records = doc["series_records"] if "series_records" in doc else [doc] + return any(r["arm_identity"]["arm"] == "vanilla_noskip" for r in records) + + +def cmd_merge(path_a, path_b): + docs = [load_json(path_a), load_json(path_b)] + levels = _levels(docs[0]) + _levels(docs[1]) + if any(level != LEVEL for level in levels): + print(REFUSED_MESSAGE if LEVEL in levels else "merge refused: no END_TO_END record in %s" % sorted(set(map(str, levels)))) + return 1 + schema = load_schema() + records = [] + for doc in docs: + errors, _ = validate_document(doc, schema) + if errors: + for line in format_errors(errors): + print(line) + return 1 + records.extend(doc["series_records"] if "series_records" in doc else [doc]) + errors = series_errors(records) + if errors: + for line in format_errors(errors): + print(line) + return 1 + print("MERGED %d records of series %s" % (len(records), records[0]["arm_identity"]["series_id"])) + return 0 + + +def cmd_negative_suite(directory): + schema = load_schema() + index = load_json(os.path.join(directory, NEGATIVE_INDEX)) + cases = index["cases"] + problems = [] + on_disk = sorted(name for name in os.listdir(directory) if name.startswith("neg_") and name.endswith(".json")) + listed = sorted(case["file"] for case in cases) + if on_disk != listed: + problems.append("fixtures and %s disagree: only on disk %s, only in index %s" + % (NEGATIVE_INDEX, sorted(set(on_disk) - set(listed)), sorted(set(listed) - set(on_disk)))) + for sample in index["samples"]: + errors, _ = validate_document(load_json(os.path.join(directory, sample)), schema) + if errors: + problems.append("sample %s is rejected: %s" % (sample, format_errors(errors)[0])) + rejected = 0 + for case in cases: + row_b = _read_row_b_env(os.path.join(directory, case["row_b_env"])) if case.get("row_b_env") else None + errors, _ = validate_document(load_json(os.path.join(directory, case["file"])), schema, row_b) + codes = [code for code, _, _ in errors] + if not errors: + problems.append("%s: ACCEPTED, expected %s" % (case["file"], case["expect"])) + elif case["expect"] not in codes: + problems.append("%s: rejected for %s, expected %s" % (case["file"], format_errors(errors)[0], case["expect"])) + else: + rejected += 1 + wanted = [e for e in errors if e[0] == case["expect"]][0] + print("%s: %s %s: %s" % (case["file"], wanted[0], wanted[1] or "/", wanted[2])) + if len(cases) < schema["constants"]["min_negative_cases"]: + problems.append("only %d negative cases, at least %d are required" % (len(cases), schema["constants"]["min_negative_cases"])) + for problem in problems: + print("PROBLEM " + problem) + print("rejected: %d/%d" % (rejected, len(cases))) + return 0 if not problems and rejected == len(cases) else 1 + + +USAGE = ("usage: validate.py [--row-b-env ]\n" + " validate.py --negative-suite [--dir ]\n" + " validate.py merge \n") + + +def main(argv): + try: + if argv[:1] == ["merge"] and len(argv) == 3: + return cmd_merge(argv[1], argv[2]) + if argv[:1] == ["--negative-suite"]: + if len(argv) == 1: + return cmd_negative_suite(HERE) + if len(argv) == 3 and argv[1] == "--dir": + return cmd_negative_suite(argv[2]) + elif len(argv) == 1 and not argv[0].startswith("-"): + return cmd_validate(argv[0], None) + elif len(argv) == 3 and argv[1] == "--row-b-env" and not argv[0].startswith("-"): + return cmd_validate(argv[0], argv[2]) + except (OSError, ValueError) as exc: + sys.stderr.write("error: %s\n" % exc) + return 2 + sys.stderr.write(USAGE) + return 2 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:]))