Record Frontier cache equivalence evidence

This commit is contained in:
2026-07-15 22:10:36 +08:00
parent 5fadc86edd
commit ae933f2256

View File

@@ -591,6 +591,15 @@ def run_frontier(args: argparse.Namespace) -> Path:
audit_protocol(args.protocol_manifest) audit_protocol(args.protocol_manifest)
profile_paths = frontier_grid.resolve_profile_paths(args.profile_root) profile_paths = frontier_grid.resolve_profile_paths(args.profile_root)
profile_contract = _validate_profile_contract(profile_paths) profile_contract = _validate_profile_contract(profile_paths)
cache_equivalence = json.loads(args.cache_equivalence_artifact.read_text())
if (
cache_equivalence.get("schema")
!= "frontier-ep-critical-lane-cache-equivalence-v1"
or not cache_equivalence.get("byte_identical")
):
raise ValueError("EP critical-lane cache lacks byte-identical evidence")
if Path(cache_equivalence["new_source"]).resolve() != args.frontier_source.resolve():
raise ValueError("cache equivalence was measured on a different Frontier source")
configs = frontier_grid.selected_configs(args.config) configs = frontier_grid.selected_configs(args.config)
args.output_root.mkdir(parents=True, exist_ok=True) args.output_root.mkdir(parents=True, exist_ok=True)
run_manifest = { run_manifest = {
@@ -614,6 +623,12 @@ def run_frontier(args: argparse.Namespace) -> Path:
for name, path in profile_paths.items() for name, path in profile_paths.items()
}, },
}, },
"ep_critical_lane_cache_equivalence": {
"path": str(args.cache_equivalence_artifact.resolve()),
"sha256": sha256(args.cache_equivalence_artifact),
"request_metrics_byte_identical": True,
"request_metrics_sha256": cache_equivalence["new_sha256"],
},
"kv_capacity_evidence": { "kv_capacity_evidence": {
"tp4": { "tp4": {
"path": str(args.tp4_capacity_artifact.resolve()), "path": str(args.tp4_capacity_artifact.resolve()),
@@ -1354,6 +1369,7 @@ def parse_args() -> argparse.Namespace:
frontier.add_argument("--output-root", type=Path, required=True) frontier.add_argument("--output-root", type=Path, required=True)
frontier.add_argument("--tp4-capacity-artifact", type=Path, required=True) frontier.add_argument("--tp4-capacity-artifact", type=Path, required=True)
frontier.add_argument("--tp8-capacity-artifact", type=Path, required=True) frontier.add_argument("--tp8-capacity-artifact", type=Path, required=True)
frontier.add_argument("--cache-equivalence-artifact", type=Path, required=True)
frontier.add_argument("--config", action="append") frontier.add_argument("--config", action="append")
community = subparsers.add_parser("prepare-community") community = subparsers.add_parser("prepare-community")